Below is an instruction guide that describes the process of adding a chatbot to a Shopify store and integrating it with the API to enable integration.
- 1. Install chatbot on Shopify store
- Obtain code snippet
- Install chatbot on shopify store
- 2. Integrate chatbot with Shopify API
- Create integration in Shopify Store
- Generate API Key in Shopify Store
- Activate integration for your chatbot.
1. Install chatbot on Shopify store
Obtain code snippet
Log in to ChatLab, select the chatbot that you will embed and click on it
- Click on “Add to website”
- Choose between widget and iframe
- Click “Copy to clipboard”
Install chatbot on shopify store
Login to you administration panel and go to `Sales channels - Themes` under `Online Store` section
Click three little dots for more theme actions - and select `Edit code`
Find ‘theme.liquid’ section under layout, open it and paste the widget code obtained in first step within the <head> </head> section. Once done click the ‘Save” button.
2. Integrate chatbot with Shopify API
To connect your Shopify store with Chatlab, you'll need your store's URL and an API access token. This guide will show you how to generate and locate the API token in your Shopify store.
Create integration in Shopify Store
Go to Settings → Apps and sales channels
Choose 'Develop apps’.
On ‘App Development’ page click ‘Create an app’
Provide a custom name and click ‘Create app’
Once created - configure access for chatbot - Click ‘Configure Admin API scopes’
Under "Admin API access scopes" find the permissions read_orders
and read_products
and click to tick the box for each, then click the 'Save' button.
Generate API Key in Shopify Store
Navigage to the API credentials tab and click ‘Install app’
Confirm the installation by clicking on 'Install' in the window that appears.
When your Admin API Access Token has been generated click on 'Reveal token once' and copy your token.
The other thing which is requried to integrate with chatbot is the subdomain of your store. You can find it easily on the top of the administration menu. For example, the subdomain might be ‘19d511-4a’.
Activate integration for your chatbot.
Login to chatlab admin console , select the bot and go to Integrations tab.
Navigate to ‘Shopify’ section, enable integration with shopify by switching it on and provide token and subdomain you obtained in previous steps.
Afterward click ‘Update Chatbot’ button. It will save changes and test integration. You should receive a confirmation message indicating the integration works properly.