Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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 access needed as well.

image-20240501-104128.pngImage Removedimage-20240813-105728.pngImage Added

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

...

Code Block
breakoutModewide
languagejson
{
  "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:

Code Block
breakoutModewide
languagejson
{
  "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" ]
  }
}