migrate
migration
import
upload
transfer

Introduction

When you refresh a sandbox org that you are using with S-Docs, there are a few considerations to keep in mind to ensure you can continue using S-Docs like normal once the refresh is complete. This article will detail what actions to take when you refresh your sandbox from production.

You may also want to view Salesforce's Sandbox Considerations article for additional tips on what to do when refreshing your sandbox org.

Note: You do not need to reinstall S-Docs or S-Sign when you refresh your sandbox.

Record IDs

Although sandbox record data will be identical to production record data after a sandbox refresh, sandbox and production record IDs are always unique between different orgs. S-Docs can be affected by this in two main ways.

Template Preview IDs

If you're using the template editor Save & Preview feature, record IDs in the Preview ID field will point to production records after a sandbox refresh. You must replace these IDs with corresponding sandbox record IDs. Record IDs can be found in your browser's URL bar when you're viewing a record.

The Preview ID field can be found in the template editor under the Advanced Options tab.

S-Docs Template IDs 

If you've referenced S-Docs template IDs anywhere in your org, they will point to production template records after a sandbox refresh. You should replace these references with plain text template names. You can also replace them with sandbox template IDs, but we recommend using the template name since record names don't change between production and sandbox orgs. This way, you won't have to update these references after future sandbox refreshes, or when you migrate templates from sandbox to production orgs.

S-Docs template IDs are commonly referenced using the doclist parameter with document automation with S-Docs Jobs, mass merge, or one-click/zero-click S-Docs buttons.

URLs

Any references to login.salesforce.com must be changed to test.salesforce.com, and any references to your Salesforce production domain (e.g. na132.salesforce.com) must be changed to your Salesforce sandbox domain (e.g. cs5.salesforce.com). S-Docs can be affected by these URLs in the following places.

Custom Settings

From the setup menu, type "Custom Settings" into the Quick Find bar and click Custom Settings in the dropdown menu. Find the SDocsSettings entry and click Manage.

Click the Edit link next to SDocsSettings.

Then, ensure than any references to the Salesforce production login URL or your Salesforce production domain are updated. In the following example, #1 would need to be updated to test.salesforce.com, and #2 would need to be updated to a sandbox domain, such as cs5.salesforce.com.

You may also need to update the ConnectedAppUserName if you are using the Run As User feature. This username is used as the "run as" user if the provided username is not found or not valid. It must be a valid Salesforce username in your sandbox org.

Remote Site Settings

If you have a remote site setting configured for the Salesforce production login URL or your Salesforce production domain, you'll need to add new remote sites for your Salesforce sandbox login URL and your Salesforce sandbox domain.

From the setup menu, type "Remote Site" into the Quick Find bar, click Remote Site Settings in the dropdown menu, and click New Remote Site to add your sandbox remote sites.

Run As User Connected App

If you're using the Run As User feature, you'll need to update your Connected App's Callback URL. From the Setup menu, type "Apps" into the Quick Find bar, then click App Manager in the dropdown menu. Find the SDocs Connected Apps entry, click the dropdown arrow, and click Edit.

Scroll down to the API (Enable OAuth Settings) section, and update the Callback URL to:

https://test.salesforce.com/services/oauth2/callback

Click Save.

S-Sign Considerations

After refreshing a sandbox from production, your S-Sign Site will be updated to your production site. The production site URL includes your Salesforce production domain, which will not function properly in your sandbox and cannot be edited.

Because of this, you must deactivate the production site and create a new site with your Sandbox domain. Click here to view instructions for creating a new site for S-Sign.

After re-creating your S-Sign site, you'll need to provide S-Sign with your site's information and assign guest user permissions once more. Click here to view instructions.