クイックスタート
パブリッククライアントのユースケース
プライベートクライアントのユースケース
SLAS JWT の検証
信頼できるエージェントの認可
信頼できる代理システムの認可
パスワードのリセット
カスタムパラメーターとフック
買い物客プロフィールのマージ
買い物客の追跡環境設定の管理
プロモーションのタイプと要件
Agentic MCP Shopper Tools クイックスタート (パイロット)
URL マッピング
Ask the Community
Salesforce Commerce Cloud を使用して SLAS パスワードのリセットを実装するプロセスを学習します。これにより、買い物客はパスワードを更新し、アカウントを安全に保つことができます。
パブリッククライアントとプライベートクライアントの両方のパスワードリセット フローでは、2 つの SLAS エンドポイントが使用されます。1 つはパスワードリセットトークンを取得するため、もう 1 つはトークンを使用してパスワードをリセットするためです。
shopper-login:getPasswordResetToken と shopper-login:resetPassword の 2 つの SLAS エンドポイントは、SLAS サービスがパスワードリセットトークンを送信するためのコールバック URL を提供します。
SLAS パスワードリセットトークンは 10 分後に期限切れになります。
shopper-login:getPasswordResetToken を呼び出すリセットフォームを作成し、プロセスを開始します。hint クエリパラメーターに cross_device の値を使用します。パブリックにアクセス可能なコールバック URL (ECOM インスタンス、Managed Runtime 環境、独自サーバーなど)。
現在コールバック URL がない場合は、テスト目的で Webhook.site などのパブリックサービスを使用できます。
Tip
コールバック URL で構成された SLAS クライアント。
shopper-login:getPasswordResetToken を呼び出して、パスワードリセットプロセスを開始します。
callback_uri を提供します。callback_uri は、SLAS クライアントの許可されたコールバック URL に対して検証されます。callback_uri が有効な場合、SLAS はパスワードリセットトークンを含む POST リクエストをコールバック URL に送信します。次に例を示します。1{
2 "email_id": "shopper@example.com",
3 "login_id": "shopper@example.com",
4 "phone": "123-555-1212",
5 "customer_id": "abq96kjBGjQhBEgYHNWmemnL8l",
6 "token": "95107856"
7}Content-Type: application/json を使用して HTTP POST リクエストを行います。ペイロードには、パスワードのリセットに必要な 8 桁の数値である token と、買い物客のプロフィールに関連付けられている E メールアドレスや電話番号 (利用可能な場合) など、買い物客に連絡するための可能な方法が含まれています。通常、買い物客の email_id と login_id は同じですが、Commerce Cloud では、買い物客の E メールアドレスが、ログインに使用する値 (login_id) と異なる場合があります。shopper-login:resetPassword に提供し、プロセスを完了します。
新しいパスワードは、B2C Commerce サイトで設定されているパスワードの複雑さの要件を満たしている必要があります。要件を満たしていない場合、リクエストは拒否されます。
Note

SLAS コールバックリクエストの検証の手順を参照してください。
パブリッククライアントとプライベートクライアントの両方でパスワードをリセットするには、次の 2 つの個別のリクエストを行います。
1curl --location 'https://{{short code}}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/bgvn_stg/oauth2/password/reset' \
2--header 'Content-Type: application/x-www-form-urlencoded' \
3--data-urlencode 'user_id=darth.vader' \
4--data-urlencode 'mode=callback' \
5--data-urlencode 'channel_id=SiteGenesis' \
6--data-urlencode 'client_id={{public client id}}' \
7--data-urlencode 'callback_uri=http://localhost:9003/callback' \
8--data-urlencode 'hint=cross_device'1curl --location 'https://{{short code}}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/bgvn_stg/oauth2/password/action' \
2--header 'Content-Type: application/x-www-form-urlencoded' \
3--data-urlencode 'pwd_action_token=60045027' \
4--data-urlencode 'client_id={{public client id}}' \
5--data-urlencode 'user_id=darth.vader' \
6--data-urlencode 'new_password={{new password}}' \
7--data-urlencode 'channel_id=SiteGenesis'1curl --location 'https://{{short code}}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/bgvn_stg/oauth2/password/reset' \
2--header 'Content-Type: application/x-www-form-urlencoded' \
3--header 'Authorization: {{Basic auth with private client and secret}} \
4--data-urlencode 'user_id=darth.vader' \
5--data-urlencode 'mode=callback' \
6--data-urlencode 'channel_id=SiteGenesis' \
7--data-urlencode 'callback_uri=https://localhost:9010/callback' \
8--data-urlencode 'hint=cross_device'1curl --location 'https://{{short code}}.api.commercecloud.salesforce.com/shopper/auth/v1/organizations/bgvn_stg/oauth2/password/action' \
2--header 'Content-Type: application/x-www-form-urlencoded' \
3--header 'Authorization: {{Basic auth with private client and secret}}' \
4--data-urlencode 'pwd_action_token=19362888' \
5--data-urlencode 'user_id=darth.vader' \
6--data-urlencode 'new_password=Salesforce3!' \
7--data-urlencode 'channel_id=SiteGenesis'コールバック URL は SLAS Web サービスにアクセスできる 必要 があります。つまり、受信リクエストに対して認証メカニズムは使用できません。具体的な例としては、SLAS パスワードリセットでは B2C Commerce Storefront Protection (ストアフロントの保護) を使用できません。