Default Mapping

Introduction

After downloading the connector from Microsoft's extension marketplace, besides extra tables, reports and codeunits, various default mappings will be set up in your system.

When the required initial steps are made (i.e. having a sales channel set up, default language code set to 'ENU', etc.) these default mappings can handle basic syncing with a webshop out of the box.

These default mappings can be tweaked and configured as needed per your company's wishes. This article focuses mainly on specific data synced for standard WooCommerce integrations. If you would like to better understand Synchronisation Dashboard in general, please see this article.

You can find all the default mappings here: Integration > Message Definitions.

You can select Edit or View in the banner to check what any of these messages do.

We've also created a more usable dashboard for these messages, which you can find via the main menu > Communication > Synchronization Dashboard.

 

It's here that you'll find many of the mappings bundled together in sections that relate to specific syncing. Think of order import, product sync and customer export.

It's this dashboard that our consultants use daily when implementing projects for our clients.

 

Field Mapping

When drilling down into any of these messages, you'll find a 'Message Definition' with mapped fields. 

 

It's here where we set up which fields to check for data in a JSON response. The field and field name refer to the BC table that we are adding data into (for inbound messages) or grabbing data from (for outbound messages). The Webshop Field column shows the field name in the JSON that we check for data or send data to.

 

Standard Fields

As mentioned, after downloading the Tinx app and installing a Webshop Connector, default mapping is added to the system. Below you will find examples of the default field mapping (for WooCommerce).

