Explore On-Demand Sandboxes
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.
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’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 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.
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.
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.
Here’s what they do.
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.
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.