Managing Align Sandboxes

Align customers can create Align sandboxes from their production orgs of Align. Align sandboxes contain a subset of data from the corresponding production org. These Align sandboxes can be connected to CRM sandbox orgs, enabling customers to test Align functionality using real-world data in a manner that does not impact production data.

Whenever these CRM sandboxes are refreshed, connected Align sandboxes must also be refreshed to ensure the Align sandbox contains correct data. This process involves the following general phases:

  1. Backup certain records from the Align sandbox
  2. Refresh the Align sandbox from the associated Align production org
  3. Modify the refreshed Align sandbox’s integration record
  4. Back up and edit records in the connected CRM sandbox org to ensure only relevant records are imported into the refreshed Align sandbox
  5. Import records from the CRM sandbox org into the refreshed Align sandbox
  6. Restore edited CRM records modified prior to the import
  7. Push committed assignment rules from the Align sandbox to the CRM sandbox org

These phases ensure data in Align sandboxes is accurate and complete, while also minimizing downtime while CRM sandbox org data imports into the Align sandbox.

Creating an Align Sandbox

To create an Align sandbox:

  1. Navigate to the appropriate Align production org.
  2. Navigate to Align Admin > Deployment > Sandbox Vaults.
  3. Navigate to the Active Sandbox Vaults section.
  4. Select Create.
  5. Create a new Sandbox named with the following properties:

    • From – Vault or Snapshot
    • Name – [Customer Name] [Size] Sandbox
    • Size – See Sandbox Allocations for more information
    • Release – Limited
    • Domain – Your Domain
    • Vault Owner – Select Current User

    Align sandboxes can be created from another Align org or from a Sandbox Snapshot. Snapshots are copies of your Align sandboxes that store configuration information and data at a given point in time. Your organization can use snapshots to create and refresh Align sandboxes more efficiently. See Administering Sandbox Snapshots for more information.

  6. Navigate to Admin > Users & Groups > Vault Users.

  7. Select Create.
  8. Create a new user named align.admin with the following properties:

    • User Name – align.admin@yourdomain.com
    • Email – align_admin@veeva.com
    • License Type – Full User
    • Security Profile – Vault Owner
    • Domain Admin – Select this check box

    Ensure this user is a Domain User, not a Cross-Domain User.

  9. Select Save.
  10. Create the Align Integration User.

Sandbox Allocations

Align follows standard Vault allocations for sandboxes. By default, customers automatically receive:

Type

Allocation

Record Limit

Refresh Limit

Full

1

Unlimited

Daily

Large

2

10,000,000

Daily

Small

4

100,000

Five times per day

For more information on administering sandbox Vault orgs, see the following Vault Online Help article.

Backing up Align Sandbox Data Before Refreshing

The refresh process deletes certain records in an Align sandbox. Therefore, admins should backup the following records in the Align sandbox via the data loader before initiating the refresh:

  • Any assignment rules
  • Records of modeling objects. These objects have an API name ending in model__aln.
  • Records of history tracking objects
  • Records with object references to CRM-sourced objects, for example, functional_profile__aln
  • Records of joint objects that join to CRM-sourced objects, for example, roster_member_territory__aln
  • Records connected to crm-sourced object records, for example, roster_member_territory__aln
  • The following types of MCCP related records:
  • mc_cycle__aln
  • mc_cycle_channel__aln
  • mc_cycle_plan__aln
  • mc_cycle_plan_channel__aln
  • mc_cycle_plan_product__aln
  • mc_cycle_plan_summary__aln
  • mc_cycle_plan_target__aln
  • mc_cycle_product__aln

Admins can upsert these backed up records once the refresh is complete.

Backing Up Manually Assigned Records from Production Align Orgs

This section only applies if you have manually assigned account_territory__aln or roster_member_territory__aln records. Manually assigned records are not automatically copied over into refreshed Align sandboxes and must be manually backed up from the production Align org:

  1. Navigate to the Align production org.
  2. Navigate to Loader > Extract.
  3. Enter the following fields:

    • Object – account_territory__aln
    • Include Non-editable Fields – Select this check box
    • Where Clause: end_date__aln > Today and source__aln CONTAINS ('manual__aln','import__aln','mccp__aln')
  4. Select Extract. The extracted CSV file is used after the refresh to upsert manually assigned territories. See Upserting Manually Assigned Account Territories for more information.
  5. Repeat this process for the roster_member_territory__aln object.

