Skip to content

Commit

Permalink
updated readme for SLAS
Browse files Browse the repository at this point in the history
  • Loading branch information
sandragolden committed Sep 3, 2022
1 parent fdde66b commit a301eb7
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 9 deletions.
34 changes: 25 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,22 @@ Ensure you have a valid Commerce Cloud API key (client ID) set up. If you don't

For automation (e.g. a build server integration) you'll need the API key as well as the API secret for authentication. If you want to use authentication in interactive mode, you have to set _Redirect URIs_ to `http://localhost:8080`. If you want to manage sandboxes you have to set _Default Scopes_ to `roles tenantFilter profile`.

### SLAS Prerequisites ###
In order to use your API key with SLAS, please ensure the following are configured for your client:

1. Has `Roles` > `Commerce Cloud Developer Experience` > `Sandbox API User` with "All Sandboxes" scope.<br/>
![Account Manager Client ID](docs/images/client-api-user.png)
2. Set _Default Scopes_ to:
```txt
mail
roles
tenantFilter
profile
openId
```
3. Set "Token Endpoint Auth Method" to `client_secret_post`
4. Set "Access Token Format" to `JWT`

### Grant your API key access to your instances ###

In order to perform CLI commands, you have to permit API calls to the Commerce Cloud instance(s) you wish to integrate with. You do that by modifying the Open Commerce API Settings as well as the WebDAV Client Permissions on the Commerce Cloud instance.
Expand Down Expand Up @@ -652,14 +668,14 @@ The following APIs are available (assuming `sfcc` refers to `require('sfcc-ci')`
sfcc.job.run(instance, job_id, job_params, token, callback);
sfcc.job.status(instance, job_id, job_execution_id, token, callback);
sfcc.manifest.generate(directories, ignorePatterns, targetDirectory, fileName);
sfcc.slas.tenant.add(tenantId, shortcode, description, merchantName, contact, emailAddress, fileName).then(result => ...).catch(err => ...);
sfcc.slas.tenant.get(tenantId, shortcode).then(result => ...).catch(err => ...);
sfcc.slas.tenant.list(shortcode).then(result => ...).catch(err => ...);
sfcc.slas.tenant.delete(tenantId, shortcode).then(result => ...).catch(err => ...);
sfcc.slas.client.add(tenantId, shortcode, file, clientid, clientname, privateclient, ecomtenant, ecomsite, secret, channels, scopes, redirecturis).then(result => ...).catch(err => ...);
sfcc.slas.client.get(tenantId, shortcode, clientId).then(result => ...).catch(err => ...);
sfcc.slas.client.list(shortcode, tenantId).then(result => ...).catch(err => ...);
sfcc.slas.client.delete(tenantId, shortcode, clientId).then(result => ...).catch(err => ...);
sfcc.slas.tenant.add(tenantId, shortcode, description, merchantName, contact, emailAddress, fileName, token).then(result => ...).catch(err => ...);
sfcc.slas.tenant.get(tenantId, shortcode, token).then(result => ...).catch(err => ...);
sfcc.slas.tenant.list(shortcode, token).then(result => ...).catch(err => ...);
sfcc.slas.tenant.delete(tenantId, shortcode, token).then(result => ...).catch(err => ...);
sfcc.slas.client.add(tenantId, shortcode, file, clientid, clientname, privateclient, ecomtenant, ecomsite, secret, channels, scopes, redirecturis, callbackuris, token).then(result => ...).catch(err => ...);
sfcc.slas.client.get(tenantId, shortcode, clientId, token).then(result => ...).catch(err => ...);
sfcc.slas.client.list(shortcode, tenantId, token).then(result => ...).catch(err => ...);
sfcc.slas.client.delete(tenantId, shortcode, clientId, token).then(result => ...).catch(err => ...);
sfcc.user.create(org, user, mail, firstName, lastName, token).then(result => ...).catch(err => ...);
sfcc.user.list(org, role, login, count, sortBy, token).then(result => ...).catch(err => ...);
sfcc.user.update(login, changes, token).then(result => ...).catch(err => ...);
Expand Down Expand Up @@ -1345,4 +1361,4 @@ callback | (Function) | Callback function executed as a result. The error
**Returns:** (void) Function has no return value
***
***
Binary file added docs/images/client-api-user.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a301eb7

Please sign in to comment.