Triggering a survey from a Studio Flow

It is possible to trigger a survey from a Studio Flow using the Mindful Feedback functions. This can be useful in a variety of situations. For example, you could use a Studio Flow to send a survey to a customer after they have performed a self-service function.

To create a survey interaction, add a Run Function block into your Studio Flow, as in the example below:

example twilio attributes
  • SERVICE: Select Mindful Feedback.

  • ENVIRONMENT: Select survey-dynamix-environment.

  • FUNCTION: Select /create-survey-interaction

Set the function parameters needed for the survey. For more information, see the Survey Interaction Data Model and the API reference guide for Add New Interaction.

Note: Function parameter prefix - The parameter names should be prefixed with "sdx_". For example if you wish to set the survey attribute "survey_type" then you would use a parameter with the name of "sdx_survey_type".

Complete function parameter names and values are shown in the table below:

KeyValue
sdx_survey_typewebsms
sdx_CustomerNameAlexander
sdx_survey_id446
sdx_external_ref{{widgets.QueueForAgent.CallSid}}
sdx_phone_number{{trigger.call.From}}
sdx_call_typeAPI Demo

This function call would create a WebSMS survey using survey_id 446. The Call Type would be set to API Demo. The CustomerName would be set to Alexander. The Phone Number would be set to the caller's phone number and the External Reference would be set to the UUID of the Twilio call.