Skip to content

Field mapping cookbook

Receiving orders

How the hand-off payload usually maps onto a sales order. Column names are illustrative; the decisions are what matter.

AIOTICSales orderNotes
request_idexternal reference / your-ref fieldIndex it. Used for idempotency and support.
purchase_order.order_numbercustomer PO number ("Your reference")Already /-free. Truncate to your field length — many ERPs allow 20–35 characters.
order_dateorder dateISO string → date.
delivery_daterequested delivery dateMay be null → your default lead time.
currencycurrency codeValidate against your allowed set; default to the customer's currency when null.
total_pricedo not bookInformational. It is the printed total and may include VAT. Your ERP computes totals.
additional_informationinternal note / order remarkFree text; can be long.
supplierignoreIt is you.

Customer

AIOTICSales orderNotes
customer.customer_idsell-to customer numberYour debtor number as synced. null → reject (or your fallback).
customer.company, address, vat_id, email, phonecompare, do not overwriteOn confident matches these already equal your master record. A difference means the customer printed something new — worth a review, not an automatic master-data update.
customer.contact_personcontact / attentionDocument-authoritative: the person who signed this PO.
customer.iban, bicusually ignorePurchase orders rarely carry bank data.

Ship-to

AIOTICSales orderNotes
shipping_details.recipient.company + addressship-to addressMatch against the customer's known ship-to addresses if you keep them; create a one-off address otherwise.
recipient.contact_person, phone, emailship-to contactFor the carrier.
recipient.departmentaddress line 2
special_instructionsshipment note"Deliver before noon", dock numbers, etc.

Lines

AIOTICSales order lineNotes
items[].article_numberitem numberYour SKU. null only on override sends → reject or route to a person.
items[].quantityquantityWhole units in the base unit unless unit says otherwise. null only on override sends.
items[].unitunit of measureAs printed: ST, PCS, Stk, stuks, m, KG, rol… Map to your codes; unknown → base unit or reject.
items[].priceunit priceCustomer-stated price. Most suppliers book their own price list and keep the customer's price as reference; some honour it. Decide explicitly.
items[].line_totalcheck onlyquantity × price; useful to detect a mis-read quantity.
items[].descriptiondescriptionThe customer's wording; keep in a note if you use your own catalog text.
items[].currencyline currencyNormally equals the header's.

Business Central flavour

If you target Microsoft Dynamics 365 Business Central through its API:

  • Sales Order header: customerNumbercustomer_id, externalDocumentNumberorder_number (35 chars), requestedDeliveryDatedelivery_date, currencyCodecurrency.
  • Ship-to fields: shipToName, shipToAddressLine1, shipToPostCode, shipToCity, shipToCountry.
  • Lines: lineType: Item, lineObjectNumberarticle_number, quantity, unitOfMeasureCode ← mapped unit. Omit unitPrice to take the price list.
  • Business Central returns number — that is your order_number in the response.
  • BC rejects unknown items with a 400 whose error.message reads "The Item does not exist. Identification fields and values: No.='…'" — pass it through as error.

Data-API ERPs (writing to tables)

Everything above still applies, plus: nobody validates for you. Use the SDK pipeline with at least catalog membership, customer exists / not blocked, positive quantities and duplicate PO before writing. See Validation when your ERP has no functional API.

Documentation revision 3 · Published 8 September 2026 · commit 6862d5e. Verified against AIOTIC API v1.0.0. AIOTIC is a product of DevOps Company.