Update to Original Post:

When I first wrote this post, Salesforce did not have a native survey functionality. That changed with the Spring ’18 release, but it’s still at its early stages and does not offer the powerful functionality that something like FormAssembly or ClickTools does. But if you need simple surveys and you have Community licenses, you should definitely consider it.

Original Post:

Surveys are a great way to measure customer satisfaction, improve your products and services based on their feedback, and keep them coming back for more. If you use WordPress for your website and Salesforce CRM, then you have all the tools you need to build Surveys and collect the responses.

A common use case might be to send a Survey to a contact 10 days after an Opportunity is marked Closed Won. Or if you keep track of projects in Salesforce, you can send a completion survey when the project is completed.

Requirements


To be able to setup Surveys you need the following:

  • Salesforce Enterprise Edition with administrator privileges.
  • WordPress website with administrator privileges.
  • WordPress form plugin with Salesforce integration option. We use Gravity Forms with Zapier addon to integrate with Salesforce.

Instructions


If you need help setting up Gravity Forms and Salesforce integration, we recommend you start with this post: Integrating Gravity Forms and Salesforce (https://zapier.com/zapbook/gravity-forms/salesforce/).

1. Build the Survey Form in WordPress


To get started, login to WordPress admin and build a new form with your survey questions. Almost all form plugins in WordPress have a drag-and-drop form builder. The most widely used field types in a survey are radio buttons, which allow the user to select only one answer from the options.

To know which Salesforce record this survey should be associated with, you must create a hidden field and check the option in Gravity Forms advanced tab to “Allow field to be populated dynamically.” You must also enter the parameter name. With this option we will be able to pass the Salesforce Record Id via query string in the URL. This will make more sense once we build the Survey object in Salesforce in the next step.

2. Build the Survey Object in Salesforce


In Salesforce create a new custom object, Survey. You must add the same fields that were added to the WordPress form. For radio button fields, create a Picklist field in Salesforce. If you are using Text Areas, do the same in Salesforce.

Once the survey forms are built, the next step is to create a Lookup Relationship to the Salesforce object of your choice. If your surveys are related to Opportunities, then create a lookup to Opportunities.

3. Build email template and Workflow Rule to send the survey


In the email template that will be sent to your contact, you must include the Survey link. Assuming your survey page link is www.your-domain.com/?page_id=1234, this is where you would add the Salesforce record Id so you can associate the survey with the Salesforce record. If the parameter name you used in Gravity Forms is record_id, and we are setting this up for the Opportunity object, then the link should be www.your-domain.com/?page_id=1234&record_id={!Opportunity.Id}.

Next step is to set up a Workflow Rule with a Time-Dependent Workflow Action to send the email template to contact’s email. The Rule Criteria should be when Stage equals Closed Won.

4. Conclusion


You’re done! As you can see, if you’re familiar with Salesforce Workflows and WordPress, you can easily create Surveys and collect the feedback in Saleforce. We prefer Gravity Forms because of its integration options, but you can do this with Contact Form 7, and other forms as well.