Package Splitting Flow
This flow enables splitting a single marketplace order (or package) into multiple new packages under the same sales channel. It can be triggered in two distinct modes:
OMS Trigger Mode (Akinon OMS fires a webhook to the marketplace app)
External System Trigger Mode (Any external OMS / WMS / ERP or custom service calls the public flow-trigger endpoint directly)
Use OMS Trigger Mode if you already maintain package decisions inside Akinon OMS. Use External System Trigger Mode when package determination logic lives outside Akinon but you still want to drive marketplace synchronization.
At a high level the split operation:
Validates that the source order / package exists and belongs to the channel.
Validates
split_packagesfeature flag is active.Creates new package rows / integration actions per provided grouping.
Optionally carries over tracking related metadata (if already present) to target packages (implementation specific per marketplace).
Logs the split result and returns a correlation id for auditing.
First, make sure that the "split_packages" flag under Feature Flags in the relevant sales channel is set to true.

To configure the OMS Web Hook setting in Omnitron, follow this path: Omnitron Left Main Menu > Akinon OMS > Settings > Web Hooks
After accessing this setting, click the New Web Hook button located at the top right of the screen. The following screen should appear:
1. Akinon OMS Trigger Mode
The original (existing) configuration path—Akinon OMS emits a webhook to the marketplace application which then executes the split logic.
Channel Settings:
split_packages flag must be enabled to use Akinon OMS Trigger Mode
Webhook Settings:
Target URL: In the field shown in the screenshot above, enter the URL generated in the following format:
The variables used here are configured as explained below:
mp_frontend_url: Log in to https://console.akinoncloud.com using the credentials provided by Akinon. From the left main menu, select Projects. In the list that appears, click on the Applications link located above the relevant project:
On the screen that appears, scroll down to the Applications list at the bottom of the page and select the marketplace application (e.g., N11).
On the next screen, locate the URL field in the section shown below. The part of the URL in the format “xxxxxxxx.lb.akinoncloud.com” corresponds to the mp_frontend_url variable.
Use only the xxxxxxxx portion as the value for mp_frontend_url ({mp_frontend_url}.lb.akinoncloud.com).
Event Type: Enter the value in the following format:
Endpoint for Retrieving the oms_channel_id Variable:
An example cURL request to this endpoint is as follows:
From the list of channels returned, retrieve the ID of the marketplace channel, as shown in the example below:
Additional Headers:
The omnitron_user_token variable used here refers to the dedicated Omnitron user token.
Config: Enter the OMS channel ID as the channel ID.
Retry Countdown Config:
1.1 Payload Structure (OMS Mode)
When Akinon OMS triggers the webhook it sends a JSON body (simplified) similar to:
Notes:
packageitem_setshould be unique per new package (idempotency for retries).The sum of quantities per SKU across new packages must equal the original package quantities for that SKU (unless partial split rules are supported by a specific channel—default: strict equality).
OMS handles signature / auth internally—no manual headers beyond the configured Authorization.
2. External System Trigger Mode
In this mode any authorized external system calls the marketplace application endpoint directly. Use this when package split logic is executed outside Akinon OMS.
2.1 Endpoint
2.2 Authentication
Add header:
Tokens must belong to a user with permission to operate on the target channel. Rotate tokens according to your security policy.
2.3 Required Feature Flag
Channel config feature flag split_packages must be true. If disabled the endpoint returns 400.
2.4 Request Body Schema
Field Explanations
payload.number
Yes
string
Source (original order or package) number being split. Must match an existing order/package for the channel.
payload.packages
Yes
array
List of resulting packages to create from the source. Each element represents one new package.
payload.packages[].number
Optional
string
Pre-assigned identifier for the new package. If omitted the backend generates a deterministic value. Useful for external systems that need stable references.
payload.packages[].packageitem_set
Yes
array
Items (order lines) included in this new package. Total quantity per SKU across all new packages must equal the source package/order (if quantity not provided backend enforces conservation by item identity).
payload.packages[].packageitem_set[].order_item
Yes
object
Wrapper referencing the original order item.
payload.packages[].packageitem_set[].order_item.extra_field.id
Yes
string
External (extra_field) identifier of the original order item (or sub-line). Must be unique per item within the source; reused values in retries ensure idempotency (no duplicate package creation).
payload.packages[].state
Optional
object
Initial state for the new package. Defaults to channel’s base state (e.g. "Created" / enum 100) if omitted.
payload.packages[].state.enum_value
Conditional
string/integer
Enumeration value for the initial state. Required only if state provided. Example: "550". Values like "900" (ignore/canceled) may be skipped by the flow depending on business rules.
Notes:
OMS Trigger Mode may use
order_item.omnitron_idinstead oforder_item.extra_field.id; External System Trigger Mode uses theextra_field.idform shown here—only one path is required per mode.Idempotency: Retrying with the same set of
extra_field.idvalues does not duplicate already created packages; missing ones are added, completed ones are ignored.Quantity (
quantity) may be mandatory for some channels; if absent the backend assumes full conservation based on original item mappings.
2.5 Response
You can process status code, 200 is success, rest is error.
2.6 Security Considerations
Use a dedicated integration token with least privileges.
Log and audit
correlation_idfor traceability.
2.7 Monitoring & Troubleshooting
Logs related to split packaging can be found under the Split Packages title in the log screens.
If a request returns an error, retry until the process completes.
If a partial failure occurs (rare), retry with the exact same body; the service must not duplicate successfully created packages.
2.8 External Mode Quick Checklist
Ensure
split_packagesflag = true.Obtain OMS
channel_id(not Omnitron id).Collect
order_number. If splitting an existing package (not just an order), also collectoriginal_package_idand include it in the payload.Plan package grouping and validate quantity conservation.
Generate unique package item set per new package.
POST payload with Authorization header.
Log
correlation_idand created package ids.Handle / retry idempotently on network errors.
3. Operational Notes
Splitting is currently a one-way operation; merging packages is not supported in this flow.
After a successful split, downstream flows (price, stock, shipping updates) will reference the new package entities automatically.
If a package was already dispatched/shipped, splitting may be rejected depending on marketplace rules (future enhancement: pre-check dispatch status).
4. Changelog
2025-10-20
Added External System Trigger Mode, validation & error taxonomy, idempotency guidance
2025-09-12
Initial OMS-trigger documentation
Last updated
Was this helpful?

