Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

With the Shopify Skill, you can interact with a digital person while browsing a Shopify website.

Overview

With the Shopify Skill, you can interact with a digital person while browsing a Shopify website. This skill is intended to be used with the digital person embedded into the website as a web widget. With this skill, users can search for products and then navigate to the page of the item. The user can ask questions about a product, such as: “What sizes does this come in?”, “Is black available?”. The user can ask to see their cart, and the skill will navigate to the user’s cart. If the user is on a product page, they can request it to be added to their cart.

Limitations

  1. Searching for products is relatively limited due to constraints from the Shopify API Predictive Search endpoint. If a query does not yield any results, try rewording your request.

  2. Product related questions are currently limited to just size and color.

  3. When adding a product to cart, the skill will only add the item with the currently selected size, color, and quantity that is visible on the web page. It can only add a product if the user is currently on the product’s web page.

Skill Demo

Screen Recording 2022-12-13 at 12.18.38 PM.mov

Configurations

Provide the following information in the Shopify Skill configuration screen in Digital DNA Studio. See Adding Skills to your Digital Person for detailed instructions:

Field

Type

Description

ACCESS TOKEN TO USE THE SHOPIFY API

REQUIRED

TEXT

Enter your Shopify API key.
Example: ‘shwer_i4hoyvg1y23cu1235by4bk1'

WEB ADDRESS TO THE STORE

REQUIRED

TEXT

Example: ‘http://example.myshopify.com

TEXT TO READ TO THE USER WHEN THE USER WANTS TO SEARCH FOR A PRODUCT

TEXT

Hi, what are you looking for?

TEXT TO READ TO THE USER WHEN THE PRODUCT IS FOUND

TEXT

Here's what I found.

TEXT TO READ TO THE USER WHEN THE PRODUCT IS NOT FOUND

TEXT

Sorry, I was not able to find that product.

TEXT TO READ TO THE USER WHEN AN ITEM IS ADDED TO THE CART

TEXT

The item has been added to your cart. Can I help you find anything else?

TEXT TO READ TO THE USER WHEN THEY WANT TO VIEW THEIR CART

TEXT

This is what's currently in your cart.

TEXT TO READ TO THE USER WHEN THE DP DOESN’T UNDERSTAND THEM

TEXT

Sorry, I did not understand that.

Obtaining Access Token for Shopify API

  1. Obtain Admin access for the Shopify store you wish to create an access token for. Then navigate to https://<your_store>.myshopify.com/admin. Navigate to the Apps and sales channels. Then click on ‘Develop Apps’.

  2. Click ‘Create an app’. Give it a name, choose yourself as the developer and then click ‘Create app’. You will be taken to a page for the app you just created.

  3. Click ‘Configure Admin API scopes’. You will be able to check boxes for the scopes you want the access token to be able to access. The ones needed for this skill are ‘read_products’, ‘read_product_listings’. Then click ‘Save’.

  4. Navigate to ‘API credentials’ and you should see a section titled ‘Access Tokens’ and a button right under it that says ‘Install App’. Click that button and then ‘Install’ in the next popup. Now in the same section, your API access token is revealed. Make sure you save it somewhere, as you will not see it again and will need to repeat this entire process if you lose the token.

Setting up Shopify Template

  1. From your Shopify admin, go to Online Store > Themes.

  2. Choose the theme you would like to use and click on the corresponding icon with the 3 dots. Click on Edit code and open up the header.liquid file.

  3. In this file, you will need to add two lines (“Project API Key” can be obtained in step 4):

    1. <script src="https://static.soulmachines.com/dev/widget-snippet.min.js" data-sm-api-key="<Project API key>”></script>

    2. <script src="https://raw.githubusercontent.com/soulmachines/skill-shopify-web-component/main/src/index.js"/>

  4. In DDNA studio, Once you have created your Digital Person and configured it with the Shopify Skill, you should see a section Embed Code. Open up this section and you should see data-sm-api-key. This is what goes into the header.liquid script from the previous step.

  5. Once your theme code is saved and applied, and your Digital Person is deployed it should now appear in a widget in your Shopify site.

Contents

  • No labels