Configuring SIP transfer

To transfer callers to Mindful Feedback via SIP, you will need to configure several items in Genesys Cloud:

  • A Secure Call Flow in Genesys Architect to set UUI data and transfer calls to Mindful Feedback

  • An Agent Script to provide a button for agents to transfer calls to the Secure Call Flow

  • (Optional) A method to allow agents to bypass surveys for outbound calls that reached voicemail

Note:

The following should already be configured in your Genesys Cloud environment:

  • A SIP Trunk to Mindful Feedback
  • An outbound call route that uses the configured SIP trunk
  • A phone number configured in the dial plan to use the outbound route

Use the steps in this article to complete the required configuration.

Acquire a SIP Survey Token

To configure the Secure Call Flow, you will need the SIP Survey Token for the survey you wish to play after transferring a call to Mindful Feedback. You can find this token in the Mindful Feedback user interface at Surveys > Your survey > Advanced tab:

Screen capture of Survey Advanced tab with Sip survey token/UUID section highlighted
Note:
  • Your Mindful Feedback representative may have provided you with this SIP Survey Token already. If you do not have access to the Survey Management page and you need your token, contact the Mindful Feedback team.
  • If you need to generate a token for a new survey, click Generate token next to the SIP survey token / UUID field.

Configure a Secure Call Flow

Create a new Secure Call Flow to accomplish two tasks:

  1. Set UUI data on the call before transferring (blind) to Mindful Feedback.
  2. Transfer the call to Mindful Feedback with the UUI data attached.

Use the following steps to create the Secure Call Flow.

Screen capture of Secure Call flow

Set UUI Data Block

In Genesys Cloud Architect, add a new Secure Call Flow.

Within the new call flow, add a Set UUI Data for Transfer block and configure it with an expression in the following format:

"SDX-survey_sip_token:<sipsurveytoken>;SDX-external_ref:" + Call.ConversationId + ";SDX-respondent_language:en-US"

UUI Parameters

Mindful Feedback expects the UUI Data string to contain attributes with a prefix of SDX-, which it will parse when the call arrives. The required and optional attributes are explained in the following table:

UUI Data KeySDX AttributeDescription
SDX-survey_sip_tokenN/AREQUIRED. This is used to tell Mindful Feedback which survey to play when the call arrives. The SIP Survey Token can be found or generated on the Survey Management page.
SDX-external_refexternal_refBEST PRACTICE. Set this to the Genesys Cloud conversation ID. You can use the external_ref attribute to sync data from Genesys Cloud (agent, queue, wrap-up, etc.) onto the survey interaction record.
SDX-respondent_languagerespondent_languageOPTIONAL. You can use this to set the language of the survey if needed.
SDX-call_typecall_typeEXAMPLE. You can add this and other attributes via UUI data, but this is not recommended. Attributes will sync from Genesys Cloud after the survey via the external_ref (Conversation ID) attribute. However, in some cases, it is useful to pass other data at the time of transfer so the survey can programmatically alter its flow.

Example

The following example shows a complete expression with SDX-survey_sip_token, SDX-external_ref, and SDX-respondent_language parameters:


Screen capture of Edit expression section
Note:

If you want to play a different survey for a different queue, you can set the SIP Survey Token in the call flow to a variable and append the value to the UUI Data string. You can see this method being used with the Call.ConversationId variable in the example UUI expression in this article.

The same process would apply to setting the required language or other attributes.

Important: Language Codes

The Mindful Feedback language code does not match the Genesys Cloud language code. For example, in Genesys Cloud, US English is represented with a code of "en-us", whereas Mindful expects "en-US".

Some programmatic conversion of the customer language will be required in the Secure Call Flow before setting therespondent_language attribute in the Set UUI Data block.

For more information, refer to our API documentation for supported languages and language codes.

Passing additional conversation variables to Feedback

Genesys Cloud conversation variables are synchronized with the appropriate Feeback survey interaction after the interaction has concluded, via conversation polling. However, you may find that you need access to these variables in Feedback before the survey begins. In this case, you can pass additional data to Feedback within the Set UUI Data block to make it available immediately.

Example

As an example, you might want to give agents an opportunity to assign values to variables in an Agent Script before transferring to the Secure Flow. Since this guide discusses agent scripts later, we will detail this process, as well.

When you are ready to transfer a caller to a survey, you can add the agent-assigned variables into the Set UUI Data block by adding "ToString(Call.InvocationData)", as seen below. This will attach the data as custom attributes on the survey interaction when the interaction is created.

