Connect Salesforce Commerce Cloud With AfterShip Tracking
Overview
Integrate AfterShip Tracking with Salesforce Commerce Cloud to get memorable shipment tracking experience and swift delivery updates from 1000+ carriers like UPS, USPS, FedEx, DHL, etc. without investing time or putting additional effort.
What youβll learn
In this article, we will show you:
- Steps to integrate Salesforce Commerce Cloud with AfterShip
- i) Generate a new API Client ID
- ii) Configure OCAPI settings > Shop
- ii) Configure OCAPI settings > Data
- iii) Provide additional information for successful integration
Steps to integrate Salesforce Commerce Cloud with AfterShip
Step 1: Generate a new API Client ID
- Go to the ** Account Manager ** settings
- Click on the API Client and select Add API Client option
- Fill in the fields mentioned under the General Settings
- Choose the client_secret_basic option from the Token Endpoint Auth Method menu and select JWT from the Access Token Format
- Click Save
Step 2: Configure OCAPI settings
Go to the SFCC Business Manager > Administration > Site Development > Open Commerce API Settings
Shop API setting
- The Select Type field is set to Shop by default, so just change the Select Context field to Global
- Paste in the following JSON and replace the API version and Client ID. We support API versions 19.5 and above. Replace CLIENT_ID with the API Client ID generated from the API client setup in the previous step (this should look something like "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"), and Save it
``
{
"_v": "SHOP_API_VERSION",
"clients": [
{
"client_id": "YOUR_CLIENT_ID",
"resources": [
{
"resource_id": "/order_search",
"methods": [
"post"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/customers/*",
"methods": [
"get",
"patch"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/categories/(*)",
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/product_search",
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/products/(*)",
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/baskets",
"methods": [
"post"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/baskets/*",
"methods": [
"delete",
"get",
"patch"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/baskets/*/customer",
"methods": [
"put"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/baskets/*/notes",
"methods": [
"get",
"post"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/baskets/*/payment_instruments",
"methods": [
"post"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/baskets/*/payment_methods",
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/baskets/*/price_adjustments",
"methods": [
"post"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/baskets//price_adjustments/",
"methods": [
"delete",
"patch"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/baskets//shipments//shipping_method",
"methods": [
"put"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/baskets//shipments//shipping_methods",
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/orders",
"methods": [
"post"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/orders/*",
"methods": [
"get",
"patch",
"put"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/orders/*/notes",
"methods": [
"get",
"post"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/orders//notes/",
"methods": [
"delete"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/site",
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/stores",
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/stores/(*)",
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/stores/*",
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
}
]
}
]
}
``
Data API setting
- Set the Select Type field to Data by default. Change the Select Context field to Global
- Paste this JSON and replace the API version and Client ID. We support API versions 19.5 and above. Replace CLIENT_ID with the API Client ID generated from the API client setup in the previous step (this should look something like "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"), and Save it
``
{
"_v": "DATA_API_VERSION",
"clients": [
{
"client_id": "YOUR_CLIENT_ID",
"resources": [
{
"resource_id": "/category_search",
"methods": [
"post"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/catalog_search",
"methods": [
"post"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/catalogs",
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/catalogs/*",
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/catalogs/*/categories",
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/product_search",
"methods": [
"post"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/products/*/variations",
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/products/*/variation_attributes",
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/site_search",
"methods": [
"post"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/sites",
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/sites/*",
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/sites/*/gift_certificates",
"methods": [
"get",
"post"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/sites//gift_certificates/",
"methods": [
"delete",
"get",
"patch"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/sites//orders//payment_status",
"methods": [
"put"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/sites//orders//shipping_status",
"methods": [
"put"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/sites//orders//status",
"methods": [
"put"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/inventory_list_search",
"methods": [
"post"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/inventory_lists",
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/inventory_lists/*",
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/inventory_lists/*/product_inventory_records",
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
},
{
"resource_id": "/inventory_lists//product_inventory_records/",
"methods": [
"get"
],
"read_attributes": "(**)",
"write_attributes": "(**)"
}
]
}
]
}
``
Refer to the SFCC Documentation ** and search for **OCAPI Settings for additional help.
Step-3: Provide the required information for successful integration
- Go to the Apps ** section of your organization account and choose **Salesforce Commerce Cloud
- Click View more apps, and you will be redirected to the AfterShip Tracking integration page.
- Select AfterShip Tracking from the dropdown and then click Install app
- Select the right organization (online store) if you have multiple organizations configured in AfterShip Tracking (Optional) for which you are establishing this integration
- To install the Salesforce app, you must complete the required details to authenticate connection
In case you need help with the integration process, donβt hesitate to contact our chat support team
Updated on: 14/08/2024