Integrate your Codemonkey bot with Gorgias

In this article, you'll learn how to set up the Codemonkey 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 Codemonkey 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 Codemonkey 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 Codemonkey 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 Codemonkey bot ID with your own:

 

Gorgias Help Center

Navigate to Settings > HelpCenter > Customization. Enable "Use custom footer" and paste the following snippet. Make sure you replace the Codemonkey bot ID with your own:

 

You should have something similar to this:

mceclip0.png

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 Codemonkey bot ID with your own:

 

That's it! Your Codemonkey 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 Codemonkey 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 "Codemonkey Chatbot" or similar. This agent will be used by Codemonkey when forwarding tickets to your support agents.

  2. Generate an API Key for the chatbot agent. This API Key will be used to authenticate Codemonkey 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 Codemonkey 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 Codemonkey 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>Gorgias 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>Gorgias 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>Codemonkey Get Conversation History Webhook Template. This Webhook does not require any additional configuration.

  8. Create an Instance of the <wh>Gorgias 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>Gorgias Transfer Ticket Create inside the <md>Gorgias Ticket Create Module.

    It should look like this:
    Picture_4.png

  11. Insert your Webhook instance <wh>Gorgias 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>Codemonkey Get Conversation History and <wh>Gorgias 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>Codemonkey Get Conversation History and <wh>Gorgias 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 Codemonkey 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.

Was this article helpful?

0 out of 0 found this helpful
Have more questions? Submit a request

Comments (0 comments)

Please sign in to leave a comment.