Prerequisites

Request the cartridge from this page.

Step 1 - SFCC Credentials

Create Credentials

OAuth Client Credentials

Log into Account Manager. Go to API Client and click Add API Client:

  • Enter Display Name: OwnID Integration
  • Enter a password
  • Assign your organization
  • Assign the following roles: Sandbox API User and Salesforce Commerce Cloud
  • Token Endpoint Auth Method: private_key_jwt
  • Save Changes.
SFCC Account Manager Figure 1. Salesforce API Client Creation

You will get a Client Id and Secret. (Save this values for later)

Assign Permissions

Go to Administration > Site Development > Open Commerce API Settings:

Configure shop tab

Add the following JSON to the shop tab:

Change “Your Client ID” value in the json by the Client Id created in the previous step.
shop
{
  "_v": "23.1",
  "clients": [
    {
      "allowed_origins": [
      ],
      "client_id": "Your Client ID",
      "resources": [
        {
          "resource_id": "/customers/auth/trustedsystem",
          "methods": [
            "post"
          ],
          "read_attributes": "(**)",
          "write_attributes": "(**)"
        },
        {
          "resource_id": "/sessions",
	           "methods": [
            "post"
          ],
          "read_attributes": "(**)",
          "write_attributes": "(**)"
        }
     ]
   }
 ]
}

Note: If the OCAPI configuration is already in place, simply include the following resource into the resources section:

{
  "resource_id": "/customers/auth/trustedsystem",
   "methods": [
       "post"
   ],
   "read_attributes": "(**)",
   "write_attributes": "(**)"
},
{
   "resource_id": "/sessions",
   "methods": [
       "post"
   ],
   "read_attributes": "(**)",
   "write_attributes": "(**)"
}
SFCC Account Manager Figure 2. shop JSON configuration example

Configure data tab

Add the following JSON to the data tab:

Change “Your Client ID” value in the json by the Client Id created in the previous step.
data
{
  "_v": "23.1",
  "clients": [
    {
      "allowed_origins": [
      ],
      "client_id": "Your Client ID",
      "resources": [
       {
          "resource_id": "/customer_lists/*/customers/*",
          "methods": ["get", "patch"],
          "read_attributes": "(**)",
          "write_attributes": "(**)"
       },
       {
         "resource_id":"/customer_lists/*/customer_search",
         "methods": ["post"],
         "read_attributes": "(**)",
         "write_attributes": "(**)"
        },
   {
    "resource_id":"/ocapi_configs/*",
    "methods": ["get"],
    "read_attributes": "(**)",
    "write_attributes": "(**)"
   }
   ]   
  }
  ]
}
SFCC Account Manager Figure 3. data JSON configuration example

Step 2 - OwnID Application

  • Login to the OwnID Console.
  • Create a new application.
  • Name the application and select its type as the SFCC Connector.
Your application is created!
  • In your Salesforce integration page, fill in the following information:
    • Instance Hostname - e.g: xyzb-001.dx.commercecloud.salesforce.com (only the domain, without protocol)
    • Site ID - e.g: RefArch (case sensitive)
    • API Client ID (generated in the previous step)
    • API Client Secret (generated in the previous step)
    • SFCC Username (get it from the Account Manager)
    • SFCC Password
  • Save Changes
SFCC Account Manager Figure 4. OwnID Console

Copy the appId. You will use it in the next step.

Step 3 - SFCC Cartridge Installation

  • Upload and add the cartridge to the target site.

  • Navigate to Merchant Tools > Site Preferences > Custom Preferences > OwnID and set the following preferences:

    • EnableOwnId: Set to true to display the OwnID widget.
    • Env: Select the OwnID production environment.
    • AppId: Enter the previously copied OwnID appId from the OwnID console.
SFCC Account Manager Figure 5. OwnID Cartridge Configuration
Congratulations! Enjoy your passwordless authentication!

Next Steps

Add Your Custom Domain

Unify the login experience with your own domain.

Was this page helpful?