> ## Documentation Index
> Fetch the complete documentation index at: https://helpdocs.getthread.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set Up a SmileBack CSAT Survey with Snippets

> Build a SmileBack CSAT survey snippet in Thread that injects the Ticket ID variable into positive, neutral, and negative feedback URLs for accurate ratings.

## How to Setup a SmileBack CSAT Survey Using Snippets

Most PSA-native or integrated CSAT survey solutions provide URLs that are unique to your company, and each will tie to a Positive, Neutral or Negative response.

<Tip>
  Here is an example of a positive SmileBack survey:

  [https://feedback.smileback.io/r/7/BleO3kGDsgX\_J2ViiZknEQ/123456/1](https://feedback.smileback.io/r/7/BleO3kGDsgX_J2ViiZknEQ/123456/1)
</Tip>

The /123456/ in the above example should tie to the ID of the request in your PSA.

With **snippets**, Thread gives you the ability to place the ID you need in-URL on demand.

Use the **\{Ticket ID}** variable in your snippet to ensure each rating is tied to the right request. When the user clicks on the hyperlink for any of the 3 options, it takes them to the correct SmileBack survey page and then they're off and running.

**Here is an example that Thread uses every day:**

*Choose from the options below to rate your service experience:*

1. *\[Service magic]\(*[*https://feedback.smileback.io/r/7/YOUR\_SMILEBACK\_SURVEY\_URL/*](https://feedback.smileback.io/r/7/BleO3kGDsgX_J2ViiZknEQ/)*\{Ticket ID}/1)*
2. *\[Good service]\(*[*https://feedback.smileback.io/r/7/YOUR\_SMILEBACK\_SURVEY\_URL/*](https://feedback.smileback.io/r/7/BleO3kGDsgX_J2ViiZknEQ/)*\{Ticket ID}/0)*
3. *\["I'm not mad; just disappointed"]\(*[*https://feedback.smileback.io/r/7/YOUR\_SMILEBACK\_SURVEY\_URL/*](https://feedback.smileback.io/r/7/BleO3kGDsgX_J2ViiZknEQ/)*\{Ticket ID}/-1)*

**And here is the output presented to the user in-thread:**

<Frame>
  <img src="https://mintcdn.com/thread/XL4w2StwzALuT8Pw/images/8926346d-image.png?fit=max&auto=format&n=XL4w2StwzALuT8Pw&q=85&s=a4eb9a4770040dd5beccd8f05009b99a" alt="CSAT survey rating options rendered in-thread for the customer" width="1060" height="332" data-path="images/8926346d-image.png" />
</Frame>

*To setup your own CSAT Survey snippet, you must first get the unique URL for your company from your CSAT provider:*

**To get the unique URL for your company and create the snippet, you will need to:**

<Steps>
  <Step title="Navigate to your CSAT module">
    Navigate to your CSAT module (SmileBack, SimpleSAT, AutoTask, etc)
  </Step>

  <Step title="Grab your unique URLs">
    Grab your unique URLs
  </Step>

  <Step title="Create a new snippet">
    1. navigate to inbox
    2. click your account name in the bottom left corner
    3. click snippets
    4. click the "+ New Snippet" button
    5. Plug them in to a snippet:
           <Frame>
             <img src="https://mintcdn.com/thread/wn6TrV7GJB-j5H1g/images/cf713e33-image.png?fit=max&auto=format&n=wn6TrV7GJB-j5H1g&q=85&s=5c3c87ca2b623b6ed5b8f693a6b24618" alt="Snippet editor with the SmileBack survey URLs plugged in" width="1368" height="613" data-path="images/cf713e33-image.png" />
           </Frame>
    6. Customize the language as you wish
  </Step>

  <Step title="Enjoy higher response rates">
    Enjoy higher response rates from happier customers by surfacing your survey immediately after the session.
  </Step>
</Steps>

## How to setup an automated SmileBack CSAT survey using flows

Usually, you don't want to manually send the CSAT survey every time you are finished with a thread. So instead, you can setup a flow that will automatically send the survey when you are finished with a thread.

Take the following flow for example

<Frame>
  <img src="https://mintcdn.com/thread/XL4w2StwzALuT8Pw/images/965bd94a-image.png?fit=max&auto=format&n=XL4w2StwzALuT8Pw&q=85&s=638eefce80fde3beba3d4296a7ecfdc8" alt="Example flow that automatically sends the CSAT survey when a thread is closed" width="705" height="954" data-path="images/965bd94a-image.png" />
</Frame>

This flow will automatically send the CSAT survey once you change the status of the thread to "closed". You can change the parameters of the flow so that the survey is sent whenever you'd like.

The survey itself is made up of Markdown, which is slightly different than how we set it up using a snippet. The code looks like this:

`[Service magic](https://feedback.smileback.io/r/7/YOUR_SMILEBACK_SURVEY_URL/{Ticket ID}/1/)`

`[Good service](https://feedback.smileback.io/r/7/YOUR_SMILEBACK_SURVEY_URL/{Ticket ID}/0/`

`["I'm not mad; just disappointed"](https://feedback.smileback.io/r/7/YOUR_SMILEBACK_SURVEY_URL/{Ticket ID}/-1/)`

You can change the text to say whatever you'd like and be sure to change the custom links to your own. Once you paste this into the survey, create a test thread to ensure that it works, and everything is formatted correctly.

<Tip>
  Tip: To ensure that the customer is able to see that the survey has been sent before the thread actually reaches a "closed" status, created another status in your PSA that is used as a buffer between the survey being sent, and it being set to closed. This ensures that the customer will see the thread active in their messenger and allow them to reply to the survey.
</Tip>


## Related topics

- [CSAT Follow-Up Loop](/skill-library/qa-and-closure/csat-followup-loop.md)
- [Inbox Viewer: Navigating Views and Threads](/inbox/1-the-channel-viewer.md)
- [Thread Partner Change Management Guide](/get-started/thread-partner-change-management-guide.md)
