Shopify - Install

Follow the steps below to install the Shopify Connector.

Install the connector as hosted service on an IIS website

Follow the guide Installe a eCommerce connector as hosted service

Shopify account

At the Shopify account create a “App development (Develop apps)” with “Admin API integration” and give access to: write_products, write_inventory, write_publications.

  • If file_reference is used the write_files access needed as well.

  • If the Translations functionality is activated the write_translations access needed as well.

  • If Locations is used the read_locations

 

image-20240813-105728.png

 

 

Set the “BaseUri” and the “AccessToken” in the appsettings.json file

Logging and debugging

It is possible to enable logging/debugging via Serilog. To setup Serilog, add serilog configuration to the appsettings.json file. An example of a Serilog setup:

{ "PerfionApi": { "GetDataUri": "https://localhost:44311/perfion/getdata.asmx", "PerfionToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJBZG1pbiIsImp0aSI6IjkxYjA0NzNhLWM0Y2MtNDlkMy04YmIwLThmYTBlNTM5YjkxZSIsImlhdCI6MTcwNDg4NzQzNiwibmJmIjoxNzA0ODg3NDM2LCJleHAiOjE3OTEyODc0MzYsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL25hbWUiOiJBZG1pbiIsIlBlcmZpb25Vc2VyIjoiQWRtaW4iLCJpc3MiOiJQZXJmaW9uLkFQSVNlcnZpY2UiLCJhdWQiOiJQZXJmaW9uLkNsaWVudCJ9.DNtuNhu7-0SSvMDQ3-WJDi-NhdBpZxMET3py2GQefPI", "Channel": "Shopify Channel" }, "ShopifyApi": { "BaseUri": "https://perfion-test-dev.myshopify.com/", "TimeOut": 789, "AccessToken": "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" }, "Serilog": { "MinimumLevel": { "Default": "Information", "Override": { "System": "Warning", "Microsoft": "Warning" } }, "WriteTo": [ { "Name": "File", "Args": { "path": "c:/temp/logs/log.txt", "rollingInterval": "Day", "fileSizeLimitBytes": null, "retainedFileCountLimit": 15, "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level}] [{SourceContext}] [{RequestId}] : {Message} {Exception}{NewLine}" } } ] } }

An example of a Serilog setup for logging to the console:

{ "PerfionApi": { "GetDataUri": "https://localhost:44311/perfion/getdata.asmx", "PerfionToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJBZG1pbiIsImp0aSI6IjkxYjA0NzNhLWM0Y2MtNDlkMy04YmIwLThmYTBlNTM5YjkxZSIsImlhdCI6MTcwNDg4NzQzNiwibmJmIjoxNzA0ODg3NDM2LCJleHAiOjE3OTEyODc0MzYsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL25hbWUiOiJBZG1pbiIsIlBlcmZpb25Vc2VyIjoiQWRtaW4iLCJpc3MiOiJQZXJmaW9uLkFQSVNlcnZpY2UiLCJhdWQiOiJQZXJmaW9uLkNsaWVudCJ9.DNtuNhu7-0SSvMDQ3-WJDi-NhdBpZxMET3py2GQefPI", "Channel": "Shopify Channel" }, "ShopifyApi": { "BaseUri": "https://perfion-test-dev.myshopify.com/", "TimeOut": 789, "AccessToken": "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" }, "Serilog": { "MinimumLevel": { "Default": "Information", "Override": { "System": "Information", "Microsoft": "Information", "Perfion.LicenseServer.Utils.ApiKeyAuthenticationHandler": "Information" } }, "WriteTo": [ "Console" ] } }