Shopify integration
Shopify presents two external API interfaces, Storefront and Admin. We will use the Admin API to connect the Agent to our Shopify store.
To begin, go to Admin home > Store Settings > Apps and sales channels > Develop apps > Create an app. Give your app a name such as “Syllable Shopify Agent Integration”. Next, we will configure permissions by selecting “Configure Admin API Scopes”. If you are using an Admin API token for other uses, it is important to create a new API token with the specific permissions necessary for this application.
Grant your Shopify Admin API Integration the following permissions:
Note: Enabling several of these read permissions allows for the potential return of PII through the graphQL API queries. However we will not construct our queries in a way that can return any PII.
After adding scopes, click “Install App” to activate the new Admin API token. Once the API token is revealed, copy and paste it into the Syllable Tools Header section with key X-Shopify-Access-Token
. This can be found by editing the Agent that we just created. Be sure to save the Shopify Admin API token in a secure location as it will only be revealed once. If you need a new Admin API token, you can repeat this process multiple times per Shopify store.
The Shopify Access Token will be passed through the agent Tools, into the proxy service, where it will be parsed from the request header, to be used with the Shopify API.