Skip to main content
Build the future with Agentforce at TDX in San Francisco or on Salesforce+ on March 5–6. Register now.

Explore On-Demand Sandboxes

Learning Objectives

After completing this unit, you’ll be able to:

  • List three ways on-demand sandboxes differ from pod-based sandboxes.
  • Explain how merchants consume credits.
  • Detail on-demand sandbox administrator tasks.
  • Describe three things an administrator can do with on-demand sandboxes.

Introduction

Linda Rosenberg is an administrator at Cloud Kicks, a high-end sneaker and apparel company. She’s picked up a lot of Salesforce B2C Commerce skills lately to help manage the Cloud Kicks storefront. This week she wants to learn how to configure an on-demand sandbox.

With Salesforce B2C Commerce on-demand sandboxes, her company can:

  • Innovate quickly: Stay ahead of business requests by developing and delivering new innovation faster.
  • Increase developer productivity: Spin up sandboxes in minutes so developers can build in a clean, predictable manner.
  • Move faster with continuous integration and delivery: Deploy new code more efficiently by reducing the time between build, test, deployment, and integration.

Linda Rosenberg, Cloud Kicks Administrator

Linda’s thrilled that she can acquire public-cloud-based sandboxes using API calls, and control how many of them are active and for how long. Being able to expand and contract usage as developer requirements change gives her an amazing amount of control over resource consumption.

Though she can configure up to 47 standard (POD-based) sandboxes per realm (similar to a Salesforce Org), only five were automatically included when the site was provisioned. That’s sufficient for maintenance development cycles. But for big projects, she needs more. Paying for extra standard sandboxes means they lie dormant most of the time, wasting resources.

She and her developers would rather have more sandboxes than needed, and dial them back to meet demand. This is especially useful for continuous integration and continuous delivery (CI/CD) development processes, where they need to dispose of environments when the work is done.

That’s where on-demand sandboxes come in.

What About On-Demand Sandboxes?

On-demand sandboxes help developers get started on the code faster, and streamline the marketing rollout of feature requirements.

They resemble POD sandboxes but with these added features.

  • They reside in the public cloud.
  • They are integrated in Account Manager role and permission handling. Account Manager is a browser-based B2C Commerce tool that lets administrators create, maintain, and disable B2C Commerce accounts.
  • They are self service via API or a community-based command line tool (SFCC-CI).
  • You can use Open Commerce API (OCAPI) and WebDAV settings as parameters when creating them.
  • You can define a time to live (TTL) to make sure they are cleaned up after a specified time.

On-demand sandboxes make Linda’s life a lot easier. Here’s what she can do.

  • Get a sandbox in minutes: After management purchases on-demand sandbox credits, acquiring a new sandbox takes minutes using an API call or a command line.
  • Create as many sandboxes as she needs: Gear for small or large projects.
  • Use a sandbox in a continuous integration and continuous delivery (CI/CD) development process: On-demand sandboxes are by definition short-lived. They’re intentionally designed so users will acquire them, use them, and throw them away.
  • Expand her usage as required: Linda can increase her sandbox usage when she needs it, and roll it back when she doesn’t.
  • Control costs: Linda’s management likes how they only pay for the sandboxes they use.
  • Go international: This feature is available in North America, EMEA, and Asia/Pacific-Japan.

How Credits Work

Linda’s management orders on-demand sandboxes through their Salesforce account executive (AE). On-demand sandboxes are usage-based, so merchants like Cloud Kicks can purchase credits. For now, partners can only access credits on merchant on-demand sandboxes.

With this model, Linda can keep a few sandboxes running for an extended period or create several for short-term projects. She can use the credits to consume uptime or downtime. Deleted sandboxes don’t consume credits at all.

This diagram illustrates how she and her management might track their consumption over time.

Track credit consumption over time.

Here’s how credits work.

  • Create: When Linda creates or starts a sandbox, the sandbox consumes uptime at the rate of 1 credit per minute. Less than a minute is counted as a minute.
  • Stop: When she stops the sandbox (or a process stops it), it consumes downtime at the rate of 0.3 credits per minute. Less than a minute is counted as a minute.
  • Delete: When she deletes a sandbox (or a process deletes it), it stops consuming credits.

Linda’s management looks to her and the developers to determine how many credits they need. Salesforce provides a usage calculator that takes into consideration the number of developers (including partner developers), the number of CI processes they plan to run per day, and the number of weeks in the contract. It’s not an exact amount, but it gives them a good idea of how many credits they need. She uses her own copy of this sheet to monitor her team’s usage and adjust credits appropriately and uses the REST APIs to track usage data. We get to that in a later unit.

Tip

Tip

To make a copy of the usage calculator, open the calculator and click File > Make a Copy.

Linda and her team have total control over how they use their sandboxes. They can use credits to run a few sandboxes over an extended period of time, or many sandboxes over short periods of time. Her management can purchase a single SKU that gives them a block of credits (50,000), or they can purchase an individual environment. It’s all about meeting business, project, and developer requirements.

Who Does What?

Cloud Kicks has a motivated and hardworking team involved with on-demand sandboxes that includes participants from purchasing, administration, and development.

On-demand sandboxes involve purchasing, administration, and     development.

Here’s what they do.

Step Team Member Action
1 Purchaser
  • Determine budget, contract, and organizational requirements.
  • Review legal terms and agreements, and decide credit purchase needs.
  • Work with Salesforce account executive to place an order in Org62.
  • Get the site’s realm ID from the account executive.
  • Finalize the purchase, after which an automated API call to the sandbox system enables the realm.
2 Administrator
  • Get a new Account Manager role.
  • Confirm that users meet requirements.
  • Spin up required sandboxes via Sandbox API or SFCC-CI tools.
  • Manage sandbox usage and uptime.
  • Transfer sandbox access information to developers.
3 Developer
  • Access sandboxes for development-related activities.

Don’t Forget Storefront Code and Data

New on-demand sandboxes don’t contain storefront data. This means that Linda must import and upload it. You can’t directly migrate code and data from a POD-based sandbox to an on-demand sandbox, but you can export data and code from a POD sandbox and then use the On-Demand Sandbox API to import the data and code into an on-demand sandbox.

Next Steps

In this unit you explored how B2C Commerce on-demand sandboxes differ from POD-based sandboxes, and you learned how you can improve your development processes with the on-demand version. You also learned how merchants consume credits and how you can use on-demand sandboxes in your CI/CD processes.

Next, you learn how to acquire and use an on-demand sandbox.

Teilen Sie Ihr Trailhead-Feedback über die Salesforce-Hilfe.

Wir würden uns sehr freuen, von Ihren Erfahrungen mit Trailhead zu hören: Sie können jetzt jederzeit über die Salesforce-Hilfe auf das neue Feedback-Formular zugreifen.

Weitere Infos Weiter zu "Feedback teilen"