This article describes the steps needed to initialize a new sandbox from an org that has Decisions on Demand installed, and (optionally) import business policies from the source org or another sandbox.


This article contains the following sections:

  • Creating a full or partial copy sandbox
    This section outlines how to configure full or partial copy sandboxes for use with Decisions on Demand
    Please read this section before creating a new sandbox.
  • Completing the Decisions on Demand setup in a sandbox
    Describes steps required to complete the setup of Decisions on Demand after creation of a new sandbox
  • Cleaning up orphan policies from an existing sandbox
    Explains how to clean up invalid business policies from a sandbox

Creating a full or partial copy sandbox

When setting up a new full or partial copy sandbox from an org with existing Decisions on Demand business policies, bear in mind that a business policy has two components:

  • A Salesforce record
    This record (of type DecsOnD__Policy__c) is essentially a wrapper that serves to display and manage the policy in Salesforce.
  • Policy structure and content
    The description of tables and column, and the content of the tables (the actual rules). These reside in the Decisions on Demand Policy Management Server -- not in Salesforce.

For technical reasons, the structure and content on our servers is not automatically copied to the new sandbox along with the new Salesforce record. This means you should also avoid copying the Salesforce business policy records to your sandbox from the source org -- otherwise they will end up as invalid (orphan) instances with no structure or content. 


When creating or refreshing a sandbox, please use a Sandbox template that excludes DecsOnD__Policy__c. Note that excluding DecsOnD__Policy__c will also exclude DecsOnD__PolicyExecutionRecord__c, which has a master-detail relation to a business policy.


Completing the Decisions on Demand setup in a sandbox

After creating a new sandbox, the following steps are required to initialize Decisions on Demand:

  1. (optionally) Update the app
    When your sandbox is created from an org which already has Decisions on Demand installed, the app will be copied into the sandbox automatically.

    If you want to upgrade the sandbox to the latest version of the app, navigate to our AppExchange listing and click Get it Now.

    Make sure you are logged into with your sandbox credentials, and then follow the prompts.

  2. Install your secret key
    Before you can import or create policies, the sandbox needs to retrieve a secret key from our server.
    This is mostly automated, but requires one manual step: simply visit the Decisions on Demand Setup tab in the app, and validate that it shows VALID KEY



  3. (optionally) Import policies
    You can import existing business policies from another org.

    To learn more, please see this support article.


Cleaning up orphan policies from an existing sandbox

If you have previously created a sandbox with a copy of the business policy records included, you will need to remove the invalid policies.

NOTE: this is not required if you followed the steps above when creating your sandbox.


To find invalid policies and remove them:

  • On the Business Policies tab, select the Not Active view

  • Delete each policy with Invalid status

    Details are described in this article.

    NOTE: if there are many policy execution records in your sandbox, this step may take hours or even days to complete, due to the way Salesforce handles bulk deletes. Please schedule this task well in advance of any deadlines.