Refreshing an Align Sandbox

After backing up the appropriate records, admins can refresh an Align sandbox from its associated Align production org.

Before refreshing an Align sandbox, ensure all outstanding Territory Feedback in the Align production org is resolved.

To refresh an Align sandbox:

  1. Navigate to the Align production org.
  2. Navigate to Align Admin > Deployment > Sandbox Vaults.
  3. Navigate to the Active Sandbox Vaults section.
  4. Select the More Actions icon.

  5. Select Refresh from Vault.

The Refresh from Vault process may take several hours to complete.

Integrating Refreshed Align Sandboxes with a CRM Sandbox

After refreshing an existing Align sandbox, admins must integrate the Align sandbox with the appropriate CRM sandbox org. The current refresh process modifies certain aspects of the Align sandbox that must be reverted by the admin.

Updating the Integration Record

The Align refresh process copies over the CRM org record from the production org of Align into the CRM org record of the Align sandbox org. This includes the record’s name, type, and external ID, as well as all of the external IDs of field_mapping__aln records related to the org.

All of these records and components must be updated by the admin:

  1. Navigate to Admin > Business Admin > Veeva CRM Orgs.
  2. Edit the CRM Org record.
  3. Update the Name field to include Sandbox in the name.
  4. Select Sandbox for the CRM Org Type.
  5. Enter the appropriate username and password for the integration user with CRM.

  6. Edit the External ID field and replace Production with Sandbox.
  7. Select Save.

Preparing Align Sandboxes for the Import from CRM Sandbox Orgs

After updating the appropriate integration and field mapping records, admins can initiate a full refresh of data from the connected CRM sandbox org:

  1. Navigate to the Integrations tab in the Align sandbox.
  2. Select the Gear icon next to the CRM org in the Veeva CRM section.

  3. Select Edit.
  4. Select Yes for the Full CRM Refresh field.
  5. Select Save.
  6. Navigate to each account rule in the sandbox and ensure the source__aln field matches the source__aln field of the corresponding account rule in the Align production org.

Do not initiate an Import from CRM job after completing this step. Doing so causes all production-created account territories from the CRM sandbox org to import into the Align sandbox with a source of CRM, significantly impacting the performance of the import job. See Cleaning CRM Data Before Importing into Align for more information.

Delete Targeting Rule Channel and Targeting Rule Product Records

When a refresh occurs, MCCP data, for example MC Cycle and MC Cycle Channels, are not copied. This causes the Align Rules Engine to fail after a refresh. To prevent this:

  1. Data load the backed up MCCP records from the sandbox prior to the refresh.
  2. Delete the following records from the refreshed sandbox:

    • All targeting_rule_channel__aln records
    • All targeting_rule_product__aln records
    • All account_rule__aln records with a rule_type__aln of targeting__aln

Cleaning CRM Sandbox Data Before Importing into Align Sandboxes

Before importing data from the connected CRM sandbox org into the refreshed Align sandbox, admins must ensure only relevant records are imported into the Align sandbox. By default, all ObjectTerritory2Association records are imported, including historical records no longer in use. This can result in a large number of records being imported into the Align sandbox, significantly impacting the performance of the import job.

To avoid this, admins must edit Territory2 records in the CRM sandbox org via the data loader:

  1. Navigate to the CRM sandbox org.
  2. Use the data loader to export Territory2 records. Include the following fields:

    • Id
    • Master_Align_Id_vod
    • Name
  3. Save a duplicate of the downloaded CSV file. The original file is used after importing into the Align sandbox to restore Master_Align_Id_vod fields.
  4. Open the duplicated CSV file.
  5. Clear the Master_Align_Id_vod field for all exported records.
  6. Use the data loader to update all Territory2 records in the CRM sandbox org via the edited CSV file.

Deleting Align Sandbox Mastered MySetup Products in CRM Sandbox Orgs

