The B2C ODS tool window, at the bottom of the IDE, manages the on-demand sandboxes of your realms through the Salesforce ODS API. It works with an API client, not with a project connection, so you can see every sandbox in a realm, create new ones and start or stop them without opening Business Manager or the Control Center
Add a configuration
A configuration is one API client on one API server. Each configuration gets its own tab
Prepare the API client
In Account Manager, give your API client access to the sandbox API for your realm. Then add its client ID and secret on the OCAPI tab of B2C Credentials
Create the tab
Open B2C ODS (View › Tool Windows, or More › Tool Windows). With no configuration yet it shows "No On-Demand Sandboxes Configurations". Click + (Add On-Demand Sandboxes Configuration)
Fill in the dialog
Enter a Name, pick the Api Server and select the OCAPI Credentials, then click Get Token and Save. The plugin requests an access token and opens the tab with the realm's sandboxes
The Api Server list has four hosts:
https://admin.dx.commercecloud.salesforce.com(default)https://admin.us01.dx.commercecloud.salesforce.comhttps://admin.us02.dx.commercecloud.salesforce.comhttps://admin.us03.dx.commercecloud.salesforce.com
Double-click a tab to rename it. Closing a tab asks before it removes the configuration. Edit Configuration in the toolbar opens the same dialog, with the credentials locked
Sandboxes table
| Column | Shows |
|---|---|
| # | Row number |
| [Name] Hostname | The sandbox hostname, with your custom name in brackets |
| State | For example started, stopped, starting or stopping |
| Realm | The realm ID |
| Resource Profile | Medium, Large or XLarge |
| Created By | Who created the sandbox |
The toolbar shows Total, Started, Stopped and Selected counters. Refresh Sandboxes reloads the table, and the auto refresh toggle reloads it every 10 seconds while it is on
Start, stop and restart
Select one or more rows and use Start Sandbox, Stop Sandbox or Restart Sandbox in the toolbar. With several rows selected the labels change, for example "Start 3 Sandboxes". Start runs right away. Stop, Restart, Reset and Delete ask first and list the sandboxes they affect
Sandbox menu
Right-click a sandbox
| Item | What it does |
|---|---|
| Edit Custom Name | Sets a name that makes the sandbox easier to find. Leave it empty to remove the name |
| Start, Stop, Restart | Same as the toolbar |
| Copy › ID, URL, Business Manager URL, Sandbox Data as JSON | Copies the value |
| Open Links › Business Manager, OCAPI, WebDAV, IMPEX, Logs | Opens the link in the browser |
| Reset Sandbox | Resets the sandbox after a confirmation |
| Delete Sandbox | Deletes the sandbox after a confirmation |
To work with a sandbox in the project, copy its URL and add it as a connection in Connections
Create a sandbox
Click Add Sandbox in the toolbar to open Create On-Demand Sandbox
| Field | Default | Notes |
|---|---|---|
| Realm | Loaded from the API ("Getting realms list...") | |
| Resource Profile | Medium | Medium, Large or XLarge. Larger profiles use more credits |
| Time to live (TTL) | 0 | Hours the sandbox lives, within your realm's quotas. 0 means it never expires |
Click Create On-Demand Sandbox. The plugin confirms that "The sandbox creation has started!" and shows the new sandbox. Creation takes some time, so refresh the table or leave auto refresh on to follow its state
Troubleshooting
| Message | What to do |
|---|---|
| "Failed to get Access Token!" | The client ID, secret or API server is wrong, or the client has no sandbox API access for the realm |
| Client Secret is Empty | Edit the API client in B2C Credentials and add its secret |
| A configuration for these credentials already exists | Each API client can back one configuration. Use the existing tab |
| "Error occurred while getting realms" | The client can't list realms. Check its realm access in Account Manager |
| Sandbox is down during upload | The sandbox of the active connection is stopped. Start it here, then upload again |