Use the Shopper API in Postman
Import a collection and environment into Postman:
- If you don't have Postman installed, download and install it from official website. You can also use the Web Version, but the steps are only for the desktop version.
- Start Postman
- Download the zip file from the Commerce API Workshop.postman_collection.json gist, which contains two JSON files:
- Postman collection for Commerce APIs
- Postman environment variables for the collection
- Click Import on the main menu and select Commerce API Workshop.postman_collection.json: this will import a collection into Postman:
- Click on the Manage Environment icon on the upper right corner:
- Scroll to the bottom of the dialog and select Import
- Select the Commerce API Workshop.postman_environment.json
- This creates a new Commerce API Workshop environment that you can view and edit by clicking the icon "eye"
Edit your environment variables to point to your ODS
Postman uses environment variables to make it easier to enter and reuse API calls in your collection. This collection attempts to use the same variables that the CCDC uses in the API documentation.
Most environment variable values are placeholders, so you must use your own clientID and sandbox to fill them.
Any other values present assume SFRA RefArch site: products, promotions, catalog, customers lists, etc.
- On the Commerce API Workshop environment screen (previous step), click Edit
- clientId and clientIdPwd: login to AM, and get the clientId and password that you setup during Create an API Client for Use with Commerce API. If you forgot the password (really?), you will have to redo that activity.
- Login to your ODS, navigate to Administration > Site Development > Salesforce Commerce API Settings, and populate the following from that screen:
- organizationId: f_ecom_<realm>_<instance>
- shortCode: unique to your instance
- tenant: use the <realm>_<instance> combination. Don't forget to use underscore: “_”.
- basketId, customerNo, itemId and all global variables: these are populated by collection calls, no need to enter a value
- The rest of the variables are initialized to SFRA values. If you are using SiteGenesis site, modify accordingly.
Download Headless Commerce Course
- B2C Commerce: Salesforce Commerce API
- Trailhead Unit: Get to Know Headless Commerce
- API Basics
- Commerce API Overview
- Activity: Create an API Client for Use with Commerce API
- Use the Shopper API in Postman
- Scope Considerations for Management API Calls
- Use the Management API in Postman
- Open Commerce API (OCAPI) Overview
- Study OCAPI Content
- Shopper Login and API Access Service (SLAS) Overview
- Set Up SLAS API to Enable Shopper Login to Open ID Compliant IDP
- Use SLAS API to Set up a tenant and a client
- B2C Commerce: Sample Apps Using Commerce SDK Overview
- Welcome and Learning Objectives
- Explore Headless Architecture and Implementation Roles
- Goal and Architecture of Sample Apps
- Headless Developer Tools for Salesforce B2C Commerce
- Activity: Install and Run Sample Apps
- Backend for Frontend
- Commerce SDK
- Update SDK Version and Use the GraphQL Playground
- Additional Resource: Headless Commerce Concepts
- B2C Commerce: Backend for Frontend Using Commerce SDK
- Backend for Frontend (BFF) Recap and Schema
- Modify the Product Details Type Definition
- Code Walkthrough of Product Details Resolver
- Debug the Product Details Resolver
- Product Model Walkthrough
- Modify the Product Model
- B2C Commerce: Frontend Architectural Options
- Frontend Considerations
- Modify the Sample Apps PDP using Lightning Web Components
- Lightning Web Components Basics Trailhead Module
- B2C Commerce: Headless Commerce Implementation Considerations
- Sample Architecture for Headless Commerce
- Additional Resources: Sample Architecture for Headless Commerce
- Implement a Content Delivery Network and Caching
- Implement Scaling for Resilience, Middleware, and Networking
- Monitor and Test
- Rate limiting Diagram
- Circuit Breaking Diagram
- Load Testing for B2C Commerce
- Secure the Storefront
- Multi-Factor Authentication for B2C Commerce
- Operational Best Practices
- Additional Resources: Operational Best Practices
- B2C Commerce Headless Implementation
Enter your e-mail to get a free copy of Commerce API course.
Check your e-mail, you'll receive a copy in a few seconds. If not, take a look to the spam folder.