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
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:
- 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:
- Set UUI data on the call before transferring (blind) to Mindful Feedback.
- Transfer the call to Mindful Feedback with the UUI data attached.
Use the following steps to create the 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"
The example above configures a SIP survey token, external reference (for the Genesys Conversation ID), and a respondent language.
If you would like to pass the customer phone number along with the basic information, so that it is associated with the Feedback survey, use the following expression, instead:
"SDX-survey_sip_token:<sipsurveytoken>;SDX-external_ref:" + Call.ConversationId + ";SDX-respondent_language:en-US;SDX-phone_number:" + Replace(Call.Ani, "tel:", "")
To learn more about setting up interaction attributes, see Survey Interaction Data Model.
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 Key | SDX Attribute | Description |
---|---|---|
SDX-survey_sip_token | N/A | REQUIRED. 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_ref | external_ref | BEST 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_language | respondent_language | OPTIONAL. You can use this to set the language of the survey if needed. |
SDX-call_type | call_type | EXAMPLE. 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:
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.
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.
"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".
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:
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.
(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.
Use the following steps to add a checkbox and link it to a Flow variable:
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.
In the Variables tab, create a new string variable named Voicemail with the following options:
Type - String
Output - Yes
Input - No
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:
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.
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).
Set the Flow Data Field in the Click Action to the Voicemail variable.
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:
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)
Publish the Flow when finished.
Now, if an agent selects the Voicemail Reached checkbox, the call will not be transferred to a survey.