A sandbox refresh copies production over the sandbox: configurations, data, user passwords and customisations. Anything you changed in the sandbox is overwritten, and a short list of things isn’t copied at all, starting with the web store’s domains. Both halves leave work to do afterwards.
This is the list I keep for a sandbox that runs a SuiteCommerce store, in the order I’d work through it, with the Oracle page behind each step. I built it from a sandbox that had been refreshed before I started on it, one item at a time, as each turned up broken or reset. I haven’t sat through a refresh with it yet, so where a step rests on Oracle’s documentation rather than on something I’ve seen, I say so.
What a refresh copies and what it doesn’t
Oracle’s refresh overview is blunt about it. A refresh “copies all configurations, data, user passwords, and customizations from the source account into the target sandbox account”, and “any changes you have made to the target sandbox account are overwritten.” Websites come across, integration records come across with their settings, and so do installed bundles.
The exceptions are on Oracle’s page of data that isn’t copied from production. The ones that hit a web store:
| Not copied | What it breaks in the sandbox |
|---|---|
| Web store domains | The store has no domain until you set one up |
| Customer Center role assignments | Shopper logins stop working |
| Token-based authentication tokens | Every tool and integration that signs in with a token |
| OAuth 2.0 authorised applications | Each app has to be authorised again |
| SAML configuration | Single sign-on into the sandbox |
The page heads its first item “Websites and web store domains”, but the text under it is about domains. The websites themselves come across.
Anything that only ever existed in the sandbox goes too. Oracle says so for integration records and for websites built only in the sandbox. If someone has been building in the sandbox, Oracle’s preservation steps cover it: import the changed objects into a SuiteCloud project before you activate the new copy, then deploy them back with SDF. A bundle keeps its definition only if it was installed in production before the refresh.
Before you request it
The refresh copies production’s settings over the sandbox’s, so a few things are settled in production, before the request goes in.
Sandbox email. Production decides where the sandbox’s email goes. In production, go to Setup > Company > Email > Email Preferences, open the Sandbox and Release Preview subtab, and under Sandbox Options pick Send Email To (Suggested), Send Email to Logged In User or Do Not Send Emails. Oracle’s sandbox email page says that “upon refresh, the settings in your sandbox accounts always revert to the sandbox email preferences you set in your production account.” Change it in the sandbox alone and the next refresh puts production’s choice back.
For a web store, pick Send Email To. The same page warns that email generated by a sandbox web store isn’t sent to the user logged in to NetSuite. An order notification from a test checkout goes to the shopper’s own address, so Send Email to Logged In User doesn’t keep it in-house.
Who gets in afterwards. The request asks which users should have access once the refresh is done. With Administrators only, only the Administrator role is copied, so anyone who signs in under another role is locked out until someone gives them access again.
Timing. A refresh can’t be cancelled once it’s requested, and Oracle advises against requesting one when an upgrade date is near. When the copy is ready, you get an email and 14 days to activate it, with a second notice after 12. Leave it past 14 and the copy is deleted.
After the refresh, in order
1. Check where sandbox email goes
Do this first, because most of what follows ends in a test that can send something. In the sandbox the setting lives on a different subtab: Setup > Company > Email Preferences, then Email Options. Check it says what you chose in production.
The sandbox I work on was set to Do Not Send Emails. No email test of any kind had been delivering, and nothing on screen says so. It looks exactly like a workflow that never fires.
One exception holds whatever the setting says. Security-sensitive emails, such as password resets and email address changes, always go to the address’s real owner. Test with customer records that carry your own address.
2. Set up the sandbox domain
Domains aren’t copied, so the sandbox store has none until you add one under Commerce > Hosting > Domains. While you’re on the domain record, check its hosting root. That’s the File Cabinet folder the domain serves from, and Oracle’s domain setup page offers Live Hosting Files and Staging Hosting Files. Pick the folder you mean, not the one production uses by habit.
3. Put the sandbox robots.txt back
The robots.txt I found on the sandbox was a byte-for-byte copy of production’s, down to a Sitemap: line pointing at production’s sitemap. Oracle’s refresh pages don’t mention the File Cabinet either way. They do say a refresh “copies all configurations, data, user passwords, and customizations”, and that file was production’s. Treat every file in the sandbox’s hosting root as production’s until you’ve checked it.
Which robots.txt to put back depends on whether sandbox pages are already in Google. Blocking crawlers too early stops them reading a noindex tag. I covered that, and the extension that adds the tag, in how to keep a NetSuite sandbox web store out of Google.
4. Deploy SSP applications to the sandbox domain
SuiteScript 2.0 SSP applications must be explicitly deployed to the domains they serve. SuiteScript 1.0 applications are available by default, so this step is for 2.0 only. A deployment to production’s domain doesn’t reach the domain you set up in step 2. For each SuiteScript 2.0 SSP application your store calls, go to Commerce > Hosting > SSP Applications, click View, click Deploy to Domain, pick the sandbox domain and save. Deploy to Site deploys to all of a site’s shopping domains, its checkout domain, or both. If production deployed an application to the whole site, the new domain may already be covered. Oracle doesn’t say, so check.
The symptom gives nothing away. On the sandbox I work on, the home page showed SCA’s “An internal error has occurred” box. A blog extension called a SuiteScript 2.0 service under /app_ss2, the SSP application behind that path had no deployment for the sandbox domain, and the request came back with the storefront’s HTML instead of data. Production had the deployment all along.
On the application record, the deployments sit on the Deployments tab, in three subtabs: Site Shopping, Site Checkout and Domain. Site Shopping can say “No records to show” when the application is deployed per domain, so open the Domain subtab too.
5. Create the SuiteCommerce configuration for the sandbox domain
Saving the SuiteCommerce Configuration record creates a custom record for the selected domain, one per domain. The sandbox domain is new, so it has no record, and a domain without one runs on the configurationManifest.json defaults. It doesn’t pick up production’s settings. The store still loads, which is why this one is easy to miss. It just doesn’t behave like production.
Oracle’s Copy Configuration tool, on Commerce > Websites > Configuration, copies one domain’s record onto another and overwrites the destination. It takes the source from an Origin Domain list, and since domains aren’t copied, production’s domain may not be in that list in a refreshed sandbox. I haven’t checked. On the sandbox I work on, I copied production’s record across with a script and held three things back: the sandbox’s own response headers, and the Google Analytics and Tag Manager IDs, left blank so sandbox traffic stays out of production’s reports. Whichever way you copy, decide what to hold back first, because the copy overwrites it.
6. Activate the theme and extensions on the sandbox domain
An activation belongs to one domain, and the new domain has none. Create one in Commerce > Extensions > Extension Manager with the theme and every extension the sandbox runs. Oracle says a domain’s first activation needs a cache invalidation request afterwards.
Expect an extension deployed only to the sandbox to be missing from the list. Oracle doesn’t cover extensions specifically, but an extension has to be deployed to the account to be available for activation, and a refresh overwrites the sandbox with production’s records. Deploying sandbox-only extensions to production as well, without activating them there, saves a redeploy after every refresh. The noindex post walks through that for one extension.
7. Give your test customers access again
Customer Center role assignments aren’t copied, and Oracle is plain about the result: “customer login functionality does not work in sandbox after a refresh, even if it has been working in the production account.” Its fix is a CSV import of the customer records you test with, setting their passwords and Give Access to true. For one or two test customers, it’s quicker on the record: open the customer’s Access subtab, check Give Access, select Customer Center in the Role field, check Manually Assign or Change Password and enter the password.
Use test customers whose email address is yours. Step 1’s exception means their password emails go to whoever owns the address.
8. Issue new tokens
On refresh, the Token Key and Token Secret are deleted and have to be created again in the sandbox. The integration record itself comes across with its settings, consumer key and secret included, and Oracle says those can only be regenerated in the original account. Create new tokens and leave the consumer key and secret alone.
For the SuiteCommerce developer tools, that means authorising them against the sandbox again before your next deploy. OAuth 2.0 applications have to be authorised again in the sandbox, and a machine-to-machine setup is cleared by every refresh.
9. Check what your integrations point at
After a refresh the sandbox holds production’s preferences, and production’s preferences point at live services. Oracle makes the same point about website links: “Neither internal nor external hard-coded links are modified during sandbox refreshes.”
Card payments are the documented case of a setting you redo every time. Oracle’s procedure for re-entering payment processing profile credentials has to be repeated “each time you refresh your sandbox account.”
The undocumented cases are your own. On the account I work on, a delivery integration had two authentication records, one for the partner’s QA environment and one live, and a company preference chose which one fulfilments posted with. Production’s preference points at the live one, and a refresh copies that choice into the sandbox. The first fulfilment test afterwards would go to the live service. Go through every custom preference and script parameter that names an endpoint, a credential or an authentication record, and set each one to what the sandbox should use.
10. Decide which scheduled scripts run
Scheduled scripts copied from production are disabled by default in the sandbox, and map/reduce scripts come across unscheduled. You can set them back to Scheduled once the refresh is activated. Scheduled workflows don’t run automatically in a sandbox at all, though you can run them by hand to test. Turn on only what you’re testing, and check anything that sends email or calls an outside service against steps 1 and 9 first.
Write your own version down
None of these fail with an error you’d connect to a refresh. A store on default settings, a vague internal error, a login that won’t work, an email that never arrives. Each looks like its own bug. Keep the account’s version of this list, with its real record names and domains, next to the code, so the next refresh starts from the list and not from the symptoms.
This post is part of the NetSuite Admin cluster. The tools I use are on the resources page.