Batch Invoice Scheduler Input

Input representation of the details of the request to create an invoice scheduler.

JSON Example 

This example shows a sample request to create an invoice scheduler that generates invoices once.

1{
2  "schedulerName": "InvoiceScheduler",
3  "startDate": "2024-05-06",
4  "invoiceStatus": "POSTED",
5  "preferredTime": "00:45",
6  "targetDate": "2024-05-22",
7  "invoiceDate": "2024-05-22",
8  "frequencyCadence": "Once",
9  "frequencyCadenceOptions": {},
10  "timezone": "Asia/Kolkata",
11  "status": "Active",
12  "filterCriteria": [
13    {
14      "operation": "InList",
15      "value": "Batch 2,Batch 3,Batch 4",
16      "criteriaSequence": 1,
17      "objectName": "BillingSchedule",
18      "fieldName": "InvoiceRunMatchingValue"
19    },
20    {
21      "operation": "Equals",
22      "value": "001xx000003GZG5AAO",
23      "criteriaSequence": 2,
24      "objectName": "BillingSchedule",
25      "fieldName": "BillingAccount"
26    },
27    {
28      "operation": "Equals",
29      "value": "0fwxx0000000001AAA",
30      "criteriaSequence": 3,
31      "objectName": "BillingScheduleGroup",
32      "fieldName": "LegalEntity"
33    },
34    {
35      "operation": "InList",
36      "value": "OneTime,Recurring",
37      "criteriaSequence": 4,
38      "objectName": "BillingSchedule",
39      "fieldName": "BillingTermUnit"
40    },
41    {
42      "operation": "Equals",
43      "value": "USD",
44      "criteriaSequence": 5,
45      "objectName": "BillingSchedule",
46      "fieldName": "Currency_Iso_code"
47    }
48  ]
49}

This example shows a sample request to create an invoice scheduler that generates invoices daily.

1{
2  "schedulerName": "InvoiceScheduler",
3  "startDate": "2024-05-06",
4  "endDate": "2026-05-06",
5  "invoiceStatus": "POSTED",
6  "preferredTime": "00:45",
7  "targetDateOffset": 0,
8  "invoiceDateOffset": 0,
9  "isInvoiceDateFromRunDate": true,
10  "frequencyCadence": "Daily",
11  "frequencyCadenceOptions": {},
12  "timezone": "Asia/Kolkata",
13  "status": "Active",
14  "filterCriteria": [
15    {
16      "operation": "InList",
17      "value": "Batch 2,Batch 3,Batch 4",
18      "criteriaSequence": 1,
19      "objectName": "BillingSchedule",
20      "fieldName": "InvoiceRunMatchingValue"
21    },
22    {
23      "operation": "Equals",
24      "value": "001xx000003GZG5AAO",
25      "criteriaSequence": 2,
26      "objectName": "BillingSchedule",
27      "fieldName": "BillingAccount"
28    },
29    {
30      "operation": "Equals",
31      "value": "0fwxx0000000001AAA",
32      "criteriaSequence": 3,
33      "objectName": "BillingScheduleGroup",
34      "fieldName": "LegalEntity"
35    },
36    {
37      "operation": "InList",
38      "value": "OneTime,Recurring",
39      "criteriaSequence": 4,
40      "objectName": "BillingSchedule",
41      "fieldName": "BillingTermUnit"
42    },
43    {
44      "operation": "InList",
45      "value": "USD",
46      "criteriaSequence": 5,
47      "objectName": "BillingSchedule",
48      "fieldName": "Currency_Iso_code"
49    }
50  ]
51}

This example shows a sample request to create an invoice scheduler that generates invoices weekly.

