Order delete data model
The Order Delete API uses a combination of the referenceId
and orderedAt
values to delete an order. This is because some organizations recycle referenceId
values, so supplying the orderedAt
value as well ensures you are identifying the correct order for deletion. Sitecore CDP identifies an order for deletion if the orderedAt
value is within 24 hours of the orderedAt
value sent in the request and the referenceId
values are the same.
In rare circumstances, you must also use the orderRef
attribute in the request to identify the correct order for deletion. You only need to do this if the order you want to delete has an orderedAt
value that's within 24 hours of another order, and both orders have the same referenceId
value. For example, you want to delete an order with an orderedAt
value of "2023-09-25T16:17:16.000Z"
and there's another order with an orderedAt
value of "2023-09-25T20:47:55.000Z"
. If both orders have the same referenceId
value of "B94TXY-1"
, you must also use the orderRef
attribute in the request, as shown in the second JSON example.
To obtain the orderRef
value, you can use debug mode to view the JSON of the guest profile and copy the ref
value from the orders
object. Alternatively, you can use the data lake export service to obtain the meta_ref
value which is the same as the orderRef
value. You can also use Audience Export to obtain the orderRef
value.
When you create a batch file, ensure that you follow the formatting requirements and include attributes from the following table: