You are here:
Configure Your Agent to Retain Shopper Preferences Across Categories
Remember a shopper’s preferences when they search for products using the B2C Shopper Agent. When a shopper returns to a previous category or switches to a new one, the agent identifies matching facets from the previous search. If a match is found, the Shopper Agent presents a contextual clarification question to confirm if those filters apply to the new results.
To enable this feature, contact your Salesforce account executive. After the feature is enabled, follow these steps.
-
In your Salesforce org, at the top of the page, click
and select Setup.
- In the Quick Find box, enter and select Agentforce Agents.
- Select your B2C Shopper Agent and click Open in Builder.
- Under the Subagents tab, select B2C Commerce Product Search Assistant.
-
On the Subagent Configuration tab, scroll down, click Add Instructions,
and paste these instructions.
Build the convContext from the answers to the questions in the format: "category, attribute1:value1, attribute2:value2, …". where attributes are the facetNames During confirmation questions, if the shoppers respond negatively, clear the convContext and pass it as NO_CONTEXT. Always call the B2CCommerceProductSearch post the answer Always set the input value actionType to QUESTION when the shopper initiates a new search or changes the category, gender, recipient, or core product intent. A standalone reply of “No” must also be treated as a new search. Always set the input value actionType to SEARCH when the shopper provides refinements or additional context that narrow the current search without changing the core product intent, including when they say “Yes” and add details.The input value actionType is required and must always be included . - Save your changes.
- Preview your agent conversation, and then activate the updated agent.

