Skip to main content

iPaaS.com to Microsoft Dynamics NAV Sales Order Mapping Documentation

How iPaaS.com transactions map to Microsoft Dynamics NAV sales orders, including order lines, filters, and requirements.

Summary

iPaaS.com transactions can be transferred into Microsoft Dynamics NAV as sales orders through the Sales Order From iPaaS.com mapping collections. The Add collection creates a new NAV sales order and the Update collection refreshes an existing one (SalesOrders endpoint), with line items written through a child collection (SalesOrderLines endpoint). Bill-to and ship-to address detail is written onto the order header.

ID Format

Manual Sync ID Format. To sync a single order on demand, open the subscription's Manual Sync page in the iPaaS.com portal, select the Sales Order From iPaaS.com transfer, and enter the iPaaS.com transaction number. The integration writes this value as the Microsoft Dynamics NAV sales order number (No.).

  • Pattern: the iPaaS.com transaction number

  • Example: SO002970326

External ID Format. After a successful sync, the Microsoft Dynamics NAV sales order number (No.) is stored as the external ID linking the iPaaS.com transaction to its NAV order.

Deleted Record Support

Outbound delete is not supported. Delete is not implemented for sales orders, and order deletions in iPaaS.com do not propagate to Microsoft Dynamics NAV.

Custom Field Support

This collection supports custom fields. To populate a Microsoft Dynamics NAV order field that is not in the standard mapping list, add a subscription custom field whose name matches the NAV field name and map its value; the integration adds each such field name and value directly to the request. The name must be a valid field in your NAV environment, or NAV rejects the request.

Mapping Collection Status

Status: Enabled

Trigger Events: Automatic transfers are activated by the subscriber in the iPaaS.com subscription configuration's Outbound Data Flows section, by enabling the iPaaS.com record Create and Update events that should dispatch this collection. No automatic transfer runs until they are enabled there. Manual Sync (see ID Format) is available at any time regardless.

Duplicate or Conflicting Mappings

Other collections that affect the same record. The Sales Order Add and Update From iPaaS.com collections both target the same NAV sales order. The Sales Order To iPaaS.com collections capture orders in the reverse direction (round-trip), and the Invoice To iPaaS.com collections capture the posted-invoice form of the same orders.

Collision Handling

The Sales Order model supports configurable collision handling (it is the only entity in this integration that does). A collision is detected when the NAV API reports that the sales header already exists for the order number being created. The selectable methods (configured on the mapping collection) are:

  • Error: no link is recorded; the duplicate is surfaced as an error for manual resolution.

  • Remap and Link: link to the existing NAV order and re-run the mappings against it.

  • Update and Link: push the iPaaS.com data into the matched NAV order and record the link.

  • Update and No Link: push the iPaaS.com data into the matched order but do not record a link.

This is distinct from duplicate matching (external-id linking); it is a configurable conflict-resolution choice. Note: the integration's collision trigger matches a specific NAV error-message string and may need adjustment for NAV instances whose localization or version returns a different message (see Known Limitations / engineering flags).

Supported Child Collections

  • Add Microsoft Dynamics NAV Sales Order Line Item FROM iPaaS.com: writes order line items as part of the Add transfer.

  • Update Microsoft Dynamics NAV Sales Order Line Item FROM iPaaS.com: writes order line items as part of the Update transfer.

System Caveats

Microsoft Dynamics NAV Caveats

  • The SalesOrders and SalesOrderLines OData web services must be published in Microsoft Dynamics NAV with those exact service names, or orders and lines cannot transfer.

  • Microsoft Dynamics NAV field requirements are governed by your company configuration and are not published in a public API specification. Check your NAV instance for required fields: review the required order and line fields in your NAV company. Validate field requirements in a staging environment before relying on them in production.

  • Country/Region Code fallback: when a billing or shipping address has no country, the country code falls back to US; confirm this is appropriate for non-US customers.

iPaaS.com Caveats

  • The order's customer or company must be linked. The Sell-to Customer No. is resolved from the transaction's linked iPaaS.com customer, or the linked company if there is no customer; the customer/company must already be linked between iPaaS.com and NAV.

Setup Requirements

