# Installation and Prerequisites

Cartographer integration with an e-commerce system typically requires some minimal configuration, such as creating access accounts or allowing access to platform APIs.

# Salesforce Commerce Cloud

Cartographer uses Open Commerce API to access product and image data. In order to use OCAPI, Commerce Cloud needs to follow two steps:

  • Create a new client ID using Account Manager
  • Configure OCAPI permissions in Business Manager

# Creating a Client ID

Navigate and login to Account Manager at https://account.demandware.com/. Click into the API Client area and create a new client:

  • Select a descriptive client name
  • Pick and make a record of the API Client password. At this point, this password will not be needed for Cartographer integration.
  • Enable the client
  • Assign your organization

Once the client is created, make a note of the Client ID in the client list:

# Update Business Manager

Update OCAPI configuration using Business Manager:

WARNING

If there is an existing OCAPI configuration already, please make sure to merge Cartographer configuration rather than replace old settings completely.

  • Copy the configuration below into a text editor and replace REPLACE-ME placeholder with the client ID that's been created in the previous step.
  • Login to Business Manager
  • Navigate to Administration, Site Development, Open Commerce API Settings
  • Select Shop API type
  • Paste the updated configuration and save the configuration screen
{
  "_v": "19.8",
  "clients": [
    {
      "client_id": "REPLACE-ME",
      "allowed_origins": [
        "https://api.cartographer.drivecommerce.com"
      ],
      "resources": [
        {
          "resource_id": "/categories/*",
          "read_attributes": "(**)",
          "write_attributes": "(**)",
          "methods": [
            "get"
          ],
          "cache_time": 900
        },
        {
          "resource_id": "/products/*",
          "read_attributes": "(**)",
          "write_attributes": "(**)",
          "methods": [
            "get"
          ],
          "cache_time": 900
        },
        {
          "resource_id": "/product_search",
          "read_attributes": "(**)",
          "write_attributes": "(**)",
          "methods": [
            "get"
          ],
          "cache_time": 900
        },
        {
          "resource_id": "/product_search/*",
          "read_attributes": "(**)",
          "write_attributes": "(**)",
          "methods": [
            "get"
          ],
          "cache_time": 900
        },
        {
          "resource_id": "/products/*/images",
          "read_attributes": "(**)",
          "write_attributes": "(**)",
          "methods": [
            "get"
          ],
          "cache_time": 900
        }
      ]
    }
  ]
}