With Salesforce’s Process Builder, you can configure AskNicely surveys to be sent when virtually any event occurs in your business.
For simpler use cases, you can use Salesforce Reports to integrate Contacts into AskNicely. You can easily add Contacts and trigger a specific number of surveys to go out with each daily sync.
The most traditional, and commonly used event is the Case Closed Action within ServiceCloud. We recommend you collaborate with your Salesforce Admin to build this Process and design a Process outside of this general use case.
Building a Process for Case Closed
Find or create your address from AskNicely’s Email to Survey
Salesforce leverages AskNicely's Email to Survey trigger to upload the dataset built by Process Builder. Read step-by-step instructions and optional settings on Email To Survey plus how to structure your Email Body here.
Specific to Salesforce, we can accept the following fields:
Build the Email Template
Note: This configures an email sent from Salesforce to AskNicely; this is not the email that will be sent to contacts.
From the Setup Console in your Salesforce Instance, go to Email > Email Templates and create a "New Template" setting the template type to "Text". Ensure that the the "Available for Use" checkbox is ticked.
Set your Subject to "N/A" and enter the Email Body that you built in the step above using our Email to Survey Guide. Include with the text all the arguments and Custom Data Fields you want to have attached with each Contact record.
In order for responses to come back into a Contact's page in Salesforce you must include the ContactID field.
Create the Email Alert in Salesforce
Staying inside the Setup Console go to the Email Alerts page by finding Process Automation > Process Builder > Workflow Actions > Email Alerts.
You can enter a Description and Unique Name aligned with your target audience and the name of the Email Template created in the previous step. From the Object drop down list, choose Case.
Select the Email Template created above.
Skip editing any of the Recipient Type & Recipients.
In Additional Emails, enter your unique alphanumeric AskNicely Email to Survey address. This is the address that was created in the Email to Survey app in your AskNicely AppStore ending in the domain
Construct the Process Flow in Process Builder
Here is where you can change the settings for criteria other than "Closed Case". Select from the various options to create a Process that targets the Salesforce event you want the survey to go out for. Keep in mind what your Trigger Field is to tell AskNicely what survey you want this Process to send out (if not the default survey template).
From the "My Processes" Page, select "New" Process Builder in Salesforce Setup and create a process that starts when a record changes.
Select Case as the Object from the drop-down menu and set the Process to start when a record is created or edited.
When Defining the criteria, name the Criteria "Case Closed" and executing the actions as "Conditions are met". The conditions should be the following:
Conditions: All of the conditions are met
Next, select the Action Type to “Email Alerts” and add the Email Alert created above into the text box.
Once you have checked all your settings, activate the Process!
Testing the Process/Troubleshooting
It can be a good idea to check that the Process is working as intended. Here’s how you can do that for the above example:
Add your personal email address to Additional Emails on the Email Alert created above.
Create a test contact with your email address (or use an existing contact record that has your email address).
Perform the actions that trigger the process:
- Create a case.
- Associate it with your test contact.
- Set the case status to Closed.
Check your inbox
You should have an email from Salesforce. Confirm that the field names and values are what you expected. They should look exactly like the Email Template you built earlier. You may also have an email from AskNicely, unless your account's Global Contact Rules prevented you from being contacted too frequently or you did not add the argument of
Check your Contacts Page for the Contact record. Confirm the contact is listed with the expected name, email, and any additional Custom Data that you built to associate the contact with. You can always make adjustments as appropriate by changing the Email Body in the Template.
When you're ready to go live, don't forget to clear all your test data and remove your email from the alert’s Additional Emails.
Create a follow-up task in Salesforce
It can be valuable to contact customers when they have given you a low score. Here is a quick way to use the Process Builder to automatically create a task to follow up detractor responses automatically:
- Go to Process Builder in Salesforce Setup and create a process that starts when a record changes.
- Add the Contact object.
- Set the process to start when a record is created or edited.
- Add the criterion: <NPS Last Responded> <is changed> <Boolean> <True>
- Add the criterion: <NPS Score> <less than or equal> <Number> <6>
- Add the action to create a record (Task).
- To relate the task to the contact, add a field value row: <Related to Id> <Field Reference> <Contact ID>
- Activate the process.