How to Integrate Salesforce Commerce Cloud With AfterShip
Integrate AfterShip with Salesforce Commerce Cloud to get mesmerizing shipment tracking experience and swift delivery updates from 800+ couriers like UPS, USPS, FedEx, DHL, etc. without investing time or putting additional effort.
Go to the ‘Account Manager’ settings > ‘API Client’ > click on the ‘Add API Client’ option
Provide requisite data in the provided fields of the ‘General Settings’ tab
Note: Refrain from making changes in the ‘JWT’ and ‘OpenID’ sections
Now, select the ‘client_secret_basic’ from the ‘Token Endpoint Auth Method’ menu
Tap on 'Add' to create a new ‘API Client ID’
Go to the SFCC Business Manager > Administration > Site Development > Open Commerce API Settings
The 'Select Type' field is set to ‘Shop’ by default, so just change the 'Select Context' field to ‘Global’
Now, paste in the following JSON and ‘Save’ it
Shop API setting

Now, choose ‘Data’ from the Select Type field and paste this JSON
Data API setting

Tap on the ‘Save’ button
After adding the JSON, please update these values

In case of any doubts, refer to this SFCC Documentation and search for ‘OCAPI Settings.'
Once you are done with updating these values, click on ‘Save.’
Go to the ‘Apps’ section of your organization account and choose AfterShip

Now choose the Salesforce Commerce Cloud and provide requested information in the given fields
Tap on the ‘Connect’ button to complete the integration
In case you need help with the integration process, don’t hesitate to contact our chat support team
Steps to integrate Salesforce Commerce Cloud with AfterShip
➡️ Generate a new API Client ID
Go to the ‘Account Manager’ settings > ‘API Client’ > click on the ‘Add API Client’ option
Provide requisite data in the provided fields of the ‘General Settings’ tab
Note: Refrain from making changes in the ‘JWT’ and ‘OpenID’ sections
Now, select the ‘client_secret_basic’ from the ‘Token Endpoint Auth Method’ menu
Tap on 'Add' to create a new ‘API Client ID’
➡️ Configure OCAPI settings
Go to the SFCC Business Manager > Administration > Site Development > Open Commerce API Settings
The 'Select Type' field is set to ‘Shop’ by default, so just change the 'Select Context' field to ‘Global’
Now, paste in the following JSON and ‘Save’ it
Shop API setting

{
"_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/*/shipments",
"methods": ["post"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/baskets/*/shipments/*",
"methods": ["delete", "patch"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/baskets/*/shipments/*/shipping_address",
"methods": ["put"],
"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": "/categories/*",
"methods": ["get"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/customers",
"methods": ["post"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/customers/*/addresses",
"methods": ["get", "post"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/customers/*/addresses/*",
"methods": ["delete", "get", "patch"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/customers/*/orders",
"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": "/orders/*/payment_instruments",
"methods": ["post"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/orders/*/payment_instruments/*",
"methods": ["delete", "patch"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/orders/*/payment_methods",
"methods": ["get"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/products/*",
"methods": ["get"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/products/*/recommendations",
"methods": ["get"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/products/*/shipping_methods",
"methods": ["get"],
"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": "(**)"
}]
}]
}
Now, choose ‘Data’ from the Select Type field and paste this JSON
Data API setting

{
"_v": "DATA_API_VERSION",
"clients": [{
"client_id": "YOUR_CLIENT_ID",
"resources": [{
"resource_id": "/product_search",
"methods": ["post"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/products/*/variations",
"methods": ["get"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/catalogs/*/categories/*/products/*",
"methods": ["delete", "get", "patch", "put"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/customer_lists/*/customer_search",
"methods": ["post"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/customer_lists/*",
"methods": ["get"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/customer_lists/*/customers",
"methods": ["post"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/customer_lists/*/customers/*",
"methods": ["delete", "get", "patch", "put"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/customer_lists/*/customers/*/addresses",
"methods": ["get", "post"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/customer_lists/*/customers/*/addresses/*",
"methods": ["delete", "get", "patch"],
"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": ["delete", "get", "patch", "put"],
"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": ["delete", "get", "patch", "put"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/products/*",
"methods": ["delete", "get", "patch", "put"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/products/*/variation_groups",
"methods": ["get"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/products/*/variation_groups/*",
"methods": ["delete", "get", "patch", "put"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/products/*/variations/*",
"methods": ["delete", "get", "patch", "put"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/products/*/product_options",
"methods": ["get"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/products/*/product_options/*",
"methods": ["delete", "get", "patch", "put"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/products/*/product_options/*/values",
"methods": ["get"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/products/*/product_options/*/values/*",
"methods": ["delete", "get", "patch", "put"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/products/*/variation_attributes",
"methods": ["get"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/products/*/variation_attributes/*/values",
"methods": ["get"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/products/*/variation_attributes/*/values/{id}",
"methods": ["delete", "get", "patch", "put"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/products/*/variation_attributes/*",
"methods": ["delete", "get", "patch", "put"],
"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/*/coupon_redemption_search",
"methods": ["post"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/sites/*/coupon_search",
"methods": ["post"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/sites/*/coupons",
"methods": ["get"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/sites/*/coupons/*",
"methods": ["delete", "get", "patch", "put"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/sites/*/coupons/*/campaigns",
"methods": ["get"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/sites/*/coupons/*/campaigns/*/promotions",
"methods": ["get"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/sites/*/coupons/*/codes",
"methods": ["get"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/sites/*/coupons/*/multiple_codes",
"methods": ["post"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/sites/*/coupons/*/promotions",
"methods": ["get"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/sites/*/orders/*",
"methods": ["patch"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/sites/*/orders/*/confirmation_status",
"methods": ["put"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/sites/*/orders/*/payment_instruments/*",
"methods": ["patch"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/sites/*/orders/*/payment_instruments/*/transaction",
"methods": ["patch"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/sites/*/orders/*/payment_status",
"methods": ["put"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/sites/*/orders/*/shipments/*/shipping_address",
"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": "/sites/*/store_search",
"methods": ["post"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/sites/*/stores",
"methods": ["get"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}, {
"resource_id": "/sites/*/stores/*",
"methods": ["delete", "get", "patch", "put"],
"read_attributes": "(**)",
"write_attributes": "(**)"
}]
}]
}
Tap on the ‘Save’ button
➡️ Update your OCAPI settings
After adding the JSON, please update these values

In case of any doubts, refer to this SFCC Documentation and search for ‘OCAPI Settings.'
Once you are done with updating these values, click on ‘Save.’
➡️ Provide the required information for successful integration
Go to the ‘Apps’ section of your organization account and choose AfterShip

Now choose the Salesforce Commerce Cloud and provide requested information in the given fields
Tap on the ‘Connect’ button to complete the integration
In case you need help with the integration process, don’t hesitate to contact our chat support team
Updated on: 01/06/2022
Thank you!