b2c-slas_skill
- TypeScript
20
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill salesforcecommercecloud/b2c-developer-tooling --skill b2c-slas- SKILL.md4.7 KB
Overview
This skill helps you manage SLAS (Shopper Login and API Access Service) clients for Salesforce B2C Commerce using the b2c CLI. It focuses on shopper/customer authentication: creating, listing, updating, and deleting SLAS API clients and managing OAuth scopes for storefronts and headless/PWA integrations. Use it to configure tokens and troubleshoot shopper authentication flows.
How this skill works
The skill drives the b2c CLI slas commands to inspect and manipulate SLAS tenants and clients. It can create clients (public or private), attach default or custom scopes (including custom c_* scopes), output JSON with generated client secrets, and request tokens for testing. It also supports listing clients, getting client details, updating client settings, and deleting clients.
When to use it
- Set up PWA or headless storefront authentication and tailor OAuth scopes for a channel.
- Create test clients for integration or automated testing with restricted scopes.
- Add custom scopes (e.g., c_loyalty) to exercise Custom API endpoints during development.
- Troubleshoot token acquisition issues or verify client credentials and scopes.
- Generate client credentials for short-lived development or CI workflows.
Best practices
- Use --json output when creating clients to capture client_id and client_secret programmatically.
- Prefer dedicated test clients for integration tests instead of reusing production credentials.
- Match custom scope names exactly to the scope defined in your Custom API schema.
- Use tenant auto-creation judiciously; pass --no-create-tenant if tenants are managed separately.
- Use the channel/site (channel_id) when requesting tokens so tokens are valid for the intended storefront.
Example use cases
- Create a private SLAS client with a custom c_my_scope to test a Custom API endpoint.
- Generate a public client and redirect URI for a local PWA development server.
- List all SLAS clients for a tenant to audit configured scopes and client types.
- Request a shopper access token using client credentials and channel_id for API debugging.
- Update an existing client to add or remove scopes during feature rollout.
FAQ
SLAS is for shopper (customer) authentication used by storefronts and headless apps. For admin tokens use the admin auth workflow (e.g., b2c auth token).
How do I capture the generated client secret?
Run the create command with --json to get client_id and client_secret in the output and save them securely.