Integrating Salesforce and Sitecore WFFM

Andrew Vu
November 30, 2015
Sitecore , Web Development

Salesforce, a popular Customer Relationship Management (CRM) online application, allows companies to track sales and customer relationships while expanding and managing their business operations. It’s a powerful tool that can become even more powerful when integrated with a company’s website. It's a common practice for Roundedcube to integrate Salesforce and Sitecore. I thought it might be helpful to share a few steps of this process.

During a Sitecore Web Forms for Marketers (WFFM) to Salesforce integration, data is typically being sent from the Sitecore web form to Salesforce objects. That means when a visitor submits a web form, the data will be sent to Salesforce and will create a different record in the salesforce objects. The Salesforce objects could be: Lead, Contact, Activities, Campaign History, or all of them and more depending on your preferences. Here are three steps to get started with the integration:

Step 1: Collecting the Data

The first action in this procedure is collecting the data from the web form that a visitor will be submitting. Sitecore provided the class and methods that developers can use to collect all data from any fields of a web form. It is fairly easy to use, but you must be aware of the Sitecore version. Sitecore 7.2 uses WFFM version 2.4 where you will need to use the form field name to the collect data. Sitecore 8.0 uses WFFM version 2.5 where you must use the form field title to the collect data.

Step 2: Preparing Salesforce for the Data

The next step is to determine what we have to do in Salesforce to receive the data. The first thing we need to do is clarify what fields in the Salesforce object will be recorded with the data from the Sitecore web form. Salesforce has many different objects with many fields; those fields are called standard fields. Salesforce also provides a function called ‘custom fields’ for the user to create their own fields in each object. The next step is obtaining the SOAP API in Salesforce, which allows for programmatic access to an organization’s information in Salesforce. We can use the salesforce SOAP API to create, retrieve, update or delete records.

The Salesforce SOAP API provides two options to create, retrieve, update or delete records in Salesforce. The first option is referencing to the SOAP API xml file from Visual Studio. The second option is converting the file to the Visual Studio class. 

Step 3: Creating a Custom Save Action

Now that we have the SOAP API class we need to create a custom save action class for the Sitecore WFFM. After that the next step is to create a web form that uses the custom save action. When that has been completed, the Sitecore to Salesforce integration is now ready to function and can be tested.

In this blog we covered the basic steps to a Sitecore to Salesforce integration. I hope this provided you some insight on how the data will be sent from the Sitecore WFFM to the Salesforce application. In my next post, I will discuss more details about the custom save action and the objects in Salesforce.


comments powered by Disqus