Embed a Feedback Management Survey in Digital Chat

You can configure a Feedback Management survey for contacts to take at the end of a Digital Experience interaction. For any Digital Experience channel, you can create a link to the survey. For chat interactions, you can make the survey appear directly in the chat window at the end of the interaction using an iFrame. For these embedded chat surveys, the contact can return to the survey via a link if they close the window without completing it. Chat transcripts only show the link text so that agents cannot take the survey on behalf of the contact.

If you want to embed a Feedback Management survey into the digital chat window, you must first contact your CXone Account Representative to enable it for you.

Complete each of these tasks in the order given.

Create the Survey in Feedback Management

Create a web survey in Feedback Management. As you do so, follow these important guidelines: 

  • For tokens and logic, only use contact fields that the digital chat page can send to you. These include: 

    • Case ID

    • Channel ID

    • Channel Name

    • Agent Name

    • Locale Code

  • Add translations as usual.

  • As you style the survey, ensure that the survey components you choose fit a narrow screen. The default width for digital chat is 228 pixels. If you must include a scale question, choose one of the following best practices to save horizontal space:

    • Use stars for satisfaction scores. They are a universally understood survey option.

    • Use anchor labels for the first and last options. If you use an odd number scale, also add a middle label.

    • If you must label each option in the scale, use a vertical scale.

Copy the Survey Link in Feedback Management

These instructions describe how to create and copy a survey link to use in a Digital Experience interaction. For more details about personalized links, see Distribute Your Survey Using a Link.

  1. In Feedback Management, open the survey.

  2. Go to DistributeVia Link.

  3. Click Create.

  4. Make sure the for Language drop-down is set to All.

  5. Select Yes, ask contacts to complete contact information fields. This is required for personalized surveys.

  6. Click Manage Contact Fields. Customize the contact fields as needed. The contact field names will appear in reporting. When you create a contact field, provide an internal name. Copy the internal name you choose for later use. You can only use the following variables in your integration with Digital Experience:

    • Case ID

    • Channel ID

    • Channel Name

    • Agent Name

    • Locale Code

    Mark your contact fields as Not Mandatory. This prevents the contact from being asked for a value when one isn't available.

  7. Publish the survey.

  8. Click Copy Link.

  9. Save the link somewhere to use later.

Configure the Survey to Display in the Contact's Language

If a contact's language is specified in their browser setting or in a selection on your website, you can make digital chat present the chat and survey in the contact's language. You do this by creating a custom field to store the contact's locale code in the JavaScript of the webpage where digital chat is available. Learn more about customizing your chat channel with JavaScript.

The locale code passes to Feedback Management in the selectedLanguage parameter in the URL. For example, US English would appear in the URL as: &selectedLanguage=en_US. You can find the list of Feedback Management locale codes in the Feedback Management online help.

  1. Click the app selector and select ACD.

  2. Go to DFOCustom Fields.

  3. Click Create new custom field for Case.

  4. On the Create new custom field for posts page, do the following: 

    1. Enter locale as the ident. This is the internal name that's used in the database. It must be all lowercase with no spaces.

    2. Enter Locale Code as the Label. This is the external name that shows in the customer card details.

    3. From the Type drop-down, select Text.

    4. Toggle Is visible in post detail to Yes.

    5. Toggle Is editable to No.

  5. Click Save.

  6. Set up the JS API of the webpage containing digital chat to populate the value of the locale code according to the instructions in the Chat Information JavaScript help. To do this, define the value of a case custom field. For example:

    brandembassy('init', 1016, 'chat_029feb55-88d0-4c51-92cb-8040d28233fa','es_AR'); 
    	brandembassy('setCaseCustomField', 'locale', 'es_AR'); 

    The URL in the Digital Experience job configuration page will look similar to this: 

    https://acme.satmetrix.com/surveyui/?p=MTIAAAAAAAAAAAAAi7%2F5CunIpvhhVWGG6bxPNgdYNq8gA%2BupEkLi3bHq9pUdSZve8d2BX078muJk3lxOwqOTMWOl%2BMKFtPBesYJui0HLNfzlUD5D7DhDPTlXt3JJd3M1Ao89cp5mop8vghqeCZNpUyU0OxEpgWqe7vJBhPNpMXKB89PvMm9uerI6T%2F2IElkSi1FjYMFcB%2BMzCSluAJQBSzJANUB%2F9iA1QqYT&type=link&interaction_id={{{caseId}}}&cxone_contact_id={{{caseId}}}&post_id={{{postId}}}&agent_name={{{ownerAssignee}}}&skill_id={{{channelId}}}&skill_name={{{channelName}}}&agent_nickname={{{nickname}}}&cxone_agent_id={{{userHubUserId}}}&language_selection_enabled=Y&selectedLanguage={{{contact.customFields.locale}}}

    The URL with populated values will look similar to this:

    https://acme.satmetrix.com/surveyui/?p=MTIAAAAAAAAAAAAAi7%2F5CunIpvhhVWGG6bxPNgdYNq8gA%2BupEkLi3bHq9pUdSZve8d2BX078muJk3lxOwqOTMWOl%2BMKFtPBesYJui0HLNfzlUD5D7DhDPTlXt3JJd3M1Ao89cp5mop8vghqeCZNpUyU0OxEpgWqe7vJBhPNpMXKB89PvMm9uerI6T%2F2IElkSi1FjYMFcB%2BMzCSluAJQBSzJANUB%2F9iA1QqYT&type=link&interaction_id={{{caseId}}}&cxone_contact_id={{{caseId}}}&post_id={{{postId}}}&agent_name={{{ownerAssignee}}}&skill_id={{{channelId}}}&skill_name={{{channelName}}}&agent_nickname={{{nickname}}}&cxone_agent_id={{{userHubUserId}}}&language_selection_enabled=Y&selectedLanguage=es_AR

