-
Notifications
You must be signed in to change notification settings - Fork 54
Description
Describe the bug
When updating a contact manually in Salesforce CRM, the changes are immediately and automatically synced to Salesforce B2C Commerce (sandbox). However, when updating the same contact using the Guided Shopping Agent (e.g., via the prompt “please update the firstname for contact [user’s email masked] with updateNameV1”), the update is saved in CRM but does not sync to B2C Commerce. This issue is intermittent—sometimes the sync works as expected, but other times it does not, even though only the firstname is being updated each time.
Previously, updates via the agent were not syncing at all. After we updated the agent user’s permission set to include “Create” access for the B2C_Commerce_ProcessCustomerDetails__e platform event, the updates started syncing, but the issue described above (inconsistent or intermittent syncing) persists.
To Reproduce
- Go to Salesforce CRM and open the contact record (e.g., [user’s email masked]).
- Update the firstname manually and save the record.
- Confirm that the firstname change appears in B2C Commerce (sandbox) automatically and in real time.
- Next, use the Guided Shopping Agent (which currently only supports firstname updates) and enter the prompt:
“please update the firstname for contact [user’s email masked] with updateNameV1” - Check that the change is visible in CRM.
- Check B2C Commerce (sandbox): see if the update synced over.
(Expected: sync happens; Actual: sync does not occur consistently.)
Expected behavior
Any update to a contact’s firstname—whether made manually or via the Guided Shopping Agent—should always sync automatically and immediately to B2C Commerce (sandbox).
Screenshots
If applicable, add screenshots to help explain your problem.
Your local environment details:
- Node version (
node -v):16.20.2 - NPM version (
npm -v) v8.19.4 - SFDX version (
sfdx -v) @salesforce/cli/2.97.6 win32-x64 node-v22.17.0
Your remote environment details:
- Salesforce B2C Commerce version: 22.7
- Salesforce Core version: 54
Additional context
- The Guided Shopping Agent flow currently only updates the contact’s firstname.
- The issue was previously due to missing permissions; after assigning the correct permission set for the B2C_Commerce_ProcessCustomerDetails__e platform event (Create access), event-based syncs began working, but the intermittent sync problem remains.
- This issue occurs even when only the firstname is updated each time.
- The contact record always has Account, Customer List, and Customer Number populated.