How order import works

How order import works


This guide describes how Order Drop API processes an order from the moment it arrives until it is ready in Telaris – authentication, customer handling, product linking, order creation and the settings that govern the behaviour.



TABLE OF CONTENTS


Authentication


All calls to Order Drop API require a valid access key. The key is sent either as a Bearer token in the authorization header or as an access parameter in the request. Without a valid key, the call is rejected.

API users are created by the system administrator and have their own access key that does not expire.

Tip: How to create an API user and obtain the access key is described in the article «Create API user».



Customer handling


When an order is received, the API attempts to find an existing customer in Telaris. The lookup happens in a fixed priority order, and the system uses the first field present in the data sent in:

PriorityLookupDescription
1Tripletex IDThe customer's ID in Tripletex (used with the Tripletex integration)
2Customer numberThe customer's number in Telaris
3Customer IDThe customer's internal ID in Telaris
4Organisation numberOnly digits are compared
5EmailThe customer's email address


If the customer does not exist: the API creates the customer automatically with name, address, email and phone from the data sent in. The new customer is marked with a tag (for example «orderdrop») so it is traceable in the customer search. The customer type is set to «business» if a company name is given, otherwise «private individual».

If the customer has been deleted: the API restores the deleted customer and updates the data.


NOTE: With the setting «Reject missing customer» enabled, new customers are not created – the order is rejected instead. Used when all customers must exist in Telaris before they can place orders.



Product linking


Each order line is linked to a product in Telaris via one of three fields:

FieldDescription
Product numberMatches the product's product number in Telaris
SKUMatches the product's SKU code in Telaris
Product OIDMatches the product's unique identifier in Telaris


The system always tries the fields in a fixed order – product number, then SKU, then product OID – regardless of the order in the data sent in. If several fields are given on the same line and more than one matches, the last match is the one that stands.

If the product exists, the line is linked and pulls in price, item description and other product information. If it does not exist, the line is added with only text and price from the data sent in – without a product link.


NOTE: With «Reject missing product» enabled, the whole order is deleted and the API returns an error if a product does not exist. All product identifiers given on a line must then match – if both product number and SKU are sent in and only one exists, the whole order is rejected.



Order creation


Once the customer and products are identified, the order is created:

  1. The order is created with status «open»
  2. Responsible person is set from the customer's contact person (key account) if present, but is overridden by the responsible field in the data sent in when given

  3. Warehouse is set from the customer's default warehouse if present, but is overridden by the warehouse field in the data sent in when given

  4. Reference number is set by default from the order number in the external system. The data sent in can override both which field the reference number is taken from, and the order number in Telaris itself

  5. Department is set from the department of the responsible person in the data sent in, but is overridden by the department field when given. Department is not set automatically when the responsible person comes from the customer's key account

  6. Discount group and order status are set from the data sent in if given. Order status accepts both a custom status from the status setup and one of the system's fixed statuses

  7. Order lines are added with quantity, price, discount and VAT

  8. Payment information (gateway, amount) is stored as a note in the order description

  9. The delivery address is stored either as free text in the order description or as a separate address object, depending on the setting



Release of order lines


After all lines are added, they are released automatically – they are marked as ready for picking and warehouse handling. The order is thus ready for further processing immediately after import.

The data sent in can contain a flag that disables the release. The lines then remain in status «not released» and must be released manually in the order view.



Duplicate check


The data sent in can contain a source reference and a flag for duplicate checking. When the duplicate check is enabled, the API checks whether an order with the same source reference already exists. If it does, the new one is rejected with an error message. This prevents the same order from being imported several times.



Email notification


If an email address is configured for notification, a message is sent every time an order is created via the API. The message contains the order number and a direct link to the order in Telaris.



Settings


Order Drop API is governed by four system settings. These have no dedicated fields in the administration interface – they are entered as technical key/value pairs. Contact Telaris for activation

SettingKeyDefaultDescription
Reject missing customerorderdrop.failonmissingcustomerOffWhen enabled, the order is rejected if the customer does not exist. When disabled (default), the customer is created automatically
Reject missing productorderdrop.failonmissingproductOffWhen enabled, the order is deleted and the API returns an error if a product does not exist. When disabled (default), the line is added without a product link
Update delivery addressorderdrop.updateshippingaddressOffWhen enabled, the delivery address is created as a separate address object. Requires the data to contain both name and street address – if one of them is missing, the address is stored as free text. When disabled (default), the address is stored as free text
Notification recipientorderdrop.notificationemailNoneEmail address that receives notification of new orders. Empty means no notification




NOTE: The default values above are the system's built-in behaviour when the key is not entered – there is no pre-filled value in the setup.



Deviations when used through Telaris Connect


Telaris Connect uses the same order intake, but with its own endpoint and its own rules:

  • Authentication – Connect uses OAuth-based access with an order scope, not an ordinary API key

  • Its own endpoint – orders are sent to the Connect endpoint, not the ordinary Order Drop endpoint

  • The customer is always the logged-in party – customer information in the data sent in is ignored, and the order is tied to the authenticated Connect user

  • The customer must already exist – automatic customer creation is turned off for Connect orders, regardless of the system setting

  • The delivery address is always stored structured when an address is included in the data sent in

  • The response contains order status – Connect gets back order number, status and order lines, not just a confirmation

For information: The deviations apply only to Connect calls. They do not change the system settings for ordinary order import.



Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article