This function is used in conjunction with an order workflow to manually mark an order as received.
Description#
This function is used in conjunction with an order workflow to manually mark an order as received. Because this is a module-level function, you’ll need to use the following format to whitelist the function:
Module:orderworkflow:OrderList_Acknowledge
Request Body Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
Function |
String | Yes | For Module-level functions, this will always have the value of: “Module” |
Module_Code |
String | Module Code. Always “orderworkflow” for this function | |
Module_Function |
String | Function to execute | |
Order_IDs |
Array | Yes | Array of order IDs you wish to mark as received/acknowledged |
Response Parameters#
| Parameter | Type | Description |
|---|---|---|
success |
Boolean | Boolean value indicating if the request was successful |
processed |
Number | Number of order IDs processed. Can be less than the number sent: the function stops after about 60 seconds, so send IDs in batches. |
warnings |
Array | Present when an ID doesn’t match an order: each entry has identifier, code (MER-UTIL-ORWF-00180) and message (“Order not found”) |
Example Request#
{
"Store_Code": "{{Store_Code}}",
"Miva_Request_Timestamp": "{{$timestamp}}",
"Function": "Module",
"Module_Code": "orderworkflow",
"Module_Function": "OrderList_Acknowledge",
"Order_IDs": [200075, 200076]
}
Example Response#
{
"success": 1,
"processed": 1
}
Example Response with a Warning#
{
"success": 1,
"processed": 2,
"warnings": [
{
"identifier": 200076,
"code": "MER-UTIL-ORWF-00180",
"message": "Order not found"
}
]
}
This function changes nothing by itself. It fires the Order Acknowledged trigger for each order, and the workflows on that trigger decide what happens, such as moving the order to another queue. See Retrieving orders from a queue.
Error Responses#
| Error Code | Error Message | Error Description |
|---|---|---|
| invalid_function | Invalid Function | Request syntax is incorrect. This is a module-level function, so “Module” needs to be passed in the Function Parameter. |
| invalid_module | Invalid Module | Request syntax is incorrect. This is a module-level function, so Module_Code parameter needs to be “orderworkflow”. |