Skip to content
  • There are no suggestions because the search field is empty.

Shopify API - Obtaining Credentials

API Credentials are the conduit for communications between Business Central and Shopify.

Note: Before starting, make sure you have downloaded the Shopify API Configuration JSON file (right-click and save this file to your local computer/environment)

1. Create an App in Shopify

Your App (application) in Shopify will be your unique technical entity that we will connect to Business Central so we can connect the two systems.

  1. Navigate your browser to https://dev.shopify.com and login
  2. Under the Apps section, click the Create app button
  3. Enter an App name (example: CSM Shop App) and click Create
  4. Configure App URL:
    1. Set this to: https://businesscentral.dynamics.com
  5. Disable Embedded app:

    1. Uncheck: Embed app in Shopify admin
  6. Scroll down to the Access/Scopes section and click Select scopes. Note: a scope is a particular endpoint or category of API functions that you will enable here, based on the functions our CSM application interacts with. It is important to note that once released, the scopes on this App cannot change and you will have to make a new App if you want to change your scopes in the future. Ensure you have the following scopes checked:
    1. read_customers,write_customers,write_inventory,read_inventory,read_payment_terms,write_payment_terms,read_payment_customizations,write_payment_customizations,read_product_listings,write_product_listings,read_returns,write_returns,read_shipping,write_shipping,customer_read_orders,customer_write_orders
    2. Warning: This is just a partial list/example. Please contact us to identify the scopes need for the Shopify integration or you can select them all for the time-being.

  7. Configure Redirect URLs:
    1. Set this to: https://businesscentral.dynamics.com/OAuthLanding.htm
    1. Click Release (version # is optional)

    2. Keep this browser tab open as we'll be copying over data in the next step

     

    2. Create an API Set in Business Central

    Your API Set in Business Central will contain data from your newly created Shopify app that will serve as linking the two properties.

    1. Search for API Sets and select the related link
    2. Under Setup, select Import, then toggle JSON file, click OK and browse to the file you saved to your local environment above.
      1. This step will have created a new API Set Code called SHOPFIYACCESSTOKEN which we will use to link to your new Shopify App

     

    3. Copy Shopify App data into Business Central

    1. While still in the API Sets card, click on the SHOPFIYACCESSTOKEN API Set to open the API Functions card; under the Related menu, select API Credential; finally, click on the SHOPFIYACCESSTOKEN API Set Code.
      1. Under the OAuth2.0 section:
        1. Update both Authorization and Token Endpoints:
          1. Replace the placeholder YourShopName with your Shopify store name found at your Shopify Stores Admin site in the Settings section or in the Admin URL itself (example: https://admin.shopify.com/store/[store_name]/settings/general)
        2. On your web browser for your Shopify App, ensure the App you just created is selected and click on Versions; now, select the most recent version you released.
          1. Select the text to the right of Scopes; copy this text section and paste it into the Scope column in Business Central
        1. On your web browser for your Shopify App, ensure the App you just created is selected and click on Settings.
          1. Copy and paste both the Client ID and Secret and into the fields of the same names in Business Central
      1. Click Authorize
        1. This will prompt a browser window to log in to your Shopify store - Note: you must login as the shop owner
        2. Click Install to finish the app link between Shopify and BC. This step will generate your encrypted/hidden Token that is saved in this OAuth2.0 section.
          1. Shopify - Install App from Shopify



    4. Obtain and Input your Shopify Access Token

    Shopify recently changed their integration which now requires some extra steps to ensure CSM connects to their platform. These steps will eventually be automated, but for now, you can follow these few steps obtain to correctly input your Access Token.
    1. Search for API Sets and select the related link
      1. Click on the SHOPIFYACCESSTOKEN link and then select the Execute option from the ribbon bar; this will simulate an API call and give us the Access Token in the response data.
        1. You will see a popup with an error; click OK
        2. You will then see a prompt that says, "Do you want to open the API Message?" - Click Yes
        3. This will load the API Message; scroll down to the Request FastTab and copy in the Access Token value, which should start with "shpua_"
    2. In the API Sets card, select the SHOPIFY API Set and click Related > API Credentials
      1. Click on the SHOPIFY link
        1. Paste the Access Token you retrieved in the previous step in the API Key Value field
    3. Search for CSM API Sets and select the related link
      1. Select the SHOPIFY API Set and then click the API Credentials in the ribbon bar
        1. Click on the SHOPIFY link
          1. Ensure the Authorization Type is API Key, the API Key value is X-Shopify-Access-Token and paste in your Access Token in the API Key Value field
            1. Update CSM API Set with Access Token

    Note: If you are experiencing issues with connecting Shopify, please contact us so we can work with you to get your Shopify API Sets connected the rest of the way.



      ➡️ Next Step: Quick Setup Wizard