Import XML from vendor

Suppliers often send product data in XML format. Vendor Catalog allows you to distinguish between differently structured XML files and import these data into Business Central.

To import products from suppliers you need to follow certain steps:

  1. Creating Mapping for the XML structure
  2. Import the XML file. The import creates all data in Vendor Catalog where you can verify it
  3. Activate Items to get suppliers' products into Items or Catalog Items and manage them in Pimics

Creating Mapping

You need to create a mapping for each XML file structure separately. It means for each supplier you need to create a mapping once and before the import.

Process

  1. Go to Vendor Catalog > Mappings > New (new mapping card will be created).
  2. In the FastTab General define Code, Description and Type: XML.
    1. New FastTab XML Details will appear on the page.
  3. In the action bar select XML > Mapping From XML (you will be prompted to upload the XML file):
    1. In the file explorer find and select the XML file from your vendor.
  4. After the upload is finished, a view of the file structure will be inserted under the FastTab XML Details.

This file structure, however, does not contain all products from your XML file. It represents the structure of a single product (XML root element) and its data (XML child elements).The idea is to create a mapping just for one root element and its children. This mapping will be then applied to all other elements (products) in the XML file.

  1. Go to the FastTab XML Details and select the row that represents the root element (product). Usually it is the second row from the top, and it is named product, item, record or something similar.
    1. In the field Destination Type select Table.
    2. Go to the newly opened subpage Destination Settings:
      1. In Destination Table No. open the lookup and select Vendor Item.
      2. In Destination Record Values you can define additional information for the product, in case they are not included in the XML (e.g. unit of measure).
    3. Leave the settings of child elements empty for now.
  2. In the action bar go to XML > Xml Mapping (more advanced view of the XML structure will open):
    1. On this page, you are able to load the values from your XML file into the mapping structure, and see the examples of actual data that supplier sends you.
    2. In the action bar select Home > Load Example:
      1. From the file explorer select your XML file again.
      2. After the upload is finished, column Example will be populated with possible values for each child element.
  3. At this point you can define mappping for individual child elements:
    1. Select the desired row.
    2. Define the target destination of source values in Destination Type (Source values are basically the example values that you loaded into the mapping structure in the previous steps. These examples should help you identify the correct target destination).
      1. Select option Field if the source value should be placed into a field in the Vendor Item table.
        1. Specify the field in Destination Field No. (At minimum, it is necessary to set up the field No., because this ensures identification of the vendor's item).
      2. Select option Another Related table if the source value should be imported into related tables like Features, Documents, Prices, etc.
        1. Choose the table in Destination Table No. (e.g. Features).
        2. Choose the field in Destination Field No. (e.g. Value).
    3. Repeat the steps above to specify destination field/table for all child elements.

Quick actions

You can speed up the process of mapping creation by utilizing various actions in the navigation menu. You can use these actions to quickly create default mappings for some elements instead of filling out Destination settings individually on each row. However, it is also possible to modify these default mappings.

Available actions

  • Select Home > Copy to create a copy of the current mapping row.
  • Select Mapping > Map New Feature to quickly map current row as a new feature.
  • Select Mapping > Map Existing Feature to quickly map current row to an existing feature:
    1. New window with the list of all features will open.
    2. Select the desired feature from the list and click OK.
  • Select Mapping > Map Text to quickly map current row as a long text:
    1. New window with the list of all Description Classes will open.
    2. Select the Description Class that you want to use for this long text and click OK.

Import XML file

  1. Select Vendor Catalog > Import from XML (XML import wizard will open)

    1. Click on the button with 3 dots.
    2. Upload the XML file by drag & drop or by selecting it from your file explorer.
    3. Proceed through wizard by clicking Next.
  2. Specify the import settings:

    1. Choose the Classification that you want to use for imported data

    At minimum, it is necessary to select the option INTERNAL to ensure that default internal classification is used.

    1. In Reference Type and Reference No. select your Partner / Vendor that is associated with this import.
    2. Specify the Mapping Code for this import - use the mapping that you have created in the previous steps.
    3. Proceed through wizard by clicking Next.
  3. Select the option how do you want to process the file:

    • No - file indexing will start but the import itself will not be executed.
    • Yes - indexing and import will start immediately.
    • On background - indexing and import will be scheduled as a background task.
  4. Click on Finish to start the process of indexing / importing.

  5. When the process is completed, you can find the import in the section Vendor Catalog > Imports.

There can be 3 different states of the import:

  • Indexed - data are not imported in the Vendor Items yet.
  • Imported - all data were successfully imported without any errors.
  • Partially imported - some of the data were not imported due to errors. You can view the error log from the FactBox on the right side.

If your import is in the state Indexed, you can still make additional adjustments on the import card before deciding to import the data. When everything is set, click on the action Import in the action bar.

When you have successfully imported all items in the Vendor Items, you can verify them, select items for Activation and overtake them to your master data.

Title: Import XML from vendor, Author: Pimics Team