Skip to main content

MultiversExtendedV3 - Send order

MultiversExtendedV3 - Send Order to Backoffice This document describes the process of sending an order from App4Sales to the Multivers bac...

Updated over a week ago

MultiversExtendedV3 - Send Order to Backoffice

This document describes the process of sending an order from App4Sales to the Multivers backoffice. The connector can send orders, quotations, or sales contracts based on the App4Sales order type. The process involves mapping App4Sales order data to the Multivers sales order format, handling various business logic, and sending it to the Multivers API.

Data Source Configuration

The connector sends order data to the Multivers API. The specific endpoint used depends on whether an order, quotation, or sales contract is being created.

  • Data Source: Multivers API

  • Entity: Sales Order, Sales Quotation, Sales Contract

Order Header Logic

The order header is created based on the data in the App4Sales order. This includes customer information, order type, dates, and references.

App4Sales Field

Source Field (API/Excel/DB)

Logic/Notes

CustomerCode

Order.Customer.CustomerCode

The customer code from the App4Sales order.

OrderTypeCode

Order.OrderType.ValueToBackoffice

The order type from App4Sales. If not provided, it defaults to "NOR".

OrderDate

Current Date

The current date in "yyyy-MM-dd" format.

CurrencyCode

Order.Customer.Currency

The currency from the customer's data.

CalculateVat

Debtor.CalculateVat

Retrieved from the debtor information in Multivers.

DiscountPercentage

Order.Customer.Discount

The customer's discount percentage. It is set to 0 if the setting "Put customer discount on orderline during send order" is enabled.

InvoiceAddressCode

Organisation.Addresses

The ID of the invoice address with the lowest priority.

Reference

Order.YourReference, Order.Reference, Order.Description1

A composite field based on the "Use alternate reference" setting. If enabled, it concatenates Default Reference, Order Reference, Description1, and YourReference. Otherwise, it uses Order.YourReference.

InvoiceTypeCode

Debtor.InvoiceTypeCode

Retrieved from the debtor information in Multivers.

PaymentConditionCode

Debtor.PaymentConditionCode

Retrieved from the debtor information in Multivers.

SalesRepCode

Debtor.RepresentativeCode

Retrieved from the debtor information in Multivers.

VatScenario

Debtor.VatScenarioCode

Retrieved from the debtor information in Multivers.

OrderStatus

Connector Setting

The value is taken from the "Order status for new orders" setting. If the setting is not configured, it defaults to "O".

OrderText / OrderInstruction

Order.Notes

The order notes are mapped to either `OrderText` or `OrderInstruction` based on the "Send order notes in on order instructions" setting.

PaidOnlineAmount

PaymentDetail.AmountPaid

The amount paid online, if available.

PaidOnlineMerchantTransactionId

PaymentDetail.PaymentId

The payment transaction ID, if available.

Line & Pricing Logic

Order lines are created for each item in the App4Sales order. The logic handles pricing, discounts, and delivery information.

App4Sales Field

Source Field (API/Excel/DB)

Logic/Notes

Discount

OrderLine.Discount

The line discount. This is not sent if "Don't send order line discounts to Multivers" or "Send custom price as sales price on an order line" settings are enabled.

InstructionText

OrderLine.Instruction

The instruction text from the order line. Not used if "Use instruction line as delivery date" setting is enabled.

OrderLineNumber

-

A sequential number starting from 1.

Price

OrderLine.Price

The line price. The original price is used unless "Send custom price as sales price on an order line" is enabled, in which case the custom price is used. This is not sent if "Don't send order line discounts to Multivers" is enabled.

PricePer

OrderLine.Item.PurchasePackageSize

The purchase package size of the item. Defaults to 0 if not available.

QtyOrdered

OrderLine.Quantity

The quantity of the item. Defaults to 0 if not available.

ProductDescrText

OrderLine.Item.Description

The item description. Not sent if "Don't send the Item description on the orderline note" setting is enabled.

UnitCode

OrderLine.Item.Unit

The unit of the item.

ProductIdentifier.ProductCode

OrderLine.Item.InternalItemCode

The internal item code.

DeliveryAddress

Order.AlternateAddress / Organisation.Addresses

The delivery address. If an alternate address is provided in the order, it is used. Otherwise, it is determined based on the "Use delivery address before invoice on order" setting.

DeliveryAddressOneOff

Connector Setting

A boolean value from the "Set the delivery address as One off so it won't get saved" setting.

VatGroup

OrderLine.VatGroup

The VAT group from the order line.

DeliveryDateAfter / DeliveryDateBefore

OrderLine.Instruction / Order.OrderDate

The delivery date. If "Use instruction line as delivery date" is enabled, the date is parsed from the instruction line. Otherwise, the order date is used. This is not set if "Never fill in the delivery date on orderlines" is enabled.

Charges & Attachments

The connector handles order attachments by retrieving them from the Multivers API.

Responses & Error Handling

After sending the order, the connector receives a response from Multivers. If the order is created successfully, the Multivers order ID is returned. This ID is then used to update the order number in App4Sales. If an error occurs, an error message is returned and logged.

Related Settings & Prerequisites

  • UseSalesContracts: Use sales contracts when creating a sales order.

  • DefaultStockProblemValue: Sets a default value for the stock problem field on order lines.

  • OrderStatusForNewOrders: The order status for new orders (defaults to 'O').

  • SendOrderNoteInOrderInstructions: Send order notes in on order instructions.

  • UseAlternateReference: Combine Default Reference, Reference, Description1, and Your Reference as order reference.

  • PutCustomerDiscountOnOrderlineDuringSendOrder: Put customer discount on orderline during send order.

  • DontSendOrderLineDiscountsToMultivers: Don't send order & quotation line discounts to Multivers.

  • SendCustomPriceAsSalesPriceOnOrderLine: Send custom price in as the sales price on an order line.

  • DontSendItemDescriptionToOrderlineNote: Don't send the Item description on the orderline note.

  • SetDeliveryAddressAsOneOff: Set the delivery address as One off so it won't get saved.

  • SetDeliveryLineOnOrderLines: Send the delivery line on the orderlines.

  • NeverSetDeliveryDateOnOrderlines: Never fill in the delivery date on orderlines.

  • UseInstructionLineAsDeliveryDate: Use instruction line as delivery date.

  • OnlyPickAddressesWithNonEmptyAttributeCode: Ensure that AttributeCode on the delivery addresses send on the orderlines has a value.

  • UseDeliveryAddressBeforeInvoiceOnOrder: If any delivery address exists must be selected (ordered by prio).

Did this answer your question?