With Salesforce’s Process Builder/Flows, 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/Flows. 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 > Flows > 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.
Construct the Process Flow in Process Builder/Flows
Know Before You Go
Each Salesforce Instance is unique and complex.
This step should be completed with your Salesforce Admins.
From the Flows Page, select "New" to 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!
We highly recommend multiple rounds of testing to check that the Process is working as intended.
Add your 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. This will include:
- Creating a Case
- Associating it with your test contact
- Set the case status to Closed
- Any other actions you added to the Flow
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
Note: if using the triggeremail argument in the Email Template for testing, you must remove the entire argument once in production. triggeremail: false is not a valid argument and may still send a survey
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. You can always make adjustments 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/Flows 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.