Microsoft Dynamics NAV Configuration

  • Publish the SalesOrders and SalesOrderLines OData web services (Web Services), with those exact service names. See the Installation Instructions.

Authentication

  • The integration authenticates using the connection credentials in the subscription settings. See the Connections and Settings documentation.

Integration Flow

  1. A transaction is sent from iPaaS.com to Microsoft Dynamics NAV. The mapping filter checks the transaction is Pending and that the linked customer/company has a NAV Customer Posting Group (see Mappings); non-qualifying transactions are skipped or error.

  2. The Sell-to Customer No. is resolved from the linked iPaaS.com customer (or company); collision handling links to an existing NAV order if one already exists for the order number.

  3. The order header (with bill-to/ship-to addresses) is written to the SalesOrders endpoint, and item lines are written to SalesOrderLines.

  4. The Microsoft Dynamics NAV sales order number (No.) is retained as the external ID for future updates.

Mappings

Add/Update Microsoft Dynamics NAV Sales Order FROM iPaaS.com (Header)

iPaaS.com data type: Transaction

Mapping Filter

// Status == "Pending"
if (Status == "Pending")
{
    var custId = !string.IsNullOrEmpty(CustomerId.ToString()) ? CustomerId : CompanyId;
    if (!string.IsNullOrEmpty(custId.ToString()))
    {
        var customerPostingGroup = await GetCustomerPostingGroup(custId.ToString());
        if (!string.IsNullOrEmpty(customerPostingGroup))
        {
            return true;
        }
        else
        {
            throw new Exception("This transaction cannot be created because the customer does not have a posting group. Please resolve this issue manually.");
        }
    }
    else
    {
        throw new Exception("Please provide either a valid 'companyId' or 'customerId'.");
    }
}
return false;

Filter Description. Only transactions with status Pending are written to NAV. For a Pending transaction, the linked customer (or company, if there is no customer) must resolve to a NAV customer that has a Customer Posting Group; if it does, the order transfers. If the customer has no posting group, the transfer stops with "This transaction cannot be created because the customer does not have a posting group. Please resolve this issue manually." If neither a customer nor a company is linked, it stops with "Please provide either a valid 'companyId' or 'customerId'." Non-Pending transactions are skipped.

Description. Writes the iPaaS.com transaction to a Microsoft Dynamics NAV sales order header. Add creates a new order; Update merges into the existing order (partial merge). The Add collection additionally sets the order-completion control fields.

Mapping Type

Source Field (iPaaS.com)

Destination Field (Microsoft Dynamics NAV)

Description

Field

TransactionNumber

No

Key. NAV sales order number; the key used to link and update the order.

Field

Type

DocumentType

Recommended. NAV document type.

Dynamic Formula

resolves the linked customer's, else company's, NAV external id

SellToCustomerNo

Recommended. NAV Sell-to Customer No., from the transaction's linked iPaaS.com customer (or company). See the mapping notes for the full formula.

Dynamic Formula

TransactionCreatedDateTime.ToString() (Add) / conditional (Update)

OrderDate

Recommended. NAV order date, from the transaction created date/time.

Lookup Translation

Lookup Translation

Status

Recommended. NAV order status, mapped from the iPaaS.com transaction status.

Dynamic Formula

first/last name of the primary billing address

BillToName

Recommended. Bill-to name. See mapping notes for the full formula.

Dynamic Formula

FieldFromFirstMatch(Addresses, "IsPrimaryBilling == true", "Address1")

BillToAddress

Recommended. Bill-to address line, from the primary billing address.

Dynamic Formula

FieldFromFirstMatch(Addresses, "IsPrimaryBilling == true", "Address2")

BillToAddress2

Recommended. Bill-to address line 2.

Dynamic Formula

FieldFromFirstMatch(Addresses, "IsPrimaryBilling == true", "City")

BillToCity

Recommended. Bill-to city.

Dynamic Formula

FieldFromFirstMatch(Addresses, "IsPrimaryBilling == true", "Region")

BillToCounty

Recommended. Bill-to county (region).

Dynamic Formula

FieldFromFirstMatch(Addresses, "IsPrimaryBilling == true", "PostalCode")

BillToPostCode

Recommended. Bill-to post code.

Dynamic Formula

country name → code, fallback US

