Integrate your Certainly bot with Gorgias

In this article, you'll learn how to set up the Certainly chat integration with Gorgias. We'll explore how to:

You will be able to deploy this integration on any website you own. You will not be able to embed this integration on a Gorgias-based Help Center, as Gorgias does not allow third-party scripts on help centers it hosts. 

Integrate with Gorgias Live Chat

This integration allows your Certainly chatbot to seamlessly hand over a live conversation to Gorgias. Your agents can pick up the conversation from the Gorgias platform and chat in real time with the visitor to solve the claim. 

Check out a video of the solution below:

Below, we'll explain how to set up the handover and deploy the integration on your website: 

Configure the handover to Gorgias Live Chat

  1. Create the following rule on the Gorgias platform:
    mceclip0.png

  2. Inside your Certainly chatbot, configure a trigger for the handover as follows:
    mceclip1.png
    This means that as soon as the bot lands on the next Module, the handover to Gorgias Chat will be executed.

  3. (Optional) It is a good idea to update your visitors in case human agents are taking a long time to pick up the chat in real time. You can set up a rule like the one below:
    mceclip3.png

    Enabling the rule above will result in the following behavior:
    mceclip1.png

Deploy the Live Chat integration on your website

Lastly, you need to deploy both Gorgias Chat and Certainly on your website.

Shopify theme

If your website is running on Shopify, please embed the following snippet into your theme.liquid file. Make sure you replace the Gorgias Chat script with your own, and replace the Certainly bot ID with your own:

html
<!--Gorgias Chat Widget Start-->
<script id="gorgias-chat-widget-install-v2" src="https://config.gorgias.chat/gorgias-chat-bundle-loader.js?applicationId=8611"></script>
<!--Gorgias Chat Widget End-->


<!--Certainly Widget Start-->
<script src="https://app.certainly.io/sdk/webchat.js"></script>
<script>
var certainly_settings = {
id: "d56d3bcd-8d79-4311-a808-cc0ecc8dcf1a", // Your own Certainly Chatbot Deployment ID
mode: "clear_past_conversations",
inputType: "bottom"
}

// The following passes Shopify user metadata to Certainly, if the user is behind login

initCertainlyWidget(certainly_settings);
</script>
<!--Certainly Widget End-->


<!--Gorgias extension for Certainly-->
<script src="https://scripts.certainly.io/extensions/gorgias/gorgias.js"></script>
<!--Gorgias extension for Certainly End-->

Other websites

If you are not running on Shopify, please embed the following snippet into your website. Make sure you replace the Gorgias Chat script with your own, and replace the Certainly bot ID with your own:

html
<!--Gorgias Chat Widget Start-->
<script id="gorgias-chat-widget-install-v2" src="https://config.gorgias.chat/gorgias-chat-bundle-loader.js?applicationId=8611"></script>
<!--Gorgias Chat Widget End-->

<!--Certainly Widget Start-->
<script src="https://app.certainly.io/sdk/webchat.js"></script>
<script>
var certainly_settings= {
id: "d56d3bcd-8d79-4311-a808-cc0ecc8dcf1a",
mode: "clear_past_conversations",
cvars: {
   // You can pass visitor metadata here
},
inputType: "bottom"
});
initCertainlyWidget(certainly_settings);
</script>
<!--Certainly Widget End-->

<!--Gorgias extension for Certainly-->
<script src="https://scripts.certainly.io/extensions/gorgias/gorgias.js"></script>
<!--Gorgias extension for Certainly End-->

To deploy on a Gorgias HelpCenter, Navigate to Settings > HelpCenter > Customization. Enable "Use custom footer" and paste the snippet above. Make sure you replace the Certainly bot ID with your own
mceclip0.png

 

That's it! Your Certainly chatbot is now ready to hand visitors over to Gorgias agents. If you encounter any problems in the configuration, just reach out to our Customer Success team.

Integrate with Gorgias Email Support

Once complete, this integration will allow your chatbot to create an email conversation on behalf of the visitor as a ticket in the Gorgias platform. This way, your Certainly bot will always act as your first level of support, while your human agents only intervene via email when needed.

Check out a video of the solution:

Below, we'll explain how to set up and test the handover:

