Skip to main content
Join the Agentforce Hackathon on Nov. 18-19 to compete for a $20,000 Grand Prize. Sign up now. Terms apply.

Gather Post-Chat Feedback and Embed Surveys in a Website

Set Up a Survey for Web Chat Feedback

Ursa Major Solar has a chat window embedded on their website. Maria had set up web chat a few years ago while implementing Service Cloud for Ursa Major Solar’s support team. Back then she only associated chats with the Contact record of the customers. Now, to get a better view of the customer feedback received for a chat session, Maria wants to associate a chat with the Contact record of the customer and the Case record that’s created for each chat session.

This will help her to use the Survey Invitation and Responses related list to view the feedback provided for each Case record. (There’s more about this a little later in the project.)

Since the older web chat setup is already live, Maria decides against editing that one. Instead, she chooses to create a new web chat setup and replace the older one. Maria must allow Ursa Major Solar’s website to inline frame (iframe) surveys within the website.

Allow Website to Iframe Surveys

The address of Ursa Major Solar’s website is https://www.ursamajorsolarexample.com. This website must be allowlisted by Maria. Once a website is allowlisted, surveys can be hosted within the chat window embedded on the website.

  1. Click Setup and select Setup.
  2. Enter Session Settings in the Quick Find box, and select Session Settings.
  3. Navigate to the Trusted Domains for Inline Frames section.
  4. Click Add Domain.
  5. Enter https://www.ursamajorsolarexample.com as the Domain.
  6. Select Surveys as the IFrame Type.

Allowlist domain to allow inline framing of surveys within chat window.

  1. Click Save.

Set Up Web Chat

Maria is excited to use the guided Chat setup flow. The guided flow will help her set up web chat within minutes.

  1. Click Setup and select Service Setup.
  2. Click View All

View All option in Service Setup.

  1. Search and select Chat with Customers.
  2. Click Start.
  3. Provide the chat queue details.
    • Queue Name: Support Chat
    • Name This Group: Chat with Support Team
    • Select yourself as a member.
  1. Click Next.
  2. If you see the Prioritize Chats screen, enter the routing configuration name as Support Chat, give it a priority of 1, then click Next.
    If you don’t see the Prioritize Chats screen, skip to step 8.
  3. Keep the default work item size and agent capacity, and click Next.
  4. Provide the following website details:
    • Website URL: https://www.ursamajorsolarexample.com
    • Salesforce Site Domain: your initials + today’s date (MMDDYY)
  1. Select I have read and accept the Salesforce site Terms of Use.
  2. Click Next.
  3. Select Service.
    This allows the association of chats with Case records and Contact records.Service selected as Chat type.
  4. Click Next.
  5. Skip offline support, and click Next.
    Ursa Major Solar’s support team currently doesn’t provide offline support.
  6. Don’t copy the code snippet, we haven’t selected the post-chat survey yet.
  7. Click Next.
  8. Click Done.

Select a Post-Chat Survey

Finally the moment has arrived for Maria. She is one simple step away from setting up web chat to gather post-chat feedback. The guided setup flow automatically creates an embedded service deployment. She just needs to select the post-chat survey in the embedded service.

  1. Click Post-Chat Feedback selected in Chat Settings. and select Setup.
  2. Enter Embedded Service Deployments in the Quick Find box, and select Embedded Service Deployments.
  3. Click Dropdown icon next to Chat with Support Team.
  4. Click View.
  5. Click Edit next to Chat Settings.
  6. In the Chat Settings header, click Edit.
  7. In the Post-Chat Settings section, select the Post-Chat Feedback survey.Post-Chat Feedback selected in Chat Settings.
  8. Click Save.

Maria can open the Chat with Support Team embedded service at any time and copy the code snippet from the Embedded Service Code Snippets section.

Viewing Post-Chat Feedback

A survey invitation record is created every time a customer decides to provide feedback. A response record is created after that customer submits the survey. The invitation and response records are associated with the Case record that is created for the chat session.

Maria adds the Surveys Invitations and Responses related list to the Case object’s page layouts. This related list can be used to view the invitation and the response details.

Note

To learn more about how Maria adds the Surveys Invitations and Responses related list, see the View Case Survey feedback section of the Begin and Close Cases with Survey Invitations unit in the Salesforce Surveys for Admins module.

Since the Case record is also associated with the customer's Contact record, it’s easy to figure out who provided the responses. These associations will also help Maria when she creates reports and dashboards for post-chat feedback.

Embed Surveys in a Web Page

Embedding a survey on the Ursa Major website enables the support team to gather responses from visitors about their browsing experience, product support experience, and so on. The embedded survey becomes a natural part of the site as visitors can participate in it without leaving the site or opening a new window.

Note

You won’t be tested on these steps.

To embed a survey in the Ursa Major website, Maria adds the URL of the website that hosts the survey as a trusted website. She then generates a survey invitation, and adds the following tag in the html code of the web page. 

<iframe src="embed_the_survey_invitation_url"></iframe>

Better Participant Experience and Improved Org Integration

Mission accomplished. Maria has set up a survey to gather post-chat feedback without writing a single line of code. Along the way, she also created a dedicated survey to gather post-chat feedback. The survey contains merge fields that provide Ursa Major Solar’s customers a personalized experience. She also created two survey data maps. One creates new opportunities for the sales team every time customers indicate that they are interested in buying another product. Another updates the case records with the rating provided by the customer for the support agent they interacted with.

Maria is off to show off the survey to her management, sales, and support teams.

Resources

Salesforce ヘルプで Trailhead のフィードバックを共有してください。

Trailhead についての感想をお聞かせください。[Salesforce ヘルプ] サイトから新しいフィードバックフォームにいつでもアクセスできるようになりました。

詳細はこちら フィードバックの共有に進む