Shopify

Integration with Shopify enables User Stories on order status through recognition of the logged-in user and retrieval of order detail information.

Technical integration

To integrate Shopify, a private application must be created to authorize access to information.

From the Shopify backend go to the Apps section, then scroll to the bottom of the page and click on the link “Working with a developer on your shop? Manage private apps.”

Click on the Create new private app button and:

  1. Give the integration a name (e.g., “Heres Chatbot”);
  2. Provide the email for reporting;
  3. Clic on See inactive permissions and allow read-only access to Customers, Orders, Products, Fullfillment services;
  4. Select API version 2021-01 or later;
  5. save the application, then in the list of private applications will be available the parameter API KEY to share with Heres together with the store name, the password, and the API access token.

Webchat integration on Shopify

To make the webchat appear on all Shopify pages, you must insert the widget, as documented in Webchat Integration. Specifically, the following steps must be followed:

  1. From the Shopify backend, activate the Themes section from the side menu;
  2. Activate the Edit Code action and open the file theme-head.liquid (if present) or theme.liquid. These sections normally contain the tags <head></head>; their position may be different depending on the theme used;
  3. Insert in head section:
<script>
(function (H, e, r, es, B, o, t) {
       H["heres-widget"] = es;
       H[es] =H[es] || function () { (H[es].q = H[es].q || []).push(arguments);};
       (o = e.createElement(r)), (t = e.getElementsByTagName(r)[0]);
       o.id = es;H.heresAgent = B;
       o.src = "https://widgetv2.heres.ai/heres.js";
       o.async = 1;
       t.parentNode.insertBefore(o, t); 
})(window, document, "script", "heres", "#NOMEAGENTE");
heres('init', { userId: "{{ customer.email }}" });
</script>

4. Replace #NOMEAGENTE by entering the agent name provided by Heres at the time of activation.

Please note: These procedures implement and clarify the normal console webchat installation procedures within the specific scope of Shopify. You can access the complete documentation here.