The Agent Console uses text search with orders and customers. Search capabilities may slow as the number of orders and customers increases. Improve search performance by using an optimization service, which runs periodically. Initially, you must configure the service frequency so the service can run properly for your business.
Determine an appropriate schedule based on how search performance degrades with the increase in the rate of updates and creations of orders and customers. It is recommended that a schedule frequency of not more than once per day be established.
To set the initial frequency of the optimization service, issue a POST request to the scheduledJobs endpoint, with a body that defines the schedule, an example of which is provided below. To update the schedule, issue a PUT request to the same endpoint.
For more information on endpoints, see the Use the REST APIs chapter in Extending Oracle Commerce Cloud.
For order and return request search optimization:
POST /ccadmin/v1/merchant/scheduledJobs
{
"componentPath":"/atg/commerce/textsearch/schedule/OrderIndexOptimizationScheduleConfig",
"scheduleType": "periodic",
"schedule":
{
"period" : 1000000
}
}For customer search optimization:
POST /ccadmin/v1/merchant/scheduledJobs
{
"componentPath":"/atg/userprofiling/textsearch/schedule/ProfileIndexOptimizationScheduleConfig",
"scheduleType": "periodic",
"schedule":
{
"period" : 1000000
}
}The scheduleType and schedule properties determine the frequency of the optimization service. The scheduleType property may be either periodic (time-based) or calendar (calendar-based).
If you specify periodic for the scheduleType property, you must also provide a period property in milliseconds.
If you specify calendar, you must provide additional properties that further define the frequency. These properties include:
occurrenceInDay: This field can be set to1or2, representing once a day or twice a day, respectively. The default is 1; in other words, ifoccurenceInDayis not specified, the order will be run once on the specified days.daysOfWeek: This field can be set to1,2,3,4,5,6, or7, which correspond to (and can be represented in the UI as) Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, and Saturday.weeksInMonth: This field can be set to1,2,3,4, or5, which correspond to (and can be represented in the UI as) the first, second, third, fourth, or last week of the month.monthsInYear: This field can be set to0,1,2,3,4,5,6,7,8,9,10, or11, which correspond to (and can be represented in the UI as) January, February, March, April, May, June, July, August, September, October, November, and December.daysInMonth: This field corresponds to the day of the month and it can be set to a number between1and31(depending on the number of days in the month).
The following combinations of these properties are allowed:
occurenceInDay,daysOfWeek,weeksInMonth,monthsInYearmonthsInYear,daysInMonth,occurenceInDay
If both daysInMonth and daysOfWeek are sent in the payload, then daysInMonth takes priority.
To help you better understand how to combine these properties, some examples are provided below.
This schedule runs twice on Sunday, Monday, and Tuesday of the first, second and third weeks of February and April:
"schedule":{
"daysOfWeek":[1,2,3],
"weeksInMonth":[1,2,3],
"monthsInYear":[1, 3],
"occurrenceInDay":2
}This schedule runs twice a day:
"schedule":{
"occurrenceInDay":2
}This schedule runs once every Sunday:
"schedule":{
"daysOfWeek":[1]
}This schedule runs twice on Monday in the second and third weeks of every month:
"schedule":{
"daysOfWeek":[2],
"weeksInMonth":[2,3],
"occurrenceInDay":2
}This schedule runs once on the first day of every month:
"schedule":{
"daysInMonth ":[1]|
}This schedule runs once on the fifth day of June:
"schedule":{
"daysInMonth ":[5],
"monthsInYear":[5]
}This schedule runs once on the first day of January, March, May, July, September, and November:
"schedule":{
"daysInMonth ":[1]
"monthsInYear":[0, 2, 4, 6, 8, 10]
}This schedule runs on the 10th, 15th, 20th, and 21st days of February and December:
"schedule":{
"daysInMonth":[10,15,20,21],
"monthsInYear":[1, 11]
}