In addition to editing Territory2 records, My_Setup_Product_vod records copied from the production CRM org to the sandbox org also need to be deleted if they have a populated Master_Align_Key field. This ensures Align sandbox mastered records are correctly pushed from the Align sandbox to the CRM sandbox org.

Admins can manually delete these records from the CRM sandbox org, or use the data loader to delete all My_Setup_Product_vod records in the CRM sandbox org with a populated Master_Align_Key_vod field.

Deleting CRM Sourced Alignments

This section is only applicable if you want all territory alignments in the CRM sandbox org to be sourced from the Align sandbox.

  1. Navigate to the CRM sandbox org.
  2. Use the data loader to export ObjectTerritory2Association records via the following query:

    SELECT id, ObjectId, Territory2Id, Territory2.DeveloperName, AssociationCause FROM ObjectTerritory2Association WHERE AssociationCause = “Territory2Manual”

  3. Use the exported CSV file to delete the matching records.

Import Data from CRM Sandbox Orgs into Refreshed Align Sandboxes

Once all appropriate data in both the CRM sandbox org and the Align sandbox is prepared, admins can run the CRM Import to populate records in the Align sandbox:

  1. Navigate to the Integrations tab.
  2. Select the Gear icon next to the CRM org in the Veeva CRM section.

  3. Select Import from CRM.
  4. Use the data loader to restore all records backed up in Refreshing a Sandbox, including records of the following objects

    • account_territory__aln
    • roster_member_territory__aln
  5. Perform a Preview and Commit of Assignment Rules to generate account to territory records not sourced from the CRM sandbox org.

Upserting Manual Assignments

Manually assigned account_territory__aln and roster_member_territory__aln records are not copied from Align production orgs to refreshed sandboxes and must be manually restored from the production export:

  1. Navigate to Loader > Load.
  2. Select the CSV file extracted in Refreshing an Align Sandbox.
  3. Populate the following fields:

    • Object Type – account_territory__aln
    • Action Type – Create
  4. Select Map Fields.
  5. Select Start Load.

Setting Roster Member Attributes After Importing

This section only applies if you are using User Management functionality in Align. When a refresh of an Align sandbox occurs, roster_member__aln records are not copied over from the Align production org. Ensure the following roster_member__aln fields match the coresponding roster_member__aln record in the Align production org:

  • mastered_by_align__aln
  • manager__aln – The Align Id should reference the manager when data loading this information
  • crm_time_zone__aln
  • delegated_approver__aln – The Align Id should reference the Delegated Approver when data loading this information

Restoring CRM Data Before Pushing from Align

Before territory assignments in the Align sandbox can be pushed to the CRM sandbox org, admins must perform the following process to restore the Master_Align_Id_vod fields of Territory2 records that were cleared in Cleaning CRM Data Before Importing into Align Sandboxes:

  1. Navigate to the CRM sandbox org.
  2. Use the data loader to restore Master_Align_Id_vod fields to Territory2 records via the CSV file downloaded in Cleaning CRM Data Before Importing into Align Sandboxes.

Ensure you use the original, unedited CSV in the data loader, rather than the duplicated and edited CSV used to clear these fields before the import.

Once the records are restored in CRM:

  1. Navigate to the Align sandbox.
  2. Navigate to the Integrations tab.
  3. Select the Gear icon next to the CRM org in the Veeva CRM section.

  4. Select Edit.
  5. Select Yes for the Full CRM Refresh field.
  6. Select Save.
  7. Navigate back to the Integrations tab.
  8. Select the Gear icon next to the CRM org in the Veeva CRM section.

  9. Select Import from CRM.

Pushing from Align Sandboxes to CRM Sandbox Orgs

After committing all assignment rules in the Align sandbox and after restoring Master_Align_Id_vod information in the CRM sandbox org, admins can push the assignments in the Align sandbox:

  1. Navigate to the Integrations tab.
  2. Select the Gear icon next to the CRM org in the Veeva CRM section.

  3. Select Push to CRM.

After the initial push to Veeva CRM is complete, update the Daily Integration process with the refreshed Veeva CRM sandbox's org ID and ensure the job is active.