Package Sync Omnitron Status Command
This guide explains how the PACKAGE_SYNC_OMNITRON_STATUS command synchronizes an OMS package's status with the status of its order items in Omnitron, and how to run the command through the OMS API.
Overview
The Akinon Order Management System (OMS) copies orders from Omnitron to prepare delivery and distribution plans, generate package orders, and transfer them to operation points.
When a package is in the waiting_remote_action state, it is waiting for an update from an external system before it can continue its lifecycle. The PACKAGE_SYNC_OMNITRON_STATUS command retrieves the current status of the package's order items from Omnitron and moves the package to the matching OMS state.
Actors
Akinon OMS
Runs the command and updates the package state.
Omnitron
Provides the current status of the package's order items.
Retail store staff
Triggers the command from the OMS web interface when needed.
How It Works
The command queries Omnitron for the current status of every order item in the package.
It checks that all order items share the same status code in Omnitron. If the statuses differ, the sync fails.
It maps the Omnitron status code to the corresponding OMS package state and performs the state transition.
If the new state requires it (for example, a transition to Shipped), the command releases the related inventory reservations.
It updates the package and all of its package items to the synchronized state.
Status Mapping
The destination state is determined dynamically by the Omnitron status code of the order items. The source state is always Waiting Remote Action (waiting_remote_action).
100
Cancelled (cancelled)
The package has been cancelled.
400
Waiting (waiting)
The package returns to the waiting state for further processing.
450
Preparing (preparing)
The package is being prepared for shipment.
500
Shipped (shipped)
The package has been shipped to the customer.
550
Delivered (delivered)
The package has been delivered to the customer.
600
Refund (refund)
The package is in the refund or return process.
API Reference
Endpoint
id
ID of the package to synchronize.
Request Headers
Request Body
Example
Required Parameters
transition
Integer
ID of the state transition to execute (for example, 662). Required if slug is not sent.
slug
String
Command slug (for example, package-sync-omnitron-status). Required if transition is not sent.
Input Parameters
package
Integer
No
Package ID. Set automatically from the URL path.
package_items
Array
Yes
Package item IDs. Can be an empty array ([]), because the command operates on the entire package.
user
Integer
No
ID of the user running the command.
Optional Parameters
is_packageitem_parameter_required
Boolean
false
Whether the package_items parameter is required.
configuration
Object
{}
Additional configuration.
translations
Object
null
Translation data.
ui_visibility
Array
—
Interfaces where the command is visible (for example, ["third_party", "oms_web", "instore"]).
source_state
Integer
—
Source state ID. Used for validation and documentation purposes only.
destination_state
Integer
—
Destination state ID. Used for validation and documentation purposes only.
Responses
Success
204 No Content: The package was synchronized successfully. The response has no body.
Errors
400 Bad Request
Invalid parameters or a business rule violation.
401 Unauthorized
The authentication token is missing or invalid.
403 Forbidden
The user doesn't have permission to run the command.
404 Not Found
The package doesn't exist.
406 Not Acceptable
Invalid state transition, mixed Omnitron statuses, or the package is already synced.
500 Internal Server Error
OMS couldn't retrieve order details from Omnitron.
400 Bad Request: Missing transition or slug
401 Unauthorized: Missing or invalid token
403 Forbidden: Insufficient permissions
404 Not Found: Package not found
406 Not Acceptable: Invalid state transition
Returned when the package is not in the state required for the transition.
406 Not Acceptable: Multiple order statuses
Returned when the package's order items have different statuses in Omnitron.
406 Not Acceptable: Already synced
Returned when the package is already in the state that matches the Omnitron status.
500 Internal Server Error: Omnitron communication error
Last updated
Was this helpful?