Configure the handover to Gorgias Email Support

  1. On Gorgias, create a new agent with admin permissions. Name the agent "Certainly Chatbot" or similar. This agent will be used by Certainly when forwarding tickets to your support agents.

  2. Generate an API Key for the chatbot agent. This API Key will be used to authenticate Certainly Webhook requests to your Gorgias account. Read more about how to develop a Gorgias API Key in their documentation.

  3. You'll need to configure your bot on the Certainly Platform. Following the steps below, your chatbot will be ready to create and update email conversations when the end user needs it.
    Picture_1.png

  4. Save and publish your Certainly bot using the appropriate buttons in the Navigation bar at the top of your bot canvas:
    Picture_2.png

  5. Create an Instance of the wh_iconGorgias Transfer Ticket Create Webhook Template.
    • Fill in the Authorization field with the Gorgias API Key. See Requirement 2 above for how to obtain a Gorgias API Key. 
    • Fill in the “domain” field with the right domain from your Gorgias account environment. (e.g.: “dev-certainly”)
      Picture_3-1.png

  6. Create an Instance of the wh_iconGorgias Transfer Ticket Update Webhook Template.
    • Fill in the Authorization field with the Gorgias API Key. See Requirement 2 above for how to obtain a Gorgias API Key. 
    • Fill in the “domain” field with the right domain from your Gorgias account environment. (e.g.: “dev-certainly”)
      Picture_3-1.png

  7. Create an Instance of the wh_iconCertainly Get Conversation History Webhook Template. This Webhook does not require any additional configuration.

  8. Create an Instance of the wh_iconGorgias Transfer Update Ticket Conversation History Webhook Template.
    • Fill in the Authorization field with the Gorgias API Key. See Requirement 2 above for how to obtain a Gorgias API Key. 
    • Fill in the “domain” field with the right domain from your Gorgias account environment. (e.g.: “dev-certainly”)
      Picture_3-1.png

  9. Navigate to your chatbot canvas and refresh the webpage. Otherwise, you will not be able to see the newly created Webhooks.

  10. You will find multiple connections. The first one is a set of Custom Variables needed for the first Ticket Creation. Insert your Webhook instance wh_iconGorgias Transfer Ticket Create inside the <md>Gorgias Ticket Create Module.

    It should look like this:
    Picture_4.png

  11. Insert your Webhook instance wh_iconGorgias Ticket Update inside the <md>Gorgias Ticket Update Module. You can also update tags and status on this step if needed.

    It should look like this:
    Picture_5.png

    and like this:
    Picture_6.png

  12. After the conversation has reached a step where the issue is either solved or needs to be handed over, updating the ticket with the chat transcript is needed for agents to get a full grasp of the matter. We can do it by inserting the wh_iconCertainly Get Conversation History and wh_iconGorgias Transfer Update Ticket Conversation History Webhooks to the <md>Sending Open Ticket Info and <md>Gorgias Ticket Conversation History Update Modules.

    It should look like this:
    Picture_7.png

    and like this:

    Picture_8.png

    Note: The reason the Webhooks (wh_iconCertainly Get Conversation History and wh_iconGorgias Transfer Update Conversation History) are separated is that it might take a few seconds for it to fetch the chat information, and we want them to happen in two separate actions to allow time between them.

  13. Save and publish your Certainly bot using the appropriate buttons in the Navigation bar at the top of your bot canvas.

    Picture_2.png

Test the handover to email

Once the setup is complete, we suggest running a test to make sure everything is working properly.

  • When the user selects a topic, creating a ticket should look like this:

    Picture_9.png

*(Email, status (open/closed), tags, and text body are needed)*

  • When the question is answered and the user marks it as helpful, the ticket is updated. It should look like this:Picture_10.png
  • After prompting if they need any more help, regardless of the answer, the conversation gets updated as well. It should look like this:Picture_11.png
  • Lastly, if the user needs to be handed over to a human agent, the ticket status gets updated to Open, and the tags are updated as well. The bot flow should be set up to ask for name and email to create an email conversation for the agent to get in contact. It should look like this:Picture_12.png

Great work - now your bot is fully integrated with Gorgias! If you encounter any problems in the configuration, just reach out to our Customer Success team.