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:

read_assigned_fulfillment_orders
read_customers
read_discounts
read_draft_orders
read_fulfillments
read_gift_cards
read_inventory
read_merchant_managed_fulfillment_orders
read_order_edits
read_orders
read_payment_terms
read_product_listings
read_products
read_returns
read_channels
read_locales
read_third_party_fulfillment_orders
read_order_submission_rules

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.

(Full Shopify Admin API docs)