Salesforce B2C Commerce actions
The Salesforce B2C Commerce extension provides actions for retrieving product, category, and customer group data from Salesforce B2C Commerce within Workforce Flows. Use these actions to fetch individual records or search and browse content as part of your automated content processes.
The Salesforce B2C Commerce action extension can be installed from the Workforce integration marketplace.
See Salesforce B2C Commerce configuration for details of how to obtain the credentials you need to configure the Salesforce B2C Commerce action extension.
Tip
These action descriptions cover the most commonly used inputs and outputs. When designing flows, you may also notice additional input and output variables.
Shared inputsLink copied!
Several actions support the following optional inputs.
| Input | Type | Description |
|---|---|---|
locale | string | Locale identifier (e.g. en-US) that determines the localized data returned |
currency | string | Currency code in ISO 4217 format (e.g. USD) used to retrieve product pricing |
expand | string | Comma-separated list of related resources to expand in the response (e.g. images, prices, availability, variations) |
refine | string | Refinement criteria used to filter results (e.g. category, price range, or attributes) |
pagination.start | string | Starting index for paginated results. Default: 0 |
pagination.max | string | Maximum number of results per page. Default: 20. Values above 20 are ignored |
pagination.sort | string | Sorting rule applied to the results |
Get product by IDLink copied!
Retrieves full product data for a single product by its ID from Salesforce B2C Commerce.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The unique identifier of the product |
locale | string | No | See shared inputs |
expand | string | No | See shared inputs |
currency | string | No | See shared inputs |
all_images | boolean | No | When true, returns all product image groups regardless of variation selection. Default: false |
Outputs
| Output | Type | Description |
|---|---|---|
product.id | string | Product ID |
product.currency | string | Currency |
product.name | string | Product name |
product.short_description | string | Short description |
product.long_description | string | Long description |
product.page_title | string | SEO page title |
product.page_description | string | SEO page description |
product.primary_category_id | string | Primary category ID |
product.price | number | Product price |
product.main_image | string | Main image URL |
product.image_groups | array | Image groups. See image group fields |
product.recommendations | array | Recommended products. See recommendation fields |
Get basic product by IDLink copied!
Retrieves a simplified set of product data for a single product by its ID from Salesforce B2C Commerce. Intended for use with commerce repositories.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The unique identifier of the product |
locale | string | No | See shared inputs |
expand | string | No | See shared inputs |
currency | string | No | See shared inputs |
Outputs
| Output | Type | Description |
|---|---|---|
product.id | string | Product ID |
product.name | string | Product name |
product.description | string | Product description |
product.images | array | List of image objects, each with a url field |
Get basic products by optional keywordLink copied!
Retrieves a cursor-paginated list of products matching an optional keyword from Salesforce B2C Commerce. Intended for use with commerce repositories.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
keyword | string | No | The search phrase used to find matching products. If omitted, returns all products |
before | string | No | A pagination cursor to retrieve the page of products before a given position. Use the startCursor value from a previous response |
after | string | No | A pagination cursor to retrieve the page of products after a given position. Use the endCursor value from a previous response |
Outputs
| Output | Type | Description |
|---|---|---|
pageInfo.startCursor | string | Cursor for the first item in the current page |
pageInfo.endCursor | string | Cursor for the last item in the current page |
pageInfo.hasPreviousPage | boolean | Whether a previous page exists |
pageInfo.hasNextPage | boolean | Whether a next page exists |
products | array | List of basic product objects, each with id, name, description, and images (array of objects with a url field) |
Get products by search termLink copied!
Retrieves a paginated list of products matching a search term from Salesforce B2C Commerce.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
searchTerm | string | Yes | The search query string used to find matching products |
refine | string | No | See shared inputs |
locale | string | No | See shared inputs |
expand | string | No | See shared inputs |
currency | string | No | See shared inputs |
pagination.start | string | No | See shared inputs |
pagination.max | string | No | See shared inputs |
pagination.sort | string | No | See shared inputs |
Outputs
| Output | Type | Description |
|---|---|---|
total | number | Total number of matching products |
start | number | Start index of the current page |
end | number | End index of the current page |
products | array | List of product search result objects. See search result product fields below |
Get products by categoryLink copied!
Retrieves a paginated list of products belonging to a category from Salesforce B2C Commerce.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The unique identifier of the category |
refine | string | No | See shared inputs |
locale | string | No | See shared inputs |
expand | string | No | See shared inputs |
currency | string | No | See shared inputs |
pagination.start | string | No | See shared inputs |
pagination.max | string | No | See shared inputs |
pagination.sort | string | No | See shared inputs |
Outputs
| Output | Type | Description |
|---|---|---|
total | number | Total number of matching products |
start | number | Start index of the current page |
end | number | End index of the current page |
products | array | List of product search result objects. See search result product fields below |
Get category by IDLink copied!
Retrieves a single category by its ID from Salesforce B2C Commerce, including an optional number of subcategory levels.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The unique identifier of the category |
levels | string | No | The number of subcategory levels to include in the response |
locale | string | No | See shared inputs |
Outputs
| Output | Type | Description |
|---|---|---|
category.id | string | Category ID |
category.name | string | Category name |
category.image | string | Category image URL |
category.page_title | string | SEO page title |
category.page_description | string | SEO page description |
category.page_keywords | string | SEO page keywords |
category.parent_category_id | string | Parent category ID |
category.categories | array | Subcategory objects, each sharing the same fields as above |
Get categories by search termLink copied!
Retrieves a paginated list of categories matching a search term from Salesforce B2C Commerce.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
searchTerm | string | Yes | The search phrase used to find matching categories |
levels | string | No | The number of category hierarchy levels to include |
pagination.start | string | No | Starting index for paginated results. Default: 0 |
pagination.max | string | No | Maximum number of results. Default: 20. Values above 20 are ignored |
Outputs
| Output | Type | Description |
|---|---|---|
total | number | Total number of matching categories |
start | number | Start index of the current page |
end | number | End index of the current page |
categories | array | List of category objects, each with id and name |
Get customer group by IDLink copied!
Retrieves a single customer group by its ID from Salesforce B2C Commerce.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The unique identifier of the customer group |
select | string | No | Specifies which fields should be returned in the response |
Outputs
| Output | Type | Description |
|---|---|---|
customerGroup.id | string | Customer group ID |
customerGroup.description | string | Description |
customerGroup.type | string | Customer group type |
customerGroup.creation_date | string | Creation date |
customerGroup.link | string | Link to the customer group resource |
customerGroup.rule_description | string | Rule description (for rule-based groups) |
Get customer groupsLink copied!
Retrieves a paginated list of all customer groups from Salesforce B2C Commerce.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
select | string | No | Specifies which fields should be returned in the response |
pagination.start | string | No | Starting index for paginated results. Default: 0 |
pagination.max | string | No | Maximum number of results. Default: 20. Values above 20 are ignored |
Outputs
| Output | Type | Description |
|---|---|---|
total | number | Total number of customer groups |
start | number | Start index of the current page |
end | number | End index of the current page |
customerGroups | array | List of customer group objects, each with id, link, and description |
Image group fieldsLink copied!
Image groups are returned on the full product object and contain the following fields:
| Field | Type | Description |
|---|---|---|
view_type | string | The view type for the image group (e.g. large, medium, small) |
images | array | List of image objects, each with alt (alt text), link (image URL), and title (image title) |
Recommendation fieldsLink copied!
Recommendations are returned on the full product object and contain the following fields:
| Field | Type | Description |
|---|---|---|
recommended_item_id | string | ID of the recommended product |
recommended_item_link | string | Link to the recommended product |
recommendation_type.display_value | string | Display label for the recommendation type |
recommendation_type.value | number | Numeric value for the recommendation type |
Search result product fieldsLink copied!
Products returned by the search and category listing actions contain the following fields:
| Field | Type | Description |
|---|---|---|
product_id | string | Product ID |
product_name | string | Product name |
link | string | Link to the product |
price | number | Product price |
price_per_unit | number | Price per unit |
currency | string | Currency code |
image.alt | string | Image alt text |
image.link | string | Image URL |
image.title | string | Image title |