Hello Agentforce Wizards,
For those who have worked with the B2C Guided Shopping Agent, I followed the setup detailed in the Agentforce for Guided Shopping for B2C Commerce tutorial.
https://help.salesforce.com/s/articleView?id=cc.b2c_agent_guided_shopping.htm&type=5
I am encountering the following issue: when performing an interrogation on any topic, I receive this error:
"Failed to fetch the order. Status: 404_Not Found. Error: URL Not Found - The requested URL is invalid."
The issue likely stems from the Named Credentials setup.
Initially, the problem was due to a missing Client ID.
After adding the Client ID to the endpoint, the setup looks like this:
Setup > Named Credentials > RefArch:
URL:
https://xyxq-004.dx.commercecloud.salesforce.com/s/RefArch/client_id=275xxxxxxxxxxxxxxxxxxxxx33
Setup > Named Credentials > RefArchAuth:
URL:
https://account.demandware.com/dwsso/oauth2/access_token?client_id=275xxxxxxxxxxxxxxxxxxxxx33
The problem is that I am unsure how the URL is constructed internally by the Agent, so I am uncertain what needs to be changed.
Additionally, I do not know how to check the raw request triggered by the Agent.
If you have encountered similar issues, your feedback would be greatly appreciated.
Thank you.
----------------------------------------------------------------------------------------------------------------------------
EDITED
Solution found:
Setup the Named Credentials as following:
Setup > Named Credentials > B2CShopApi
URL: https://abcd-001.dx.commercecloud.salesforce.com/s/RefArch/
And we add the client ID to the Custom Headers section as following:
x-dw-client-id: aaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxaa
It will not work without adding the Client ID this way.
----------------------------------------------------------------------------------------------------------------------------