Embed Feedback Management Survey in Digital Chat

Now you must automate presenting the Feedback Management survey using workflow automation. To do this, you need to set up: 

  1. A job that offers the survey

  2. Triggers that define when the job offers the survey.

Triggers consist of an event and one or more conditions. You configure a job with a trigger so that Digital Experience knows when to execute the job. If you don't set any conditions, the job runs every time the chosen event occurs. When a trigger has multiple sets of conditions, Digital Experience executes the same job for each of those conditions. If you want different jobs to execute for different conditions, you need to create a separate trigger for each condition. You can learn more on the Satisfaction Surveys page.

  1. Click the app selector and select ACD.
  2. Go to DFOAutomation Jobs.
  3. Click Add.
  4. Give the job a Name. In the Action drop-down, select Send satisfaction survey.
  5. Set the Satisfaction survey type to 3rd party provider.
  6. In the 3rd party provider URL field, enter the link to your Feedback Management survey you copied and saved earlier.

    • You can append the following parameters to the end of your URL as needed: 

      Variable Name Syntax
      CXone contact ID / Interaction ID {{{caseId}}}

      Agent

      {{{ownerAssignee}}}

      Channel Name {{{channelName}}}
      Channel ID / Point of Contact {{{channelId}}}
      Locale Code {{{contact.customFields.surveylang}}}
    • In your custom link syntax, use the contact field Internal Name from Feedback Management. You can find this in the Internal Name column on the ContactsContact Fields page. Be careful to use the exact spelling.

      The Internal Name for passing the locale code is always selectedLanguage.

    • For each contact field value you want to pass to Feedback Management, add this syntax to the end of the URL: 

      &[FMInternalName]=[DFOVariable]

      For example:

      https://cx09.staging.satmetrix.com/surveyui/?p=MTIAAAAAAAAAAAAAsIkQ3ufFuiZ7hQ58zYC5Zo6%2FN9TW0wn9gmeYcajEabQDVWncw4rTeeHgH7ZrW%2F4E3Eu43NqxJp8uN0orP%2FC5Nrq54xoR2wfPWzmg08RX3%2FCkxkcisU%2F4YOs7oKklJpfNEb8JzaWuuGZAN8CZEkIIHfFX06PnZWzRQRhrZQffnbdic32HJthqZ4be&type=link&selectedLanguage={{{contact.customFields.surveylang}}&interaction_id={{{caseId}}}&agent_owner_assignee={{{ownerAssignee}}}&channel_id={{{channelId}}}&channel_name={{{channelName}}}&agent={{{Nickname}}}
  7. To enable the survey to display in an iFrame in the chat window, select the Plugin content checkbox. Now select the Display in iframe in chat window checkbox.

  8. Click Save.

  9. In the left navigation pane, go to DFOAutomation Triggers.

  10. Click Add Trigger.

  11. Enter a Name for the trigger. Select Before case closed from the Event drop-down. If you want the job to run a certain amount of time after the event occurs, enter the number of seconds in the Delayed execution text box. Select the Folder you want to save the trigger in. Click Save.

  12. On the Detail page for the trigger, click Add existing job. From the drop-down, select the job you just created. Click Add.

  13. In the Conditions section of the Detail page for the trigger, click Add Condition. If you configured a delay for the trigger, click Add Condition in the Delayed conditions section instead. Select conditions you want met before the trigger can execute the job.

    Click Save.

  14. When you're ready to begin including the survey in digital chat windows, go to the trigger Detail page and click Activate.

The survey now appears in an iFrame of any digital chat window when all your defined trigger conditions are met.

Troubleshoot Issues

You receive the error message "We are sorry, but the system experienced an unexpected error. Please try again later."

The custom link to the Feedback Management survey you configured in your Digital Experience job may have invalid syntax. Review the URL syntax. If you can't find the problem, copy the URL into a browser window and build the variables one by one to isolate the problem.

You don't see updates you made to your survey

Publish the survey again.