Gorgias logo
Gorgias logo

All articles

CertainlyUpdated 2 months ago

This integration was built by our partners and the wait time in case of any technical issues might be a bit longer than for a regular support request.


Certainly is a Conversational AI Platform made for e-commerce and customer service - it's a conversational interface that improves customer experience, drives organizational efficiency, and clears the way for more meaningful dialogues between a company's employees and their customers.

With the Certainly/Gorgias integration, you can integrate the Certainly chatbot with Gorgias Chat and hand a chatter over to a Gorgias live agent when needed. Your agents can pick up the conversation from the Gorgias platform and chat in real-time with the visitor.

Additionally, you can configure an answer within Certainly to create a ticket in Gorgias.



Steps

Integrate with Gorgias Live Chat

1. Create the following Rule in Gorgias:

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

3. Lastly, you have to deploy the Gorgias Chat and Certainly on your website. 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:

1<script id="gorgias-chat-widget-install-v2" src="https://config.gorgias.chat/gorgias-chat-bundle-loader.js?applicationId=8611"></script>
2
3
4
5<script src="https://app.certainly.io/sdk/webchat.js"></script>
6<script>
7var certainly_settings = {
8       id: "d56d3bcd-8d79-4311-a808-cc0ecc8dcf1a", // Your own Certainly Chatbot Deployment ID
9       mode: "clear_past_conversations",
10       inputType: "bottom"
11      }
12 // The following passes Shopify user metadata to Certainly, if the user is behind login  {% if customer -%} 
13  certainly_settings.cvars = {
14      customer_name: "{{customer.name}}",
15      customer_email: "{{customer.email}}",
16      customer_id: "{{customer.id}}",
17      customer_orders: "{% for order in customer.orders %}{{ order.id }}{% if forloop.last == false%},{% endif %}{% endfor %}"
18  }
19  {%- endif %}
20  initCertainlyWidget(certainly_settings);
21</script>
22
23
24
25<script src="https://scripts.certainly.io/extensions/gorgias/gorgias_switch.js"></script>

If you aren't running 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:

1<script id="gorgias-chat-widget-install-v2" src="https://config.gorgias.chat/gorgias-chat-bundle-loader.js?applicationId=8611"></script>
2
3
4
5
6<script src="https://app.certainly.io/sdk/webchat.js"></script>
7<script>
8initCertainlyWidget({
9 id: "d56d3bcd-8d79-4311-a808-cc0ecc8dcf1a",
10 mode: "clear_past_conversations",
11 cvars: {
12 // You can pass visitor metadata here
13 },
14 inputType: "bottom"
15});
16</script>
17
18
19
20
21<script src="https://scripts.certainly.io/extensions/gorgias/gorgias_switch.js"></script>
22
23

4. (Optional) It's a good idea to send an update to your visitors, in case human agents are taking a long time to pick up the Chat. You can set up a Rule like the one below:

Enabling the Rule above will result in the following behavior:


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 Gorgias. This way, your Certainly bot will always act as your first level of support, while your human agents only intervene via email when needed.

1. In Gorgias, create a new agent with admin permissions - you can name it Certainly Chatbot. This agent will be used by Certainly when forwarding tickets to your support agents.

2. Generate an API Key for the chatbot agent which will be used to authenticate Certainly Webhook requests to your Gorgias account.

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 as needed.

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

5. Create an Instance of the WHGorgias Transfer Ticket Create Webhook Template.

  • Fill in the Authorization field with the Gorgias API Key. Please refer to step #2 above for how to obtain a Gorgias API Key.
  • Fill in the domain field with the right domain from your Gorgias account environment. (like dev-certainly)

6. Create an Instance of the WHGorgias Transfer Ticket Update Webhook Template.

  • Fill in the Authorization field with the Gorgias API Key. Please refer to step #2 above for how to obtain a Gorgias API Key.
  • Fill in the domain field with the right domain from your Gorgias account environment. (like dev-certainly)

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

8. Create an Instance of the WHGorgias Transfer Update Ticket Conversation History Webhook Template.

  • Fill in the Authorization field with the Gorgias API Key. Please refer to step #2 above for how to obtain a Gorgias API Key.
  • Fill in the domain field with the right domain from your Gorgias account environment. (like dev-certainly)

9. Navigate to your chatbot canvas and refresh the webpage, otherwise, you won't be able to see the newly created Webhooks.

10. You'll find multiple connections - the first one is a set of custom variables needed for the first ticket creation. Insert your Webhook instance WHGorgias Transfer Ticket Create inside the module MGorgias Ticket Create.

11. Insert your Webhook instance WHGorgias Ticket Update inside the MGorgias Ticket Update module. You can also update tags and status on this step if needed.

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 the full context of the conversation. 

You can achieve this by inserting the Webhooks WHCertainly Get Conversation History and WHGorgias Transfer Update Ticket Conversation History to the modules MSending Open Ticket Info and MGorgias Ticket Conversation History Update

The reason the Webhooks (WHCertainly Get Conversation History and WHGorgias Transfer Update Conversation History) are separated is that it might take a few seconds for them to fetch the Chat information, so we want them to happen in two separate actions to allow some 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.


Test the handover to email

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

  • The user selects a topic, creating a ticket.
  • 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.
  • After prompting if they need any more help, regardless of the answer, the conversation gets updated as well.
  • Lastly, if the chatter 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 the name and the email to create an email conversation for the agent to get in contact.
Was this article helpful?
Yes
No