Article Contents:
Automated and Scalable Setup/Management
Manual Setup/Management
Automated and Scalable Setup/Management -
Partner-contributed best practice: This first solution described in this help article was recommended by one of our partners, Carabiner Group. Because it involves custom solutions inside a 3rd-party tool/platform Formstack's customer support team cannot assist directly with the solution. It is provided here as an approach to solving this
use case.
Note - If you're looking for help with building out these solutions, Formstack offers a Partner Consulting program where you can team up with third party Certified Formstack experts to bring your custom projects to life.
The following describes a recommended method of using a Custom Metadata Type in Salesforce to store the mapping IDs and be able to work across both SB and Prod environments without having the need to update our flows. This process will involve creating a custom metadata type in your org.
Recommended account setup:
On the documents tab, create a folder for Sandbox Documents and another folder for Production Documents
Since the mappings are exclusive to each environment, on the Sandbox we only have Sandbox mappings:
Note: “SB” file prefix indicates templates in the Sandbox folder.
Similarly, in production we only have production mappings (lack of prefix on template name indicates production templates):
Next, create a Custom Metadata Type to store the mapping IDs and be able to work across both Sandbox (SB) and Prod environments without having the need to update our flows.
From the flows that call the Formstack API (via an APEX action), we identify which environment we are working from, and pull the corresponding Formstack Mapping ID from the above Custom Metadata Type.
Manual Setup/Management of Mappings -
Step 1: Open up your Mapping settings (Edit Mapping page) inside either the Production org or Sandbox.
Step 2: Under the Field Mapping section, you'll see links for Import and Export. Click the Export link.
Step 3: Copy the JSON code in the export box.
Step 4: Inside Production, create a new Formstack Mapping.
Step 5: Select the same WebMerge Resource and Salesforce Object and click Next.
Step 6: On the next page, look under the Field Mapping section and see links for Import.
Step 7: Paste the JSON from step #3 above.
Step 8: Click Save to finalize.
NOTE: If you are managing Formstack Documents across multiple Sandboxes and/or Sandbox and Production org for Salesforce, then prior to deploying mappings between Sandbox and Production you will first need to install Formstack Documents from the AppExchange into each org and follow the setup process described in this article of connecting the org to your Formstack Documents using the Formstack Documents API Key.
For more comprehensive deployments, view how to use Data Loader to export mappings from Sandbox to Production.