The createCSRScheduledOrder actor-chain is used to create a scheduled order using the scheduled order template.

Parameter

Description

name

The name of the scheduled order.

scheduleType

The type of scheduled order. Values can be either calendar or interval.

startDate

The start date used for the order.

endDateOption

Options that can be set for the end date of the scheduled order. The options include none, afterOccurrences or endBy.

numberOfOccurances

This parameter is used with the afterOccurances option to calculate the end date of the scheduled order.

endDate

The end date of the scheduled order. Used with the endBy parameter.

daysOption

This calendar property sets the delivery days of the scheduled order. The options for this property are allDays, selectedDays and selectedDates.

selectedDays

An integer array of selected days, for example, “2,4” indicates Monday and Wednesday. Values start at 1, indicating Sunday, and end with 7, indicating Saturday.

selectedDates

An integer array of values between 1 and 31.

occurrencesOption

Identifies the occurrence of the scheduled order. Options are allOccurrences or selectedOccurrences. Occurrences are configurable when using selectedDays.

selectedOccurrences

An integer array for occurrences of the scheduled order. Options are:

1 – First
2 – Second
3 – Third
4 – Fourth
5 – Last

Use this parameter with selectedDays to identify specific occurrences within a month.

monthsOption

Allows you to select specific months, selectedMonths, or to use all months, allMonths, for the scheduled order.

selectedMonths

Sets the delivery months of the scheduled orders. Values are 0 – 11, which indicate January – December.

selectedHours

Identifies the selected hours in an integer array. Values are 0 – 23, where 0 indicates 12:00, and 23 indicates 23:00 or 11:00 p.m.

selectedMinutes

Identifies the selected minutes in an integer array. Values are 0 – 59.

selectedInterval

Identifies the interval option for the schedule. Selected intervals are used when creating a periodic schedule. When daysOption parameters reference this parameter, it is used for creating calendar schedules.

intervalOption

Indicates the interval option, which is either weeks or days. Selected intervals are used when creating a periodic schedule. When daysOption parameters reference this parameter, it is used for creating calendar schedules.

Create Scheduled Order Examples

The following example shows how you would create a schedule that runs every day, all month at a specific hour and minute and then ends on a specific day:

curl -L -v -b agent_cookies.txt -H "Content-Type: application/json" -d
"{ \"name\": \"Test endBy, allDays, allMonths\" , \"scheduleType\" :
\"Calendar\" , \"startDate\" : \"03/10/2012\" , \"endDateOption\" : \"endBy\" ,
\"numberOfOccurrances\" : 0 , \"endDate\" : \"03/12/2016\" , \"daysOption\" :
\"allDays\" , \"selectedDays\" : \"0\" , \"selectedDates\" : \"0\" ,
\"occurrencesOption\" : \"allOccurrences\" , \"selectedOccurrences\" : \"0\" ,
\"monthsOption\" : \"allMonths\" , \"selectedMonths\" : \"0\", \"selectedHours\" :
\"1,2,\" , \"selectedMinutes\" : \"0\" }" "http://localhost:8181/rest/model/atg/
commerce/custsvc/order/scheduled/CSRScheduledOrderActor/createCSRScheduledOrder"

The following example shows how you could create a schedule that runs on selected dates in selected months at a specific hour and time. This schedule is also set to end after 345 occurrences:

curl -L -v -b agent_cookies.txt -H "Content-Type: application/json" -d
"{ \"name\" : \"T1 endA, selDatesMonths\" , \"scheduleType\" : \"Calendar\" ,
\"startDate\" : \"03/10/2012\" , \"endDateOption\" : \"afterOccurrences\" ,
\"numberOfOccurrances\" : 345 , \"endDate\" : \"03/12/2016\" , \"daysOption\" :
\"selectedDates\" , \"selectedDates\" : \"1,3,28\" , \"monthsOption\" :
\"selectedMonths\" , \"selectedMonths\" : \"1,3,11\", \"selectedHours\" :
\"3,4,5,22\" , \"selectedMinutes\" : \"5,11,59\" }" "http://localhost:8181/rest/
model/atg/commerce/custsvc/order/scheduled/CSRScheduledOrderActor/
createCSRScheduledOrder"

The following example shows how you could create a schedule that runs on selected days within a specific month at a specific hour and minute. This schedule has no end date:

curl -L -v -b agent_cookies.txt -H "Content-Type: application/json" -d
"{ \"name\" : \"T2 endNo, selDaysMonths, allO\" , \"scheduleType\" : \"Calendar\"
, \"startDate\" : \"03/10/2012\" , \"endDateOption\" : \"none\" ,
\"numberOfOccurrances\" : 0 , \"endDate\" : \"03/12/2016\" , \"daysOption\" :
\"selectedDays\" , \"selectedDays\" : \"1,2,3,5,6,7\" , \"occurrencesOption\" :
\"allOccurrences\" , \"monthsOption\" : \"selectedMonths\" , \"selectedMonths\" :
\"4,5,6\", \"selectedHours\" : \"0,23\" , \"selectedMinutes\" : \"59\" }"
"http://localhost:8181/rest/model/atg/commerce/custsvc/order/scheduled/
CSRScheduledOrderActor/createCSRScheduledOrder"

The following example shows how you could create a schedule that runs on the second and third Wednesdays and the first, third and twenty-eight day of February at a specific hour and minute:

curl -L -v -b agent_cookies.txt -H "Content-Type: application/json" -d
"{ \"name\" : \"T3 endNo, selDaysMonths, 2n3rdWe\" , \"scheduleType\" :
\"Calendar\" , \"startDate\" : \"03/10/2012\" , \"endDateOption\" : \"none\" ,
\"daysOption\" : \"selectedDays\" , \"selectedDays\" : \"4\" , \"selectedDates\" :
\"1,3,28\" , \"occurrencesOption\" : \"selectedOccurrences\" ,
\"selectedOccurrences\" : \"2,3\" , \"monthsOption\" : \"selectedMonths\" ,
\"selectedMonths\" : \"2\", \"selectedHours\" : \"12\" , \"selectedMinutes\" :
\"0\" }" "http://localhost:8181/rest/model/atg/commerce/custsvc/order/scheduled/
CSRScheduledOrderActor/createCSRScheduledOrder"

Copyright © 1997, 2015 Oracle and/or its affiliates. All rights reserved. Legal Notices