Export Survey Answers

Using Workflow Automations, we can export survey responses from a campaign to a preferred CRM system

S
Written by Shelby Glynn
Updated over a week ago

Automation Goal: Forward survey responses from an ongoing campaign to a separate CRM or management system account.

User Level:

  • Admin


Storing Survey Answers

Contact answers to survey questions will be stored with the campaign alongside other aggregated data, like the campaign statistics. With the help of our workflow automation feature, this data can be logged for internal tracking purposes, or sent to a third party like a CRM.

Automation Setup

Steps:

  1. For 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. Define a trigger. Our trigger will be Call ended.

    1. Under Object, select call.

    2. For Action, select ended.

  2. This automation will require some conditions. The first condition will ensure that dropped calls will not be counted in the trigger.

    1. 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.

    2. Select the Operand is greater than. For Value, enter 10.

    3. 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).

  3. Another condition is needed to make sure that this automation only applies to the specific campaign we want.

    1. Click the Property field, then select the + 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 + icon to expand more options.

    2. From these, choose name. The Property box will autofill with event.properties.dialer_data.campaign.name .

    3. For Operand select is equal to.

    4. In the Value box, enter the name of the campaign this automation should apply to. Include capital letters and any spaces.

  4. 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.

    1. We need an Endpoint. It will be an API or token URL.

    2. As a Method, we choose POST, as we will be sending new data to the desired endpoint.

  5. 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.

    1. In the Values section, enter the Key survey_answers.

    2. From the Useful data for your Workflow box, choose survey_answers (located under dialer...+). The Value field should autofill with

      {{ event.properties.dialer_data.survey_answers[0] }}.

  6. From this point, we will need to make a small edit to the dynamic value which has populated.

    1. The [0] at the end of event.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 }}.

      1. This represents the parent object containing all answers, which will be transformed into readable format (refer to Jinja templating language docs).

  7. Save and make sure the workflow is set to active. You can always toggle this on or off.

When it comes to Headers... Different endpoints will have different requirements. Check the API docs for your CRM to find out if you need to include additional keys, authorization tokens, or content type headers.


Have more questions? Contact our Support team. We're always happy to help!

Did this answer your question?