January 06, 2016
In my last blog post I covered the beginning steps of a Sitecore WFFM and Salesforce integration. In this post I would like to expand on that topic by sharing how to create a custom save action for Salesforce.
Sitecore allowed the Web Forms for Marketers (WFFM) module to let you create simple data collection forms. This WFFM module comes with some prebuilt functions that will act on the data being submitted through the form by a visitor. Two of the most common save actions are “Save to Database” and “Send Email Message”.
These “out of the box” save actions will not work with a Salesforce integration, so to meet your company’s needs you will need to create a custom save action. To create this custom WFFM action, follow the steps below:
- Install the latest WFFM module.
- Create a new class implementing the Sitecore.Form.Submit.ISaveAction interface
- Register the action for use with the WFFM module by creating a new item based on the /sitecore/templates/Web Forms for Marketers/Actions/Submit Actiontemplate under the /sitecore/system/Modules/Web Forms for Marketers/Settings/Actions/Save Actions folder.
- Create new webforms and register the custom save action.
- Now, we can start to create a save action class which will submit the data.
Once we have completed the custom save action, it needs to be registered with Sitecore. In Sitecore under the/sitecore/system/Modules/Web Forms for Marketers/Settings/Actions/Save Actions folder, create the new save action item name, Save To Salesforce and register the custom class save action as the screenshot below:
Now, select the Save To Salesforce action for the Web Form. Open the one that you want and select the custom save action. Click on the Save Actions button.
On the popup window, click on the down arrow button and select the Save To Salesforce action. Click OK button, publish the Web Form.
And the Web Form with the custom save action is ready for sending data to salesforce by one click of a visitor.
In this blog we covered the basic steps to creating a custom save action that can be used to send data to Salesforce. I hope you can use this custom technique to benefit your company.
Get in Touch
Contact Shawn Duncan for new business inquiries: email@example.com.
2029 Woodland Parkway
comments powered by
St. Louis, Mo. 63146