example set UUI data blockexample expression for the set UUI data block
"SDX-survey_sip_token:dd7ba690-5f00-11ef-b9be-2f71d9ea8fbc;SDX-external_ref:" + Call.ConversationId + ";SDX-respondent_language:en-US;SDX-survey_router:" + ToString(Call.InvocationData) +""

When the survey interaction is created, it will now contain the new custom attribute(s) with the assigned value(s), which you can then reference in survey Triggers and events to route callers to different questions based on those attributes.

Transfer to Number Block

After the Set UUI Data block, add a Transfer to Number block to transfer the caller to the SDX SIP endpoint via the configured number. The example call-flow screenshot above shows 10000 as the SIP endpoint.

Configure an Agent Script

Create a new agent script, or edit an existing script, to enable agents to transfer callers to the survey by clicking a button. In the script, add a button and set the button's action to Invoke Secure Flow with the following configuration:

  • Secure Flow: Select the call flow configured in the earlier steps.
  • Flow Data Field: You can select any field here. It is required but not used.
  • Button > Text: Add a descriptive label for the button, such as "Transfer to Survey" or "End Call".
Screen capture of Genesys Cloud Invoke Secure Flow process

That's it for the SIP transfer from Genesys Cloud to Mindful! Your agents should now be able to click a button to transfer customers to SDX for survey treatment when a conversation ends.

Passing additional conversation variables to Feedback

If you choose to provide agents with the opportunity to assign a value to a variable in the Agent Script that will be set as a survey interaction attribute in Feedback, you can do this by assigning the variable to the Flow Data Field in the "Scripter.Invoke Secure Flow" configuration, as shown below:

example of setting a flow data field

In this example, we've created a dropdown menu with options for "Yes" and "No", which the agent must select before transferring the call to a survey. This selection is assigned as the Flow Data Field, causing it to be passed to the Secure Flow within the Call.InvocationData attribute.

Note: It is only possible to pass a single variable to the Flow using the Agent Script method. If you would like to pass additional data to Feedback, you can use Set Post Flow blocks within your Secure Flow. See Configuring Automatic Transfers to Feedback Surveys for more information on this approach.

(Optional) Handle voicemail for outbound calls

When making outbound calls, agents will disconnect after hearing a voicemail greeting. Since the Secure Flow detailed in this guide invokes a survey every time, you may want to implement a way for agents to bypass the survey when disconnecting in this scenario.

Create a checkbox in the agent script

To allow an agent to bypass a survey, you can place a checkbox in the agent script, labeled something like "Voicemail Reached". Before agents disconnect, they can check that box to set a variable that will be used in the Secure Flow to determine whether or not to bypass the survey.

Note: We recommend only assigning this agent script to outbound queues, in which agents might reach voicemail. This may require duplicating the existing agent script used for inbound calls.

Use the following steps to add a checkbox and link it to a Flow variable:

  1. In the script containing the Transfer to Survey button, add a checkbox from the Components menu.

    • Label the checkbox Voicemail Reached or a similar phrase.

      example of a voicemail checkbox
  2. In the Variables tab, create a new string variable named Voicemail with the following options:


    example of a string variable
    • Type - String

    • Output - Yes

    • Input - No

  3. In the Add Components tab, under the Advanced header, set the Change Action to Scripter.Set Variable and configure the Set Variable action as shown below:

    example set variable block c
    • Variable - Enter Voicemail.

    • Insert Variable - Enter voicemail_reached.

Update the Transfer to Survey button

With the checkbox in place, an update is now needed in the Transfer to Survey button.

  1. In the Add Components tab for the button, in the Common section, open the configuration for the currently configured Click Action (Scripter.Invoke Secure Flow).

  2. Set the Flow Data Field in the Click Action to the Voicemail variable.

    example invoke secure flow block configuration
  3. Save and publish the script.

Update the Secure Flow

Lastly, open the Secure Flow in Architect that transfers customers to surveys, and make the following updates:

  1. Add a Decision block to the beginning of the Flow.

    • In the expression editor for that Decision block, set the expression to Flow.InvocationData == "voicemail_reached".

    • Send the Yes path to a Disconnect block and the No path to the existing transfer blocks (Set UUI Data and Transfer to Number)


      image of the flow adjusted with a decision block
  2. Publish the Flow when finished.

Now, if an agent selects the Voicemail Reached checkbox, the call will not be transferred to a survey.