Configure the scheduler to send the back in stock emails

Oracle Commerce runs a scheduler that determines when to send out back in stock email notifications by performing periodic reviews of the inventory.

The scheduler must be configured with an endpoint, and have a frequency set as, out of the box, this service is not automatically set to run.

To set the initial frequency of the scheduled product notification service, you issue a POST request to the scheduledJobs endpoint, with a payload that defines the schedule, an example of which is provided below. To update the schedule, you issue a PUT request to the same endpoint.

POST /ccadmin/v1/merchant/scheduledJobs

{
"componentPath": "ProductNotificationService",
"scheduleType": "periodic",
"schedule":
  {
   "period" : 1000000
  }
}

See Configure the Scheduled Order Service to learn how to use these properties to set how frequently the service runs.

The frequency of the inventory reviews is dependent on the scheduler configurations. Note: If the product becomes unavailable, then the scheduler will delete the notification request. Likewise, if the notification request expires, the scheduler deletes the notification request. (The default notification expiration time is three months.)