Trusted Agent on Behalf (TAOB) authorization allows an agent to perform actions on behalf of a registered or guest shopper.
By default, shopper tracking preferences are disabled for all TAOB flows, which means that dnt is set to true. This differs from other SLAS token requests, in which dnt is set to false.
Note
Configure Trusted Agent Authorization
Configure Business Manager permissions:
In Business Manager, configure the following functional permissions for one or more agents in your organization: Login_On_Behalf and Create_Order_On_Behalf.
Create a dedicated public client ID to use in the OAuth auth_code PKCE flow. For details, see Public SLAS Client Use Cases.
Add the sfcc.ta_ext_on_behalf_of scope to your SLAS client.
Set a redirect URI.
Perform the steps for registered and guest shoppers in the following sections, as applicable.
To initialize an Agentforce session, obtain a SLAS shopper access token that includes the sfcc.shopper-agents.rw scope, and then call the Shopper Agents API with the sessionInitKey received at session start.
This flow requires agents to authenticate with Account Manager, including agents that sign in through a third-party identity provider that’s federated with Account Manager.
Note
Specify TAOB Parameters for Guest Shoppers
Make sure you use the public client ID created when configuring SLAS.
Note
Set login_id to guest.
Set idp_origin to slas. This is standard for SLAS Guest requests. If any other idp_origin value is used, SLAS returns a bad request.
If the trusted agent needs access to the existing basket of a guest shopper (viewing or updating), you must pass the same USID that was included in the shopper token.
You must pass the state parameter in the TAOB guest Token request to get the TAOB access_token to transfer the state from the authorization call to the token call. The state parameter value is returned with the authorization code in the response url from the TAOB guest authorization call, for example:
.../taob/callback?code=HETXpvg5LKBNIHjDTWkRrf2MLVU&state=taob.gst.7bc7fb7f-e646-44fd-bc73-dfd5c3c9019b
Example: TAOB Authorization Request for a Guest Shopper
The request redirects you to Account Manager for authentication. After a successful login, you are redirected to the address provided in the redirect_uri parameter of the previous request. When redirecting, the authorization code is included in the code query parameter.
Now request a trusted agent token using getTrustedAgentAccessToken. In the authorization header, use the value from the code query parameter that was returned when the agent authenticated with Account Manager: