Send Sitefinity CMS form data to Oracle Eloqua forms

You can enable Sitefinity CMS forms to submit data to Eloqua via the IEloquaFormDataSubmitter interface. You submit the following data:

  • Eloqua form name
  • Field names in the Sitefinity CMS form
  • Field values of the Sitefinity CMS form fields

You also use the EloquaFormDataSubmitter to post data to Eloqua from custom code, for example, custom widgets you implemented.

The following example demonstrates how you use the EloquaFormDataSubmitter.

C#
using System.Collections.Generic;
using Telerik.Sitefinity.Abstractions;
using Telerik.Sitefinity.EloquaConnector.Client.Forms;

namespace SitefinityWebApp
{
    public class SendDataToEloqua
    {
        public void SendSitefinityDataToEloqua()
        {
            // Example of submitting data to Eloqua
            // Create a dictionary with the fields and values you want to send
            
            var fields = new Dictionary<string, string>();
            fields.Add("firstName", "John");
            fields.Add("lastName", "Smith");
            
            // Specify the name of the Eloqua form
            var eloquaFormName = "EloquaFormName";
            
            // Resolve the submitter
            var eloquaFormDataSubmitter = ObjectFactory.Resolve<IEloquaFormDataSubmitter>();
            
            // Submit the fields to the form
            eloquaFormDataSubmitter.SubmitFormData(fields, eloquaFormName);
        }
    }
}

In the code above, you:

  1. Resolve an instance of type IEloquaFormDataSubmitter.
  2. Next, you add two sample fields and their values:
    • firstName with value John
    • lastName with value Smith
  3. Via the eloquaFormName parameter define the specific Eloqua form, to which you map your Sitefinity form.
  4. Finally, you submit form data via the eloquaFormDataSubmitter.SubmitFormData(fields, eloquaFormName); method.
Want to learn more?
Enhance your Sitefinity skills by enrolling in free training sessions. Become Sitefinity certified through Progress Education Community to strengthen your professional credentials.
New to Sitefinity?