1{
2  "schedulerName": "InvoiceScheduler",
3  "startDate": "2024-05-06",
4  "endDate": "2026-05-06",
5  "invoiceStatus": "POSTED",
6  "preferredTime": "00:45",
7  "targetDateOffset": 0,
8  "invoiceDateOffset": 0,
9  "isInvoiceDateFromRunDate": false,
10  "frequencyCadence": "Weekly",
11  "frequencyCadenceOptions": {
12    "recursOnDay": "Sunday"
13  },
14  "timezone": "Asia/Kolkata",
15  "status": "Active",
16  "filterCriteria": [
17    {
18      "operation": "InList",
19      "value": "Batch 2,Batch 3,Batch 4",
20      "criteriaSequence": 1,
21      "objectName": "BillingSchedule",
22      "fieldName": "InvoiceRunMatchingValue"
23    },
24    {
25      "operation": "Equals",
26      "value": "001xx000003GZG5AAO",
27      "criteriaSequence": 2,
28      "objectName": "BillingSchedule",
29      "fieldName": "BillingAccount"
30    },
31    {
32      "operation": "Equals",
33      "value": "0fwxx0000000001AAA",
34      "criteriaSequence": 3,
35      "objectName": "BillingScheduleGroup",
36      "fieldName": "LegalEntity"
37    },
38    {
39      "operation": "InList",
40      "value": "OneTime,Recurring",
41      "criteriaSequence": 4,
42      "objectName": "BillingSchedule",
43      "fieldName": "BillingTermUnit"
44    },
45    {
46      "operation": "Equals",
47      "value": "USD",
48      "criteriaSequence": 5,
49      "objectName": "BillingSchedule",
50      "fieldName": "Currency_Iso_code"
51    }
52  ]
53}

This example shows a sample request to create an invoice scheduler that generates invoices monthly on a specific date.

1{
2  "schedulerName": "InvoiceScheduler",
3  "startDate": "2024-05-06",
4  "endDate": "2026-05-06",
5  "invoiceStatus": "POSTED",
6  "preferredTime": "00:45",
7  "targetDateOffset": 0,
8  "invoiceDateOffset": 0,
9  "isInvoiceDateFromRunDate": false,
10  "frequencyCadence": "Monthly",
11  "frequencyCadenceOptions": {
12    "recurringSubType": "SpecificDate",
13    "recursOnDate": "L-1",
14    "shouldExcludeWkendAndHldy": true
15  },
16  "timezone": "Asia/Kolkata",
17  "status": "Active",
18  "filterCriteria": [
19    {
20      "operation": "InList",
21      "value": "Batch 2,Batch 3,Batch 4",
22      "criteriaSequence": 1,
23      "objectName": "BillingSchedule",
24      "fieldName": "InvoiceRunMatchingValue"
25    },
26    {
27      "operation": "Equals",
28      "value": "001xx000003GZG5AAO",
29      "criteriaSequence": 2,
30      "objectName": "BillingSchedule",
31      "fieldName": "BillingAccount"
32    },
33    {
34      "operation": "Equals",
35      "value": "0fwxx0000000001AAA",
36      "criteriaSequence": 3,
37      "objectName": "BillingScheduleGroup",
38      "fieldName": "LegalEntity"
39    },
40    {
41      "operation": "InList",
42      "value": "OneTime,Recurring",
43      "criteriaSequence": 4,
44      "objectName": "BillingSchedule",
45      "fieldName": "BillingTermUnit"
46    },
47    {
48      "operation": "Equals",
49      "value": "USD",
50      "criteriaSequence": 5,
51      "objectName": "BillingSchedule",
52      "fieldName": "Currency_Iso_code"
53    }
54  ]
55}

This example shows a sample request to create an invoice scheduler that runs immediately.

1{
2    "schedulerName": "InvoiceScheduler",
3    "status": "Draft",
4    "invoiceStatus": "Posted",
5    "frequencyCadenceOptions": {
6        "shouldStartRunImmediately": true
7    },
8    "frequencyCadence": "Once",
9    "targetDate": "2024-08-28",
10    "invoiceDate": "2024-08-28",
11    "filterCriteria": [
12        {
13            "operation": "InList",
14            "value": "Batch 2,Batch 3,Batch 4",
15            "criteriaSequence": 1,
16            "objectName": "BillingSchedule",
17            "fieldName": "InvoiceRunMatchingValue"
18        },
19        {
20            "operation": "Equals",
21            "value": "001xx000003GZG5AAO",
22            "criteriaSequence": 2,
23            "objectName": "BillingSchedule",
24            "fieldName": "BillingAccount"
25        },
26        {
27            "operation": "Equals",
28            "value": "0fwxx0000000001AAA",
29            "criteriaSequence": 3,
30            "objectName": "BillingScheduleGroup",
31            "fieldName": "LegalEntity"
32        },
33        {
34            "operation": "InList",
35            "value": "OneTime,Recurring",
36            "criteriaSequence": 4,
37            "objectName": "BillingSchedule",
38            "fieldName": "BillingTermUnit"
39        },
40        {
41            "operation": "Equals",
42            "value": "USD",
43            "criteriaSequence": 5,
44            "objectName": "BillingSchedule",
45            "fieldName": "Currency_Iso_code"
46        }
47    ]
48}

