Overview
Conversion tables are essential when your web shop values don't match the corresponding values in Business Central (BC), or when multiple web shop values need to map to the same BC value. This guide will walk you through identifying, creating, and implementing conversion tables for seamless data integration.
When to Use Conversion Tables
You'll need conversion tables in these scenarios:
- Web shop values don't exist in Business Central
- Multiple web shop values should map to a single BC value
- Field mappings are causing validation errors during order creation
Example Scenario
Let's work through a common example: a Belgium-based website where the Country ID from the web shop determines both the General Business Posting Group and VAT Business Posting Group on sales orders in BC.
Business Rules:
- Gen. Bus. Posting Group = "BINNENLAND" for Belgium (BE)
- Gen. Bus. Posting Group = "EU" for all other countries
- VAT Bus. Posting Group = unique code per country
Step 1: Identify Web Shop Values
The most efficient approach is to request a complete list of possible values for dropdown fields (like Country ID) from your web shop partner. To identify the values yourself, however, do the following:
- Navigate to History > Synchronization Ledger Entries
- Select an entry ending in "-87" (indicating a Sales Order creation message in most of our connectors, like M2R-087)
- Click View then Web Response
- Search for the field you need (e.g., "Country")
- Copy the response to a text editor for easier searching
Note: While you can test individual cases, contacting your web shop partner is more time-efficient for comprehensive value mapping.
Step 2: Identify Business Central Values
Determine the correct BC field values that should be populated based on your web shop data.
In our example:
- Country ID "BE" → Gen. Bus. Posting Group "BINNENLAND"
- All other Country IDs → Gen. Bus. Posting Group "EU"
- Each country → Unique VAT Bus. Posting Group code
Step 3: Create Conversion Tables
Since different BC fields require different codes, you'll need separate conversion tables for each field.
- Go to Setup > Template > Conversion Templates
- Create a new template with a descriptive name
- Add rows with the following information:
- BC Value: The target value for the BC field
- Webshop Value: The source value from your web shop payload
- Comment: Optional additional notes
Example Tables
Gen. Bus. Posting Group Conversion:
- BE → BINNENLAND
- @ → EU (@ represents all other values)
VAT Bus. Posting Group Conversion:
- BE → BINNENLAND
- AT → AT20
- DE → DE19
- (Continue for each country as needed)
Step 4: Update Field Mapping
Identify the Correct Message
- Determine which dashboard handles your use case (e.g., IN-ORDERS for sales orders)
- Identify the specific message type (e.g., WOO-087 for final sales order creation)
- Locate the relevant address section (shipping vs. billing) based on your business requirements
Configure the Mapping
- Add the target BC field numbers to the mapping (e.g., fields 74 and 116)
- Set the Webshop Field V2 to the source field name (e.g., "country")
- In the Conversion Method column, select the appropriate conversion table you created
Step 5: Test Your Configuration
- Create a new sales order through your web shop
- Verify that values are converted correctly
- Confirm the sales order is created without errors
When you add new values to either Business Central or your web shop, remember to update your conversion tables accordingly to ensure continued proper handling of all scenarios.
Related to