Again, please note that these are the standard fields and are (in most cases) not set in stone. For virtually every project the Tinx team has worked on so far, the default mapping has been tweaked or added to in some way.

 

  • Document No.: WOO-020 | Create item in WooCommerce
    Web Service: products | Direction: Outbound

    Basic Product Sync

    Table

    Element Name

    Field No. / Name

    Webshop Field Notes
    Yes 27, Item products

    3, Description
    18, Unit Price,
    18, Unit Price
    1, No.




    5, Description 2

    name
    price
    regular_price
    sku
    stock_quantity
    manage_stock
    backorders
    backorders_allowed
    short_description
    featured

    The values such as manage_stock and backords are set to default values (i.e. yes or no).

    The stock value sent with stock_quantity field is taken from the Item Card in BC (field 68).

    No

    11205753, TINX Web Item Extension

    products

    51, Woo Product Type
    12, Visibility
    10, Manage Stock



    13, Status
    105, Is Virtual
    106, Is Downloadable
    107, Reviews Allowed

    type
    catalog_visibility
    manage_stock
    backorders
    in_stock
    backorders_allowed
    status
    virtual
    downloadable
    reviews_allowed
    Fields such as catalog_visibility and manage_stock often get default values or true or false. These values are either set manually or , in this case, take their values from a Tinx table (11205753).
    No 5404, Item Unit of Measure dimensions

    7300, Length
    7301, Width
    7302, Height

    length
    width
    height

     

    No 11205755, TINX Attribute attributes 6, Webshop Id
    2, Field Name
    25, Position


    id
    name
    position
    visible
    variation
     
    No 11205761, TINX Attribute Options options 2, Option Value option_value  
    No 11205296, TINX Web Text Line description 6, Text description  
    No 11205296, TINX Web Text Line short_description 6, Text short_description  
    No 11205751, TINX Web Category Item categories 11, Magento Category Id id  
    No 27, Item meta_data 14, Item Disc. Group _tinx_item_discount_group  
    No 11205284, TINX Image - Video Link images      
    No 7002, Sales Price products 5, Unit Price sale_price  
  • Below you will find the message used to create sales orders in BC. Note that many values used in the creation of a sales order are downloaded in a previous step (i.e. through the WOO-086 and WOO-086-1 messages), to our Tinx Webshop Order table. It is based on this table, and filters on this table, that the connector creates sales documents.

    Document No.: WOO-087 | Download order and Create Sales Header in BC
    Web Service: orders/%1 | Direction: Inbound

    Table

    Element Name

    Field No. / Name

    Webshop Field Notes

    36, Sales Header

    root/root 1, Document Type
    3, No.
    2, Sell-to Customer No.
    11, Your Reference
    19, Order Date
    20, Posting Date
    100, External Document No.
    43, Salesperson Code
    23, Payment Terms Code
    104, Payment Method Code
    105, Shipping Agent Code
    11205250, TINX Webshop Order
    11205251, TINX Entity ID
    document_type
    no_
    id
    order_key
    order_date
    posting_date
    id
    salesperson_code
    id
    id
    shipping_agent_code
    tinx_webshop_order
    id

    Field 3 uses a number series defined in Tinx E-Commerce Setup.
    The sell-to customer is obtained through a lookup to different table (Webshop Orders).
    Order and posting dates have default values 'TODAY' and the payment terms and method codes are also lookup fields to different table.

    36, Sales Header billing 5, Bill-to Name
    7, Bill-to Address
    8, Bill-to Address 2
    9, Bill-to City
    85, Bill-to Post Code
    86, Bill-to County
    87, Bill-to Country/Region Code
    79, Sell-to Customer Name
    81, Sell-to Address
    82, Sell-to Address 2
    83, Sell-to City
    89, Sell-to County
    90, Sell-to Country/Region Code
    88, Sell-to Post Code
    company
    address_1
    address_2
    city
    postcode
    state
    country
    company
    address_1
    address_2
    city
    state
    country
    postcode
     

    36, Sales Header

    shipping 13, Ship-to Name
    15, Ship-to Address
    16, Ship-to Address 2
    17, Ship-to City,city
    91, Ship-to Post Code
    92, Ship-to County
    93, Ship-to Country/Region Code
    company
    address_1
    address_2
    postcode
    state
    country
     

    37, Sales Line

     

     

    line_items 4, Line No.
    5, Type
    6, No.
    15, Quantity
    line_no_
    type
    sku
    quantity
    Line No is set to 10000 increment value.
    Type is 2.
    No. field and quantity fields are validated.
    The (unit) price field is added here if the price should be obtained from webshop, instead of BC.
    37, Sales Line fee_lines 4, Line No.
    5, Type
    6, No.
    22, Unit Price
    15, Quantity
    11, Description
    line_no_
    type
    no_
    total
    quantity
    name
     

    37, Sales Line

     

    shipping_lines 4, Line No.
    5, Type
    6, No.
    15, Quantity
    22, Unit Price
    11, Description

    line_no_
    type
    no_
    quantity
    total
    method_title

     

    44, Sales Comment Line,meta_data

    meta_data 6, Comment custom_notes  
  • Document No.: WOO-088 | Set status from web order in WooCommerce
    Web Service: orders/%1| Direction: Outbound

    Table Element Name Field No. / Name Webshop Field Notes
    110,Sales Shipment Header data   status Default value of Completed.
  • Similar as to the sales order creation, creating a customer card using the connector uses fields obtained in a different message (WOO-006).

    Document No.: WOO-008 | Create BC Customer Card
    Web Service: customers/%1 | Direction: Inbound

    Table Element Name Field No. / Name Webshop Field Notes

    18, Customer

    root/root

    1, No.
    2, Name
    7, City
    102, E-Mail
    11205258, TINX First Name
    11205259, TINX Last Name
    11205250, TINX Publish to Webshop
    11205251, TINX Webshop Customer ID

    no_
    company
    city
    email
    first_name
    last_name
    tinx_publish_to_webshop
    id
    Default value of the No. field is the Number Series assigned in the Tinx E-Commerce Setup page. The publish to webshop value has default value 1.
    18, Customer meta_data 1, No.
    86, VAT Registration No.
    example
    vat_number
     
    18, Customer

    billing 2,Name
    5,Address
    6,Address 2
    7,City,city
    9,Phone No.
    91,Post Code
    92,County
    35,Country/Region Code
    company
    address_1
    address_2
    phone
    postcode
    state
    country
     
    222, Ship-to Address shipping 3, Name
    4, Name 2
    5, Address
    6, Address 2
    7, City,city
    91, Post Code
    35, Country/Region Code
    2, Code
    first_name
    last_name
    address_1
    address_2
    postcode
    country
    code
    The code field is of type Increment, with value 1.

 

Retrieve Existing Lines

There are times where data needs to be filtered before it is used to create a new record in a table. This feature is often used in the order import. What are the principles of this mechanism?

  1. Check the field 'Retrieve Existing Lines' on the line level, fill the field 'Copy Into Table' and select the correct Table No. into which the data should be copied.
  2. Next , links should be added on two levels between the parent & child table.
    The first is the Copy Links section. This is the link between the parent table and the source table where the data resides. The second is the general Links section. Here we assign the link between the target table and the parent table.

In the case of orders, often the Copy Links are Entity ID matched with Tinx Webshop Entity ID and the Links are Document Type = Document Type and Document No.= No.

 

Inbound Message Meta Data

Should you want to import values from a generic section like meta_data or custom_attributes, you can use the following set-up to do so. Depending on whether the file is formatted in XML or JSON, you need to use '/'  or a '.' for the value.