Skip to main content

VismaNET - Send order

VismaNET Connector - Send Order to Backoffice Overview The Send Order to Backoffice process transfers sales orders created in App4Sales t...

Updated over a week ago

VismaNET Connector - Send Order to Backoffice

Overview

The Send Order to Backoffice process transfers sales orders created in App4Sales to Visma.NET. This involves converting App4Sales order headers and lines into the Visma.NET sales order structure, including customer details, products, quantities, pricing, and associated notes or references. The process ensures that orders are accurately reflected in the ERP for further processing, such as fulfillment and invoicing. Upon successful transmission, App4Sales updates the internal order with the Visma.NET Order ID.

Data Source Configuration

App4Sales orders are sent to Visma.NET via REST API calls. The App4Sales internal Order object is the primary data source, containing all relevant information captured during the order creation process. The connector communicates with the Visma.NET API to create sales orders.

Data Mapping Table - Order Header

App4Sales Field

Source Field (API/Excel/DB)

Logic/Notes

Customer ID

model.Customer.GetCustomerCode()

Mapped directly from the App4Sales Customer's code.

Customer Location ID

model.Customer.GetLocationId()

Mapped directly from the App4Sales Customer's location ID.

Customer Reference Number

model.YourReference

Mapped from 'YourReference'. If 'Send Your Reference To Customer Order Field' setting is enabled, this value is mapped to 'Order' field in Visma.NET and 'RefNo' will be null.

Order Reference Number

model.YourReference

Mapped from 'YourReference'. If 'Send Your Reference To Customer Order Field' setting is enabled, this value is mapped to 'Order' field in Visma.NET and 'RefNo' will be null.

Notes

model.Notes

Mapped directly from the order notes.

Requested On Date

model.OrderDate

Mapped directly from the order date.

Order Date

DateTime.Now

Set to the current date and time when the order is sent.

Order Type

model.OrderType?.ValueToBackoffice

Mapped from the 'ValueToBackoffice' property of the App4Sales order type. Defaults to "SO" (Sales Order) if not specified.

Description

model.Reference

Mapped from the order reference.

Status

settings.CreateOrdersOnHold

Set to "Hold" if the 'Create Orders On Hold' setting is enabled, otherwise "Open".

Shipping Address - Line 1

model.AlternateAddress.AddressLine1

Mapped from the alternate shipping address, if provided.

Shipping Address - Line 2

model.AlternateAddress.AddressLine2

Mapped from the alternate shipping address, if provided.

Shipping Address - Line 3

model.AlternateAddress.AddressLine3

Mapped from the alternate shipping address, if provided.

Shipping Address - City

model.AlternateAddress.City

Mapped from the alternate shipping address, if provided.

Shipping Address - Postal Code

model.AlternateAddress.PostCode

Mapped from the alternate shipping address, if provided.

Shipping Address - Country ID

model.AlternateAddress.Iso2

Mapped from the alternate shipping address's ISO2 country code. Falls back to the App4Sales Administration's Default Country Code if not provided.

Shipping Address - State ID

model.AlternateAddress.State

Mapped from the alternate shipping address's state, if provided.

Shipping Contact - Name

model.ConsumerName

Mapped from the consumer name, if provided.

Shipping Contact - Email

model.ConsumerEmail

Mapped from the consumer email, if provided.

Shipping Contact - Phone 1

model.ConsumerPhoneNumber

Mapped from the consumer phone number, if provided.

Data Mapping Table - Order Lines

App4Sales Field

Source Field (API/Excel/DB)

Logic/Notes

Inventory ID (Item Code)

line.ItemCode

Mapped directly from the order line's item code.

Description

line.Item?.Description

Mapped from the order line item's description.

Notes

line.Instruction

Mapped from the order line's instruction. If 'Send Instruction as Reason Code' setting is enabled, this value is mapped to 'ReasonCode' in Visma.NET and 'Note' will be null.

Reason Code

line.Instruction

Mapped from the order line's instruction. If 'Send Instruction as Reason Code' setting is enabled, this value is mapped to 'ReasonCode' in Visma.NET and 'Note' will be null.

Quantity

line.Quantity

Mapped directly from the order line's quantity. For return orders, if the quantity is negative, it's converted to positive and the operation type is set to 'Receipt'. If positive, operation type is 'Issue'.

Unit Of Measure

line.Item?.Unit

Mapped from the order line item's unit. Falls back to the 'Default Unit' setting if not specified.

Warehouse ID

Derived based on the following priority:
1. Sales representative's assigned warehouse.
2. For Portal4Sales orders, the 'Warehouse For P4S Orders' setting.
3. The 'Warehouse For Orders' setting.

Unit Price

line.Price

