How to set up a SalesChannel and define a default SLA for recurrent orders

General Configurations

Frederico O. Santos

Frederico O. Santos

Last updated

Recurrence: define SalesChannel and default SLA

The purpose of this mini tutorial is to explain a new feature that enables the recurrence module to be set up(Via API). For now, it is possible to define a SaleChannel to be used when generating all “recurrent” orders of the store, in addition to informing the default SLA.

Route (endpoint for API)

SalesChannel (Trade Policy)

Just include an attribute with the name salesChannel, as illustrated in the setup route, with the value of the sales channel identifier.

Thereafter, the next orders will be created using the sales channel that was set up. In the event there is no stock for a given item in this channel, the item will be excluded from the order.

The screen showing the salesChannel ID

SLA

Just include an attribute with the name defaultSLA, as illustrated in the setup route, with the delivery type identifier.

Thereafter, the SLA set up will take preference over the cheaper SLA for the next orders created – whereby, if it has a delivery window, the first interval available will be selected.

The screen showing the ID of the SLA