On-Demand Sandboxes

Create, start, stop, reset and delete realm sandboxes from the B2C ODS tool window

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

B2C ODS lists the realm's sandboxes with their state, profile and owner, and refreshes the table every 10 seconds. Start, stop and restart from the toolbar, or right-click a row to rename it, copy its URLs, open its links, reset or delete it

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.com
  • https://admin.us02.dx.commercecloud.salesforce.com
  • https://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

ColumnShows
#Row number
[Name] HostnameThe sandbox hostname, with your custom name in brackets
StateFor example started, stopped, starting or stopping
RealmThe realm ID
Resource ProfileMedium, Large or XLarge
Created ByWho 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

ItemWhat it does
Edit Custom NameSets a name that makes the sandbox easier to find. Leave it empty to remove the name
Start, Stop, RestartSame as the toolbar
Copy › ID, URL, Business Manager URL, Sandbox Data as JSONCopies the value
Open Links › Business Manager, OCAPI, WebDAV, IMPEX, LogsOpens the link in the browser
Reset SandboxResets the sandbox after a confirmation
Delete SandboxDeletes 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

FieldDefaultNotes
RealmLoaded from the API ("Getting realms list...")
Resource ProfileMediumMedium, Large or XLarge. Larger profiles use more credits
Time to live (TTL)0Hours 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

MessageWhat 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 EmptyEdit the API client in B2C Credentials and add its secret
A configuration for these credentials already existsEach 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 uploadThe sandbox of the active connection is stopped. Start it here, then upload again

On this page