This example shows a sample request to create an invoice scheduler where generating invoice documents is enabled and the invoice date offset is defined.

1{
2  "schedulerName": "InvoiceScheduler",
3  "status": "Draft",
4  "invoiceStatus": "Draft",
5  "startDate": "2023-09-01",
6  "endDate": "2026-09-17",
7  "preferredTime": "00:15",
8  "frequencyCadence": "Daily",
9  "frequencyCadenceOptions": {
10    "shouldExcludeWkendAndHldy": true,
11    "shouldStartRunImmediately": false
12  },
13  "timezone": "America/Los_Angeles",
14  "targetDateOffset": "2",
15  "invoiceDateOffset": "4",
16  "isInvoiceDateFromRunDate": false,
17  "shouldRunDpeOnCore": false,
18  "shouldGenerateInvoiceDocuments": true,
19  "billingCycleCount": "4",
20  "filterCriteria": [
21    {
22      "criteriaSequence": 1,
23      "operation": "InList",
24      "objectName": "BillingSchedule",
25      "fieldName": "InvoiceRunMatchingValue",
26      "value": "Batch 1"
27    },
28    {
29      "criteriaSequence": 2,
30      "operation": "InList",
31      "objectName": "BillingSchedule",
32      "fieldName": "BillingTermUnit",
33      "value": "Usage"
34    },
35    {
36      "criteriaSequence": 3,
37      "operation": "InList",
38      "objectName": "BillingSchedule",
39      "fieldName": "Currency_Iso_code",
40      "value": "JPY"
41    }
42  ]
43}

This example shows a sample request to create an invoice scheduler that has the jobType property set to Catchup.

1{
2  "schedulerName": "InvoiceScheduler",
3  "status": "Draft",
4  "startDate": "2023-09-01",
5  "preferredTime": "00:15",
6  "frequencyCadence": "Once",
7  "frequencyCadenceOptions": {
8    "shouldExcludeWkendAndHldy": false,
9    "shouldStartRunImmediately": false
10  },
11  "timezone": "America/Los_Angeles",
12  "targetDate": "2026-09-25",
13  "billingCycleCount": "4",
14  "shouldCatchUpBillRun": true,
15  "filterCriteria": [
16    {
17      "criteriaSequence": 1,
18      "operation": "InList",
19      "objectName": "BillingSchedule",
20      "fieldName": "InvoiceRunMatchingValue",
21      "value": "Batch 1"
22    },
23    {
24      "criteriaSequence": 2,
25      "operation": "InList",
26      "objectName": "BillingSchedule",
27      "fieldName": "BillingTermUnit",
28      "value": "Usage"
29    },
30    {
31      "criteriaSequence": 3,
32      "operation": "InList",
33      "objectName": "BillingSchedule",
34      "fieldName": "Currency_Iso_code",
35      "value": "JPY"
36    }
37  ],
38  "jobType": "Catchup"
39}

This example shows a sample request to create an invoice scheduler where the targetDayOfMonth and targetMonthOffset properties are defined.

1{
2  "schedulerName": "InvoiceScheduler",
3  "status": "Active",
4  "invoiceStatus": "Draft",
5  "startDate": "2020-09-01",
6  "endDate": "2026-09-10",
7  "preferredTime": "00:00",
8  "frequencyCadence": "Monthly",
9  "frequencyCadenceOptions": {
10    "recurringSubType": "Every",
11    "recursOn": "First",
12    "recursOnDay": "Monday",
13    "shouldExcludeWkendAndHldy": true,
14    "shouldStartRunImmediately": false
15  },
16  "timezone": "America/Los_Angeles",
17  "invoiceDateOffset": "5",
18  "isInvoiceDateFromRunDate": true,
19  "shouldRunDpeOnCore": false,
20  "shouldGenerateInvoiceDocuments": false,
21  "billingCycleCount": 1,
22  "filterCriteria": [
23    {
24      "criteriaSequence": 1,
25      "operation": "InList",
26      "objectName": "BillingSchedule",
27      "fieldName": "InvoiceRunMatchingValue",
28      "value": "Batch 1"
29    },
30    {
31      "criteriaSequence": 2,
32      "operation": "InList",
33      "objectName": "BillingSchedule",
34      "fieldName": "BillingTermUnit",
35      "value": "Usage"
36    },
37    {
38      "criteriaSequence": 3,
39      "operation": "InList",
40      "objectName": "BillingSchedule",
41      "fieldName": "Currency_Iso_code",
42      "value": "INR"
43    }
44  ],
45  "targetDayOfMonth": 3,
46  "targetMonthOffset": 4
47}

