How to limit the number of surveys sent from Salesforce Workflows
How do you strike the right balance of collecting actionable data without over-surveying your audience?
This is a common request from our customers; however, Salesforce has a cross-object limitation that prevents the sent date from being recorded every time a workflow is activated.
Here’s an example: Let’s say a Closed-Case survey is triggered out of Salesforce by an agent closing a case after helping a customer. A workflow sends out a Clicktools survey and everything works great – until that customer has other issues and is sent multiple surveys too frequently.
Why is preventing this so difficult? Salesforce cannot update the Contact record each time a workflow activates. This leaves the ability to record a completed survey (via Clicktools mapping), but not when a survey was sent out.
The sent date must be updated on the Contact record. The previous answer to this was using custom code (APEX) to write triggers. But I’d like to discuss a code-free solution, which combines Workflows with the new Process Builder!
The Solution: Combine the automation of Workflows with the power of Process Builder. Essentially you want to update the Contact record every time a survey is sent and received.
The easiest way to do this is use what you already have – leverage the power of Salesforce and simply add to the existing Workflow Criteria (for example: “Last Survey Sent” must be less than 7 days). Then add a field-update Action to your Workflow. Create a new field on the Case object (field type=checkbox) and enable “re-evaluate after every run.” Boom. You’re done with the Workflow setup.
Now set up a brand new Process Builder, with the only Criteria being that the checkbox above must be checked. Your “Action” is to update a field on the Contact record using a formula of Today(). This will place today’s date into the “last survey sent” date on the Contact Record. Then when the next case is closed in Salesforce, the workflow will evaluate if last survey sent date was indeed less than 7 days ago and will process the checkbox again. The system works!
If you notice the chart above, both the workflow and the process builder update the contact record. All of our criteria are defined using two fields on the Contact record – that’s the key! By combining processes in Salesforce you can expand the criteria and create filters specific to each department’s survey needs.