Align Scheduler

Using the Vault scheduler, Align users can schedule jobs to run daily. This saves the Align Administrator time by running recurring tasks automatically rather than manually.

For example, Alice Adams is an Align administrator. She uses the Vault Scheduler to create a job that imports data from CRM into Align, runs an assignment preview, and pushes the results from Align back into CRM daily.

For more information on how to schedule a job in Vault, see Vault Scheduling.

Align includes three out-of-the-box processes that can be scheduled to run on a daily basis:

  • Import data from CRM
  • Push data to CRM
  • End-to-end integration – A combination of a CRM import, an assignment preview, and a CRM push. This process can be configured to run off of individual territories, territory trees, or field forces. Additionally, admins can define minimum and maximum thresholds to prevent pushing data to CRM if territories after the assignment preview have too few or too many accounts.

If an error prevents a job from starting, the job owner is notified via email. If an error occurs during a job, the job owner is notified in the Alert section.

If an error prevents a job from starting, the job owner is notified via email. If a job completes successfully or an error occurs during a job, the Run As user is notified via email.

Formatting the Job URL

Scheduled jobs run based on the URL entered in the job. For the three types of tasks that can be scheduled, the base URL is:

https://lambda.veevaalign.com/api/latest/process/

Each task type has a unique URL format that is appended to the base URL:

  • Import data from CRM

    crmImport?vaulturl=${Vault.domain}&vaultid=${Vault.id}&orgId=<ORG_ID>

  • Push data to CRM

    crmPush?vaulturl=${Vault.domain}&vaultid=${Vault.id}&orgId=<ORG_ID>

  • End-to-end integration for a territory or field force

    run?&vaulturl=${Vault.domain}&vaultid=${Vault.id}&orgId=<ORG_ID>&territoryId=<TERR_ID>&jobInstanceId=${job_instance_id__v}&jobName=<JOB_NAME>&lowerLimit=<LIMIT_LOW>&upperLimit=<LIMIT_HIGH>

    The job can be configured to run off of a field force rather than a territory by replacing the &territoryID=<TERR_ID> parameter with the &fieldForceID=<FIELDFORCE_ID> parameter.

The following parameters are used by scheduled jobs. Not all jobs use every parameter:

Parameter

Jobs Using This Parameter

Description

&orgId

  • Import Data from CRM
  • Push Data to CRM
  • End-to-end integration

The 18-character CRM Org ID of the Veeva CRM Org used for the import and push processes.

Navigate to the appropriate Veeva CRM Org in the Integration tab to find this value.

&vaultid

  • Import Data from CRM
  • Push Data to CRM
  • End-to-end integration

The ID of the instance of Align.

Always set this parameter exactly to ${Vault.id}.

&vaulturl

  • Import Data from CRM
  • Push Data to CRM
  • End-to-end integration

The domain of the instance of Align.

Always set this parameter exactly to ${Vault.domain}.

&fieldForceId

  • End-to-end integration

The Vault ID of the field force used to launch the rule.

This parameter cannot be used with &territoryId.

&territoryId

  • End-to-end integration

The Vault ID of the territory used to launch the rule.

This parameter cannot be used with &fieldForceId.

&jobName

  • End-to-end integration

The name of the Scheduled Job.

&lowerLimit

  • End-to-end integration

The lower limit of accounts that can be assigned to a territory (optional)

&upperLimit

  • End-to-end integration

The upper limit of accounts that can be assigned to a territory (optional)

&previewMode

  • End-to-end integration

Set to one of the following values

  • 1 – Uncommitted previews in territories modified by the process are discarded
  • 2 – The process does not run if the process modifies territories with uncommitted previews

If this parameter is excluded from the URL, uncommitted previews are discarded.

Parameters can be entered in any order.

Example URL

For example, the URL for a scheduled job pushing Align data to a CRM org with an ID of 00D5500000091DdEAI would be:

https://lambda.veevaalign.com/api/latest/process/crmPush?vaulturl=${Vault.domain}&vaultid=${Vault.id}&orgId=00D5500000091DdEAI

Creating a Scheduled Job

To create a scheduled job:

  1. Navigate to the Operations tab in the Admin view.
  2. Select Create.
  3. Enter the following job information:

    • Title
    • Name
    • Job Owner
    • Schedule
    • Status
    • Type – Select External URL Call
  4. Enter the formatted URL for the appropriate job in the URL field in the Action Configuration section.
  5. Select the appropriate Run As user. Veeva recommends selecting the Align Integration User for all scheduled jobs.

    Do not select the Align Admin as the Run As user.

  6. Select the Post Session Credentials via Form Data with Key "Session.id" check box.

Once a scheduled job is created, it runs every day at the specified time. The job does not start if there is already a process running that would prevent the job from running, for example, pushing to the same Veeva CRM Org.