BillToCountryRegionCode

Recommended. Bill-to country/region code (see Caveats for the US fallback).

Field

DiscountAmount

PaymentDiscountPercent

Recommended. Payment discount percent.

Dynamic Formula

first/last name of the primary shipping address

ShipToName

Recommended. Ship-to name.

Dynamic Formula

FieldFromFirstMatch(Addresses, "IsPrimaryShipping == true", "Address1")

ShipToAddress

Recommended. Ship-to address line.

Dynamic Formula

FieldFromFirstMatch(Addresses, "IsPrimaryShipping == true", "Address2")

ShipToAddress2

Recommended. Ship-to address line 2.

Dynamic Formula

FieldFromFirstMatch(Addresses, "IsPrimaryShipping == true", "City")

ShipToCity

Recommended. Ship-to city.

Dynamic Formula

FieldFromFirstMatch(Addresses, "IsPrimaryShipping == true", "PostalCode")

ShipToPostCode

Recommended. Ship-to post code.

Dynamic Formula

country name → code, fallback US

ShipToCountryRegionCode

Recommended. Ship-to country/region code.

Static

"Item,Resource,G/L Accounts"

LineItemSortOrder

Recommended. Control value: the priority order line types are written to the NAV order.

Static

"Order_Completed"

CompletionFieldName

Recommended. (Add only) Control value naming the order completion field.

Static

"true"

CompletionFieldValue

Recommended. (Add only) Control value: the completion field value that marks the order complete.

Static

"false"

Order_Completed

Recommended. (Add only) Initializes the order as not yet complete.

Add/Update Microsoft Dynamics NAV Sales Order Line Item FROM iPaaS.com

iPaaS.com data type: Transaction Line

Description. Child of the Sales Order Add/Update transfer. Writes the transaction's line items to the NAV sales order.

Mapping Type

Source Field (iPaaS.com)

Destination Field (Microsoft Dynamics NAV)

Description

Static

"Order"

DocumentType

Recommended. Fixed NAV document type.

Field

Sku

No

Key. NAV line item number, from the iPaaS.com line SKU.

Dynamic Formula

SKU-based G/L vs Item routing (see mapping notes)

Type

Recommended. Line type. SKUs 24400/24102 are written as G/L Account lines; all others as Item (the Update collection checks 24400 only). These are instance-specific SKUs: replace them with the SKUs your environment uses for G/L-account lines, or remove the special case.

Field

Description

Description

Recommended. Line description.

Field

Qty

Quantity

Recommended. Line quantity.

Field

UnitPrice

UnitPrice

Recommended. Line unit price.

Dynamic Formula

SKU-based reserve policy (see mapping notes)

Reserve

Recommended. Reserve policy: Optional (Add) / Always (Update) for item lines, unset for the G/L-account SKUs.

Error Handling

  • "This transaction cannot be created because the customer does not have a posting group. Please resolve this issue manually.": A Pending transaction's linked customer/company has no Customer Posting Group in NAV. Resolution: assign a Customer Posting Group to the customer in NAV.

  • "Please provide either a valid 'companyId' or 'customerId'.": A Pending transaction has neither a linked customer nor a linked company. Resolution: link the transaction's customer or company in iPaaS.com before transfer.

  • See the Microsoft Dynamics NAV Error Messages article for the full catalog.

Testing & Validation

Test Scenarios

  1. Send a Pending transaction whose customer has a NAV posting group; confirm the order and its item lines are created in NAV with bill-to/ship-to addresses.

  2. Send a Pending transaction whose customer lacks a posting group; confirm the transfer stops with the posting-group error.

  3. Update an existing order (for example, add a line) and confirm the change is written without duplicating the order.

  4. Trigger a collision (send an order whose number already exists in NAV) and confirm the configured collision method behaves as expected.

  5. Run a manual sync using the transaction number and confirm the correct NAV order is created or updated.

Validation Checklist

  • The SalesOrders and SalesOrderLines web services are published in NAV with those exact service names.

  • The transaction's customer/company is linked between iPaaS.com and NAV.

  • The G/L-account SKUs in the line Type/Reserve formulas match your environment.

  • The collision handling method is set as intended on the collection.

Additional Notes

Related Documents

Did this answer your question?