This example shows a sample request to create a forecast scheduler that runs immediately with the shouldRecalculateAllForecastLn property set to true.

1{
2  "schedulerName": "ForecastScheduler",
3  "jobType": "Forecast",
4  "status": "Active",
5  "frequencyCadence": "Once",
6  "frequencyCadenceOptions": {
7    "shouldStartRunImmediately": true
8  },
9  "targetDate": "2026-09-04",
10  "filterCriteria": [],
11  "shouldRecalculateAllForecastLn": true
12}

Properties 

NameTypeDescriptionRequired or OptionalAvailable Version
billing​CycleCountIntegerNumber of billing cycles or billing periods to be invoiced.Optional68.0
endDateStringEnd date of the invoice scheduler.Optional63.0
filter​CriteriaBatch Invoice Filter Criteria Input[]List of line items of the filter criteria.Optional62.0
frequency​CadenceStringFrequency to run the invoice scheduler.Required62.0
frequency​Cadence​OptionsFrequency Cadence OptionsFrequency cadence options for the invoice scheduler.Required62.0
invoice​DateStringDate shown on the invoice. This date is also used for tax calculations.Required if the frequency​Cadence property is set to Once.62.0
invoiceDate​OffsetIntegerOffset applied to the target date, which is the number of days added to or subtracted from the invoice date, to calculate the updated invoice date.Required if the frequency​Cadence property is set to Daily, Weekly, or Monthly.62.0
invoice​StatusStringStatus of the invoice that specifies the expected invoice status from an invoice batch run. Valid values are Draft or Posted.Required62.0
isInvoice​DateFrom​RunDateBooleanIndicates whether the invoice date is applicable from the date when the invoice scheduler is run (true) or not (false).Optional63.0
jobTypeStringType of job the scheduler runs. Valid values are Catchup, Forecast, Invoice, or Payment.Optional68.0
preferred​TimeStringPreferred time for the invoice batch run.Required62.0
scheduler​NameStringName of the invoice scheduler, which must be unique in your org.Required62.0
should​CatchUp​BillRunBooleanIndicates whether the invoice batch run advances billing schedules to a target date without generating invoices for prior billing periods (true) or not (false).Optional68.0
should​Generate​Invoice​DocumentsBooleanIndicates whether invoice documents are automatically generated during batch processing for runs triggered by the scheduler (true) or not (false).Optional68.0
should​Recalculate​AllForecastLnBooleanIndicates whether to recalculate all forecast lines for all billing schedules regardless of forecast status (true) or only eligible ones (false). Applies only to forecast job runs.Optional68.0
startDateStringStart date of the invoice scheduler.Required62.0
statusStringStatus of the invoice scheduler. Valid values are Draft, Active, or Inactive.Required62.0
target​DateStringTarget date of the invoice batch run. Billing schedules having the next billing date before this date are picked up for invoicing. The target date must be less than or equal to the maximum allowed target date for the org.Required if the frequency​Cadence property is set to Once.62.0
target​DateOffsetIntegerTarget date offset applied to the next invoice run date to calculate the target date. The offset is the number of days added to or subtracted from the next billing date.Required if the frequency​Cadence property is set to Daily, Weekly, or Monthly.62.0
target​Day​OfMonthIntegerDay of the month to use for calculating the target date. Values are 1 through 28, -3 (third-to-last day), -2 (second-to-last day), or -1 (last day).Optional68.0
target​Month​OffsetIntegerNumber of months relative to each scheduled run for calculating the target date. For example, 0 is the current month, 1 is the next month, and -1 is the previous month.Optional68.0
timezoneStringTime zone that’s applicable for the invoice scheduler.Optional62.0

Valid values are:

  • Once
  • Daily
  • Weekly
  • Monthly