Calculated based on the original price and discount. If 'Send No Price And Discount To Backend' is disabled, then price = line.Price * 100 / (100 - line.Discount).

Discount Percent

line.Discount

Mapped from the order line's discount. If 'Send No Price And Discount To Backend' is disabled, then this value is sent. Also, webshop discount percentage is applied if the order source is Portal4Sales and 'WebshopDiscountPercentage' is set.

Has Manual Discount

Set to true if 'Discount Percent' is greater than 0.

Has Manual Price

Always set to true to avoid unit of measure conversion factor * unit price calculations in Visma.NET.

Operation

For return orders, set to 'Issue' if quantity is positive, 'Receipt' if quantity is negative.

Special Logic & Filters

  • Sales Representative Warehouse: If a sales representative has a specific warehouse assigned, orders placed by that sales representative will use their assigned warehouse.

  • Portal4Sales Orders: Orders originating from Portal4Sales can use a dedicated warehouse specified in the 'Warehouse For P4S Orders' setting.

  • Order Status: The order status in Visma.NET is set to "Hold" or "Open" based on the 'Create Orders On Hold' setting.

  • Order Type for Returns: If the order type matches the 'Order Type For Return Orders' setting (defaults to "RM"), then the order line quantities are adjusted: positive quantities are marked as 'Issue' and negative quantities are marked as 'Receipt' with a positive value.

  • Webshop Discount Calculation: If the order source is Portal4Sales and a 'WebshopDiscountPercentage' is defined, this discount is applied to the order lines. If a line already has a discount, the webshop discount is combined.

Domain Specifics

Order Header Logic

The customer ID and location ID are directly mapped. The 'Your Reference' field from App4Sales can be mapped to either 'RefNo' or 'Order' in Visma.NET based on the connector settings. The order type defaults to "SO" but can be overridden by the App4Sales order type's 'ValueToBackoffice'. The order date is always the current date, while the requested date is taken from the App4Sales order date. Shipping address details are mapped if an alternate address is provided, and consumer contact information is mapped if available.

Line & Pricing Logic

Each order line's item code, description, and quantity are mapped. The unit of measure is derived from the item or falls back to a default setting. The warehouse for each line is determined by a hierarchy of settings: sales rep's warehouse, Portal4Sales specific warehouse, or a general order warehouse. Pricing logic accounts for discounts, converting the App4Sales line price into a Visma.NET unit price by effectively "undoing" the discount if the 'Send No Price And Discount To Backend' setting is disabled. Manual price and discount flags are set to ensure Visma.NET does not recalculate these values. For return orders, the quantity and operation type are adjusted accordingly.

Charges & Attachments

The current implementation does not explicitly support sending separate charge lines (e.g., freight, payment fees) or order-specific attachments (e.g., PDFs, signature images) to Visma.NET as part of the order submission process. Only notes and item-related instructions are transferred as described in the Order Header and Order Lines sections.

Responses & Error Handling

Upon sending the order, the system attempts to retrieve the created order's details from Visma.NET. If successful, the Visma.NET Order ID is stored in App4Sales. If the API call fails or the order details cannot be retrieved, an error message is returned.

Related Settings & Prerequisites

  • Send Your Reference To Customer Order Field: (Boolean) If enabled, the 'Your Reference' from App4Sales is sent to the 'Order' field in Visma.NET, otherwise to 'RefNo'.

  • Create Orders On Hold: (Boolean) If enabled, new orders in Visma.NET will be created with a "Hold" status. Otherwise, they will be "Open".

  • Default Unit: (String) Specifies the default unit of measure to use if the item's unit is not defined.

  • Send Instruction as Reason Code: (Boolean) If enabled, the order line instruction is sent as the 'Reason Code' in Visma.NET. Otherwise, it's sent as a 'Note'.

  • Warehouse For P4S Orders: (String) Specifies the warehouse ID to use for orders originating from Portal4Sales.

  • Warehouse For Orders: (String) Specifies the default warehouse ID to use for all orders if no other specific warehouse is determined.

  • Send No Price And Discount To Backend: (Boolean) If enabled, prices and discounts are not sent to Visma.NET, implying Visma.NET will determine them.

  • Order Type For Return Orders: (String) Defines the App4Sales order type that should be treated as a return order in Visma.NET (defaults to "RM").

  • WebshopDiscountPercentage: (Decimal) Defines a percentage discount applied to Portal4Sales orders.

Known Limitations

  • The current implementation does not explicitly support sending separate charge lines (e.g., freight, payment fees) or order-specific attachments (e.g., PDFs, signature images) to Visma.NET as part of the order submission process.

  • The exact ISO code for currency is retrieved, but its application or display in Visma.NET is not detailed in this extension.

Did this answer your question?