Order Create
This tutorial explains how the Order Create process works for the N11 integration in the Marketplace Dashboard: which orders are picked up, which requests are made to N11 and Omnitron (with example data), how the end-to-end process works, and how to read the error codes it produces.
What is Order Create?
Order Create pulls orders from N11 into Omnitron that fall within a specified start date and end date range and match a given order status. On the Logs screen, this process appears under the flow name Order Create.
When Does It Run?
Controlled by the
get_ordersfeature flag in the channel settings. When active, it runs automatically:Every 5 minutes, requesting orders in the
Pickingstatus only, within a rolling last 12 hours window (bounded below by the channel's Order Start Date, which mainly matters for the very first run).Every night at 03:00, an additional catch-up run requests the
Pickingstatus again, but with the date window widened to the last 15 days, to pick up anything the 5-minute runs might have missed.
Users can also manually trigger this flow from the Dashboard — either for one of three statuses (
Picking,Shipped, orDelivered), or by targeting a specific order directly via its order number or package number, bypassing status/date filtering entirely.Before activating this flag,
Order Start Date,Use Neighborhood,Send Shipping Info,Use Channel ID In Address Mapping,Get Discount Amount,Order Number Format,OMS Enabled,ERP CodeandCargo Company Mappingmust be configured — see N11 Marketplace Setup Configurations.
Which Orders Are Eligible?
An order is picked up only if it:
Has a status matching the run —
Pickingon both the 5‑minute schedule and the nightly catch-up run, orPicking/Shipped/Deliveredwhen a user triggers the flow manually by status.Falls within the date window: the last 12 hours on the regular 5-minute schedule, or the last 15 days on the nightly catch-up run — both bounded below by the channel's Order Start Date.
Unless the manual trigger targets a specific order number or package number — in that case the order is fetched directly, regardless of its status or date.
Has not already been imported into Omnitron — the flow checks this before doing any other work (see Skipping Already-Imported Orders) and simply skips the package if it has.
When an order is imported, its order and order item are created in Omnitron directly with status 400 (approved).
Fetching Orders from N11
Orders (called shipment packages on N11's side) are fetched with:
When a manual trigger targets a specific order instead, startDate / endDate / status are replaced with a single filter:
The response is paginated (totalPages / totalOrderCount); the flow keeps requesting the next page until every page for that run has been retrieved and merged into a single list.
Skipping Already-Imported Orders
For every package, the flow first makes sure it hasn't been imported before:
If no order is found by number, it also checks by the remote package ID, in case the order exists under a different number:
If either call finds a match, the package is skipped entirely — nothing else in this tutorial runs for it.
Checking for Existing Cancellation/Refund Plans
Before going any further, the flow re-checks the package's current state directly on N11 (GET {mp_host}/rest/delivery/v1/shipmentPackages?orderNumber={orderNumber}) together with Omnitron's own cancellation_plans for that order — internally, this step is called CancelRefundControl. It guards against creating (or re-processing) an order that already has a cancellation or refund plan in progress, which is otherwise handled by the separate Cancel/Refund Orders flow.
Resolving the Customer
The buyer is matched (or created) in Omnitron using N11's customerId as the channel code:
If no customer is found, one is created:
first_name / last_name are split off the first full name available, in this order of preference: N11's own customerfullName field, then shippingAddress.fullName, then billingAddress.fullName.
Resolving Shipping & Billing Addresses
Each address's city, township, district, and neighborhood — plus countryCode on the billing side — are matched against Omnitron's own country / city / township / district records (using each record's marketplace mapping first, then falling back to a name match). If a value can't be matched, an error report is created in Omnitron for that model (CreateErrorReport) and the order stops with the corresponding error code (see below).
Once resolved, the address is created in Omnitron — or reused if an identical one (matched by a hash of its contents, hash_data) already exists:
A few behaviors worth noting:
Neighborhood is only sent if
Use Neighborhoodis active in the channel settings; otherwise thedistrict(mahalle) field is left empty on the Omnitron address.Billing address for a corporate invoice (N11's
invoiceType = "2"):company_name,tax_office, andtax_noare filled from N11'scustomerfullName/taxOffice/taxId, ande_bill_taxpayeris set totrue.Micro-export orders (
micro: true): the billing address is created withoutdistrict/township, regardless of theUse Neighborhoodsetting.
Resolving the Cargo Company
N11's numeric shipmentCompanyId (e.g. 344) is translated to an internal carrier slug (e.g. yurtici) using a fixed built-in table (mng, aras, ups, surat, horoz, ptt, etc.), and that slug is then looked up in the channel's own Cargo Company Mapping setting to get the Omnitron cargo_company ID:
If N11's shipmentCompanyId doesn't resolve to a known slug, or the slug isn't present in Cargo Company Mapping, the mapping's mandatory "default" entry is used instead.
Enriching Order Items from Omnitron
For every order line, the product is resolved in two steps:
Omnitron is first queried for an existing Integration Action linking N11's
stockCodeto a product, using it as the remote ID:
If no such Integration Action is found yet, the product itself is looked up using the RemoteId Schema mapped attribute (or its
skuif no mapping is configured), and a new Integration Action is created linking it to thisstockCodeso future orders skip straight to step 1:
Then, for the matched product, its stock and price records are fetched:
If the product, its stock, or its price can't be found, the order stops with error code 2018 (see below), and the specific missing remote IDs are included in the log message.
Building & Sending the Order to Omnitron
Once the customer, addresses, cargo company, and every order item have been resolved, the order is assembled and sent as a single request:
Order and Order Item extra_field Mapping
order.extra_field.id
N11 id
The N11 shipment package ID — also used later as the order's remote_id for duplicate checks.
order.extra_field.tracking_number
N11 cargoTrackingNumber
order.extra_field.orderNumber
N11 orderNumber
order.extra_field.micro
N11 micro
order.extra_field.etgbNo / etgbDate / hsCode
N11 etgbNo / etgbDate / hsCode
Only present when micro is true.
order_item.extra_field.id
N11 orderLineId
order_item.extra_field.status
N11 orderItemLineItemStatusName
order_item.extra_field.campaign_number / tracking_number
N11 cargoTrackingNumber
Same tracking number, kept under both keys.
order_item.extra_field.price_extra_field
Omnitron product price record's extra_field
Copied through as-is, not derived from N11.
order_item.extra_field.stock_extra_field
Omnitron product stock record's extra_field
Copied through as-is, not derived from N11.
How the Process Works — Summary
Orders matching the run's status (
Pickingon the automatic runs, orPicking/Shipped/Deliveredon a manual trigger) and the configured date window are fetched from N11, page by page — or, when a manual trigger targets a specific order number or package number instead, that single order is fetched directly.Each package is checked against Omnitron by order number and by remote ID — if it already exists, it's skipped.
Any existing cancellation/refund plan for the package is checked.
The customer is resolved (matched by
customerId, or created).The shipping and billing addresses are resolved — country, city, township, and district are matched or reported as errors — and created or reused in Omnitron.
The cargo company is resolved via the built-in N11 carrier table and the channel's Cargo Company Mapping.
Each order item's product, stock, and price are fetched from Omnitron, and a missing Integration Action is created for the product if needed.
The order and its items are assembled — including all
extra_fieldvalues — and sent to Omnitron in a single request.The outcome is written back and becomes visible on the Logs screen.
Monitoring
From the left menu, go to Sales Channels > N11 > Marketplace Operations > Logs.
Filter by flow name Order Create.
Use the Order Number or Execution ID filters to locate a specific order.
Flow Trigger
Manual runs described in When Does It Run? are started from the Trigger screen (Sales Channels > N11 > Marketplace Operations > Trigger), by clicking Run next to the Order Create flow. In the popup form, select a status (Picking, Shipped, or Delivered), or fill in an order number / package number to fetch that single order directly instead.
See the Flow Trigger tutorial for the general trigger screen walkthrough (single trigger vs. CSV trigger).
Error Codes and Explanations
1001
The order's basic info (order number, package ID, micro flag) could not be extracted from N11's response.
1002
An error occurred while resolving (matching or creating) the customer in Omnitron.
1003
The order's city could not be resolved in Omnitron.
1004
The order's township (ilçe) could not be resolved in Omnitron.
1005
An error occurred while resolving or creating the shipping address.
1006
An error occurred while resolving or creating the billing address.
1007
An error occurred while resolving the cargo company.
1008
The order was rejected by Omnitron's create_orders endpoint.
1021
The order's district (mahalle) could not be resolved in Omnitron.
1026
The order's country could not be resolved in Omnitron.
1028
An error occurred while checking whether the order already exists in Omnitron.
1030
An error occurred while checking the package's cancellation/refund state.
2018
One or more order items could not be enriched — the product, its stock, or its price was not found in Omnitron for the given stockCode. The log message lists the specific remote IDs that were not found.
Related Settings
get_ordersfeature flag — enables/disables the automatic 5-minutePickingrun and the nightly 03:00Pickingcatch-up run (15 days back).Order Start Date — the earliest date this flow will fetch orders from.
Cargo Company Mapping — required; its
"default"entry is used whenever N11's carrier can't be mapped to a more specific one.Use Neighborhood — whether the neighborhood is included when creating addresses.
Use Channel ID In Address Mapping — scopes address mapping/search to this channel.
Get Discount Amount — whether
discount_amountis populated from N11 on the order and its items.Order Number Format — customizes the Omnitron order number; defaults to
{orderNumber}-{id}.OMS Enabled / Send Shipping Info — control whether the tracking number is populated by this flow or left to the brand's own shipping process.
ERP Code — not used by this flow directly; it can be used to distinguish the relevant sales channel in ERP integration.
See N11 Marketplace Setup Configurations for how to configure all of the above.
Last updated
Was this helpful?

