You are here:
Vlocity Scheduled Job Fields (Managed Package)
For the managed package runtime, to create batch jobs, go to the Vlocity Scheduled Jobs tab. For each job you want to schedule, add a record by clicking New. Then specify the settings you need in the Vlocity Scheduled Job fields.
This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.
-
Name: Give the job a descriptive name.
-
Active: Set to true if the job is to be executed when scheduled. To disable execution, set to false.
Note that if an error occurs when the query is executed, the batch framework sets this field to false.
-
Batch Size: Specifies the maximum number of records processed by an instance of the job.
For example, if you specify a batch size of 20 and the query returns 100 records, the job is run five times, processing 20 records each time. Default is 1.
-
Data Source Type: Valid values are No Input, Data Input, or Query. Spring '20 and later versions also support List Input.
If the Data Source Type is Query, at least one row must be returned for the job to run.
-
Data Source Spec: Specifies the data for the batch job, which must correspond to the Data Source Type:
-
No Input: The Integration Procedure or VlocityOpenInterface doesn’t require input data.
-
Data Input: The Integration Procedure or VlocityOpenInterface expects JSON data with merge fields. For information about merge fields, see Access Integration Procedure Data JSON with Merge Fields (Managed Package).
Note that in this case the Integration Procedure or VlocityOpenInterface is placed in the batch queue immediately after it is called because it is dependent on data from the process that calls it. Therefore the Frequency property is ignored.
-
List Input: The Integration Procedure or VlocityOpenInterface expects a list in JSON format. For an example, see Batch Action for Integration Procedures (Managed Package).
-
Query: A query retrieves the data required by the Integration Procedure or VlocityOpenInterface. Example query:
SELECT Id, Name FROM Account WHERE Id IN (%mergeData:Id%) LIMIT 2
-
- Data Source Data: This field isn't used. Don't edit.
-
Description: Describes the job.
-
Email Address List: Specify a list of comma-separated email addresses that receive emails when Send Email On has a specified value. If no email has been entered and Send Email On has a specified value, an email is sent to the user that runs the job. Do not put spaces after the commas that separate the emails. Example email response:
Batches Processed: 1 Number Of Errors: 1 Total Batches: 1 Status: Completed -
Send Email On:
-
Error: Sends an email when a batch job error occurs.
-
Finish: Sends an email when any batch job finishes regardless of whether an error occurred.
-
Success: Sends an email when any batch job finishes successfully.
-
-
Frequency: Required. Specifies how often the job is executed. Valid values are:
-
Ignore: Jobs that run as a Next Scheduled Job must have their frequency set to Ignore so that they only run after the initial job has completed.
Note The --None-- and Ignore values are not the same. The --None-- value indicates that the Frequency setting is not set. The Ignore value specifies that the job is not on a schedule. -
15 Minutes
-
Hourly
-
Daily
-
Weekly
-
Monthly
-
Yearly
-
-
Is Input As List: Specifies whether the data from the Query is sent as a list of Maps under a
responsenode or as an individual record in a Map. Example input:-
Deselected:
{"BillingStreet":"1 Market St","Id":"001f400000FPZiQAAX"},{"BillingStreet":"50 Fremont","Id":"001f400000FPZjTAAX"},...} -
Selected:
"records":[{"BillingStreet":"1 Market St","Id":"001f400000FPZiQAAX"},{"BillingStreet":"50 Fremont","Id":"001f400000FPZjTAAX”}]
If the Data Source Type is List Input, don’t select Is Input As List.
-
-
Job Queue: Select High, Medium, Low, or None (default). This setting is used to group jobs for execution. Jobs with the same priority are launched together. To optimize performance, minimize the number of high priority jobs.
-
Next Scheduled Job: Enter the name of a different scheduled job that will run as a child of the initial scheduled job, but in a separate transaction, once the initial scheduled job finishes.
Note The scheduled job that runs as a child of the initial scheduled job must have its Frequency set to Ignore so that it only runs after the initial job has completed. -
Process Name: The process to run. For Integration Procedures, specify Type_Subtype. For a VlocityOpenInterface, specify ClassName.MethodName.
-
Process Type: Specify either Integration Procedure or Vlocity Open Interface.
-
Wrap Up Process Name: Enter the name of a different process that will run as a child of the initial process, in the same transaction, once the initial process finishes. In the underlying code, this runs in the finish() method of the framework. For Integration Procedures, specify Type_Subtype. For a VlocityOpenInterface, specify ClassName.MethodName.
-
Wrap Up Process Type: Specify either Integration Procedure or Vlocity Open Interface.
This screenshot shows an example of a record that defines a scheduled job.
These fields are used by the job scheduler:
-
Apex Job ID: Unique identifier for internal use. Do not edit.
-
Global Key: Unique identifier for internal use. Do not edit.
-
Last Run DateTime: Last time the job was executed.
-
Last Run Error Message: If the query fails, contains the full SOQL exception.
-
Next Run DateTime: Next scheduled run. Maintained by the batch framework; can be edited to specify the next time the job is to be run.
For example, if a script is started with a Frequency set to Hourly, at time T hour, the next scheduled runs are T+1 hour, T+2 hours, T+3 hours, and so on. To run your scheduled job at T+2 hours, provide the Next Run DateTime value as T+1 or T+2. At T+2, the scheduler picks up all active jobs with Next Run DateTime less than or equal to T+2.
If the Data Source Type or Frequency is not set, or if the Data Source Spec format is incorrect, then the Active checkbox is unchecked (set to false) and the Last Run Error Message field contains an error message describing what went wrong.
Configuration and SOQL query errors are returned in the Last Run Error Message field. The batch framework does not catch or report errors that occur in the Integration Procedure or Apex method invoked. If an error is caught, Last Run DateTime and Next Run DateTime are not updated.

