Freshservice

Integrate Agent Connect with Freshservice.

This integration guide describes how to integrate Medallia Agent Connect and Freshservice to send survey requests automatically when tickets are solved.

Important: Agent Connect can send surveys automatically only when the following criteria are met:
  • The team member that has resolved the ticket has an approved Agent Connect profile.

  • The customer’s record includes an email address.

  • A team member is assigned to the ticket when it is solved.

Create a "Do not send Agent Connect request" field

Since not every interaction should receive a survey, it is important to allow agents the ability to suppress surveys when needed. The following procedure creates a check box field that enables agents to prevent an Agent Connect survey from being sent when they solve a ticket:

  1. In Freshservice, open Admin > General Settings > Ticket Fields, then click Add custom field.

  2. Select "Checkbox".

  3. Name the field Do not send Agent Connect request.

  4. Drag the new field onto your ticket form, then click Save.

Create a workflow automator to email surveys automatically

Create a workflow automator that enables Agent Connect to email surveys to customers automatically when tickets in Freshservice are closed:

Note: Inform the Agent Connect team of the Freshservice channels you use, since Freshservice passes names differently (such as Email rather than email).
  1. In Freshservice, open Admin > Helpdesk Productivity > Workflow Automator, then create a new automator of the type "Ticket".

  2. Name the automator Send Agent Connect Requests.

  3. For events, specify the event "Status is changed from Any Status to Closed" and any other events needed for your team's workflow.

  4. For conditions, specify "Agent Is not None" and any other conditions needed for your team's workflow.

  5. Specify the following details for the automator's actions:

    Freshservice automator action
    • Perform these actions on — Ticket
    • "Trigger Webhook"
    • Request Type — POST
    • Callback URL — https://api.stellaconnect.net/auth
    • Require Authentication — On
    • Username — connect
    • Password — Your Agent Connect Test API Key
    • Encoding — JSON, and Advanced
    • Content — Past the following code: { "employee": { "email": "#{{ticket.agent.email}}" }, "channel": "#{{ticket.source}}", "customer": { "name": "#{{ticket.requester.name}}", {% assign customer_email = ticket.from_email | strip %} "email": {% if customer_email and customer_email != "" %} "#{{customer_email}}" {% else %} "no_email" {% endif %} }, "ext_interaction_id": "#{{ticket.id}}", "do_not_send": "#{{ticket.do_not_send_stella_connect_request}}", "external_url": "#{{ticket.url}}", "tags": [ "#{{ticket.ticket_type}}", "#{{ticket.category_def}}", "#{{ticket.sub_category_def}}" ] }
  6. Save and activate the automator.

  7. Optionally, create a scenario to automatically prevent surveys from being sent under specific conditions:
    Note: You do not need to create a scenario specifically to limit the number of surveys that a customer receives within a specific period of time. On the Company Info page, Agent Connect includes a suppression period that automatically stops surveys from flooding a customer within a specified number of days. For more information, see Company Info page.
    1. Open Admin > Helpdesk Productivity > Scenario Automations, then click New Rule.

    2. Name the scenario Do not send Agent Connect request.

    3. Specify any actions that identify the tickets affected by the scenario.

      For example, the following image shows a scenario that selects the Do not send Agent Connect request checkbox when a specific category is used on a ticket:

      Freshservice scenario for preventing a survey from being sent
    4. Save the scenario.
      Important: To make sure Freshservice checks your desired business rules before sending an Agent Connect request, order this scenario above the automator that sends requests.
  8. Optionally, make revisions to the JSON payload in the automator above to account for advanced configurations used by your company:
    • If you use multiple brands in Agent Connect, modify the JSON payload to indicate the brand for each interaction. The following example uses the email channel and a custom field on the ticket called brand: { "employee": { "email": "#{{ticket.agent.email}}" }, "channel": "#{{ticket.source}}", "customer": { "name": "#{{ticket.requester.name}}", {% assign customer_email = ticket.from_email | strip %} "email": {% if customer_email and customer_email != "" %} "#{{customer_email}}" {% else %} "no_email" {% endif %} }, "brand": "#{{ticket.brand}}", "ext_interaction_id": "#{{ticket.id}}", "do_not_send": "#{{ticket.do_not_send_stella_connect_request}}", "external_url": "#{{ticket.url}}", "tags": [ "#{{ticket.ticket_type}}", "#{{ticket.category_def}}", "#{{ticket.sub_category_def}}" ] }
    • If you use multiple languages in Agent Connect, modify the JSON payload to indicate the language code for each interaction. For information about the language codes used in Freshservice, see the List of Languages Supported in Freshservice article on the Freshservice support site. The following example uses the email channel and the ticket requester locale: { "employee": { "email": "#{{ticket.agent.email}}" }, "channel": "#{{ticket.source}}", "customer": { "name": "#{{ticket.requester.name}}", {% assign customer_email = ticket.from_email | strip %} "email": {% if customer_email and customer_email != "" %} "#{{customer_email}}" {% else %} "no_email" {% endif %} }, "language": "#{{ticket.requester.locale}}", "ext_interaction_id": "#{{ticket.id}}", "do_not_send": "#{{ticket.do_not_send_stella_connect_request}}", "external_url": "#{{ticket.url}}", "tags": [ "#{{ticket.ticket_type}}", "#{{ticket.category_def}}", "#{{ticket.sub_category_def}}" ] }

Move your integration to production

Work with the Agent Connect team to test your automated integration and resolve any issues. When everything is working as expected, move your integration to production.

  1. In Freshservice, open Admin > Helpdesk Productivity > Workflow Automator.

  2. Open the Send Agent Connect Requests automator.

  3. Change the password to your Agent Connect Production API Key (available on the Integrations page in Agent Connect).

  4. In Agent Connect, open the Integrations setup page.

  5. For each channel you integrated, switch that field on, then click Update. Integrated Channels in Stella Connect