Order Queues give you the ability to group orders together. For example you can create an order queue which only shows new orders which have not been shipped. Or an order queue for certain orders which need to be manually reviewed by customer service before being sent to be fulfilled.
You can create an unlimited number of order queues which can both be managed via the admin as well as tied in to the API so any external system can pull orders from a specific queue.
Say for example you want to process all your next day air orders ahead of all others. You can create an order queue specifically for them and leverage an order workflow to automatically put orders in that queue. This way your warehouse team can look at the “Next Day Air” queue first ahead of the other orders which need to be processed that day.
There are two default queues which are used for API requests:
Once Order Queues have been setup, you can leverage the Miva admin to view which orders are in each queue and move orders from one queue to another both individually and in bulk.
To see which orders are in each queue its best to use Advanced Search on the orders batch list and set up a Saved Search for each queue.
There is a yes/no flag on each order to determine if an order is in that particular queue.
Once you’ve done the advanced search on the Order Batch List, you can save it for future use:
When editing an individual order you can see which queues it is in and easily add or remove it from an order:
Order Workflows are a way to setup automated rules to perform some action to an order when an event occurs. For example you can setup a workflow to move all new orders into the “New & Updated Orders” queue. There are 3 key components to an order workflow:
Each order workflow has a name, active flag and an option setting for "Wait Until True"
This settings allow you to automatically have Miva re-check the order at any internal you want for any time period to see if the conditions have been met to run the action. For example say you are creating order in the admin and in our workflow we want all orders with next day air shipping to be moved into the next day shipping queue. However the order create trigger runs immediately after you click new order in the admin. In this case we would want to leverage a Wait Until True setting to have Miva periodically check in the conditions are met. Once we have a shipping method, then we can proceed.
Note: The default settings are to re-check the order every 5 minutes for 60 minutes. Keep in mind that adjusting these settings too high could cause the Wait Until True queue to get extremely large.
Triggers are the fixed events Miva gives you access to tie into based on events which occur in Miva.
Note: All triggers happen whether the event occured by the shopper, in the admin, via XML provisioning or the JSON API.
|Order Retrieved||This is called when an external system pulls an order from a queue using the QueueOrderList_Load_Query function.|
|Order Acknowledged||This is called when an external API confirms it was able to successfully pull and order from a queue using thee function.|
|Order Created||This gets called when an order is placed via the front end by the shopper, in the admin (by a customer service rep) or by a subscription.|
|Order Status Change||Called any time the order status changes.|
|Order Total Change||Called any time the order total changes.|
|Order Shipment Created||Called when a shipment is created.|
|Order Shipment Deleted||Called when a shipment is deleted.|
|Order Shipment Status Change||Called when a shipment moves from picking to shipped.|
|Order Item Created||Called when a new item is added to the order|
|Order Item Updated||Called when a item is updated (price, attributes, quantity, etc)|
|Order Item Status Change||Called when an item status changes.|
|Order Item Deleted||Called when an Item gets deleted.|
|Order Return||Called when an RMA is created.|
|Order Return Deleted||Called when a RMA is deleted.|
|Order Return Status Change||When a return status changes.|
Conditions allow you to create flexible conditional statements to run against the order data. For example, is there is shipping method on the order and and does it equal "Next Day Air"
There are two types of conditions:
Conditional can be nested and chained together to create very custom rules. In the example below we are checking if the length of the order:charges array is greater than 0 (ie Charges exist) and if any of the order charges have a description which contain the text "Next Day Air")
The length() can be use in both the Conditions and List Conditions to check the length of an array or field.
Because we have the "Wait Until True" option selected, all orders placed will go into a special internal queue. Miva will then re-check the conditions based on the settings configured. In this case it will re-check the order every 5 minutes for 60 minutes ( 12 times) to see if the conditions described are met.
The actions are what occur if the conditions are met. In this case we want to move the order into a Queue:
Multiple actions can be added to each workflow so its possible to add an order to a queue, add a note to the order and sent a webhook all within the same workflow.
Webhooks are a way to have miva push order data to any external API endpoint either as a GET request or a POST request.
The entire order object is sent with a webhook. There is no way to send a partial object, for example just sent the item data.