Automation Goal: Forward survey responses from an ongoing campaign to a separate CRM or management system account.
User Level:
Admin
Exporting Survey Answers
Contact answers to survey questions will be stored with the campaign alongside other aggregated data, like the campaign statistics. Campaign contact lists imported from Salesforce can be configured to export survey answers automatically. When you need to export this data to another endpoint, it can be done with our workflow automations. This data can be logged for internal tracking purposes, or sent to a third party like a CRM.
Workflow Automation Setup
From Cloudtalk dashboard, navigate to Account -> Workflow Automations.
Select
+Add Workflow
and name your workflow.Define a trigger. In this example, we should configure the automation before the start of our campaign, so that it can run in real time as the campaign is taking place. As the campaign is carried out through calls to customers, we will select Call as Object. For Action, we select ended.
This automation will require some conditions. The first condition will ensure that dropped calls will not be counted in the trigger.
Click into the Property field and refer to the Useful data for your Workflow box. From the options, choose talking_time. The Property box will autofill with the dynamic value
event.properties.talking_time
.
Select the Operand is greater than. For Value, enter
10
.
Our logical statement tells the system to only trigger when an ended call had a talk time greater than ten seconds (allowing some buffer time for connection lag).
Another condition is needed to make sure that this automation only applies to the specific campaign we want.
Click the Property field, then select the arrow icon next to
dialer_data
in the Useful data for your Workflow box.This will expand related keyword options. Next to
campaign
, there is another arrow icon to expand more options.From these, choose
name
. The Property box will autofill withevent.properties.dialer_data.campaign.name
.
For Operand select is equal to.
In the Value box, enter the name of the campaign this automation should apply to. Include capital letters and any spaces.
The next step is to choose an action which will happen at the end of any call from "My Campaign October" with a talk time greater than ten seconds. As an Action type, we'll choose API request.
Headers represent metadata of the request and Values represent the request body. Within the Headers and Values subsections, there can be multiple
[Key, Value]
pairs.
To include survey answers in your API request, configure the API request body property to include the survey answers.
From this point, we will need to make a small edit to the dynamic value which has populated.
The
[0]
at the end ofevent.properties.dialer_data.survey_answers[0]
represents an index of the first or "0" item in our survey. To return all answers in the field, we would use the following:
{{ event.properties.dialer_data.survey_answers | dump }}
.
This represents the parent object containing all answers, which will be transformed into readable format (refer to Jinja templating language docs).
Include any required API request components in both the Values and Headers sections of the API Request configuration, following the documentation for the external API you are using to export your survey data.
Confirm and continue
.Save
your workflow and activate it by toggling the switch at the top of the workflow setup page.
Have more questions? Contact our Support team. We're always happy to help!