Page 1 of 1

Ability to Cancel Back orders through the API

PostPosted: Fri Jan 25, 2019 6:51 pm
by SBarnes
Can SalesOrderPATCHRequest be used to cancel back orders?

And what happens on an update if there is no open snapshot?

Re: Ability to Cancel Back orders through the API  Topic is solved

PostPosted: Fri Feb 01, 2019 3:45 pm
by Mike.Sheen
SBarnes wrote:Can SalesOrderPATCHRequest be used to cancel back orders?


Sure - as long as you provide the appropriate field values, the backorder amount can be moved to the demand amount, indicating a cancellation.

SBarnes wrote:And what happens on an update if there is no open snapshot?


You'll get an exception - at which point you could catch that and create a new snapshot - but we don't have a route out of the box for that, so you'd need to create one.

Re: Ability to Cancel Back orders through the API

PostPosted: Fri Feb 01, 2019 3:53 pm
by SBarnes
Yeah I was thinking of inventing a route called CreateSnapShot to be called first or create a plugin and attached to the Sales Order deSerialisation start and do the check there

Re: Ability to Cancel Back orders through the API

PostPosted: Fri Feb 01, 2019 3:56 pm
by Mike.Sheen
SBarnes wrote:Yeah I was thinking of inventing a route called CreateSnapShot to be called first or create a plugin and attached to the Sales Order deSerialisation start and do the check there


That'd be ideal - saves a round trip.