Skip to main content

BjornLunden - Send order

Björn Lunden - SendOrder This document describes the process of sending an order from App4Sales to the Björn Lunden backoffice. Data Sour...

Updated over a week ago

Björn Lunden - SendOrder

This document describes the process of sending an order from App4Sales to the Björn Lunden backoffice.

Data Source Configuration

The connector sends a POST request to the /order endpoint of the Björn Lunden API.

Order Header Logic

The following table describes the mapping of the order header fields from App4Sales to the Björn Lunden API.

Björn Lunden Field

App4Sales Field

Logic/Notes

CustomerId

Order.Customer.CustomerCode

The customer's code.

RegisteredByUser

Order.Salesrep

The username of the sales representative.

YourReference

Order.YourReference

The customer's reference for the order.

DeliveryDate

Order.OrderDate

The order date, formatted as "yyyy-MM-dd".

Total

Order.TotalAmount

The total amount of the order.

DeliveryBox

Order.AlternateAddress.AddressLine1

The first line of the delivery address. Only if an alternate address is provided.

DeliveryStreet

Order.AlternateAddress.AddressLine2

The second line of the delivery address. Only if an alternate address is provided.

DeliveryCity

Order.AlternateAddress.City

The city of the delivery address. Only if an alternate address is provided.

DeliveryCountry

Order.AlternateAddress.Country

The country of the delivery address. Only if an alternate address is provided.

DeliveryZip

Order.AlternateAddress.PostCode

The postcode of the delivery address. Only if an alternate address is provided.

Line & Pricing Logic

The following table describes the mapping of the order line fields from App4Sales to the Björn Lunden API.

Björn Lunden Field

App4Sales Field

Logic/Notes

ArticleId

OrderLine.ItemCode

The item code.

Comment

OrderLine.YourReference

The reference for the order line.

UnitPrice

OrderLine.Price

The price per unit.

DiscountPercentage

OrderLine.Discount

The discount percentage for the order line.

OrderedQuantity

OrderLine.Quantity

The ordered quantity.

RowNumber

OrderLine.LineNumber

The line number of the order line.

VatCode

Customer Free Field ("VATCode")

The VAT code is retrieved from the customer's free field with the caption "VATCode".

Responses & Error Handling

The connector expects the Björn Lunden API to return the created order with an ID. This ID is then used as the order number in App4Sales.

If the API returns an error, the error message is logged and returned to the user.

If no order number is retrieved from the backoffice, an error message is logged and returned to the user.

Did this answer your question?