Skip to content

Dynamics 365 Business Central Vendor XML

The XML format documented here is used for both the import and export of vendor records in Dynamics 365 Business Central.

We recommend that the ExternalId field be populated with the unique ID of the vendors from the external system, Zynk uses this field to track vendors already imported to prevent duplicates being created in Dynamics 365 Business Central.

Tasks

XML

Any fields not documented below are not supported with our imports / exports. Examples of where in the XML the fields should appear are shown in the samples below.

Sample Vendor File:

<?xml version="1.0" encoding="utf-8"?>
<Vendors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Vendor>
    <Id>4d4971d5-39bc-ed11-9a88-002248002e07</Id>
    <ExternalId>8888</ExternalId>
    <ODataETag>W/"JzIwOzE0MzYxMzU5NjI4NDE2NzE4NDc1MTswMDsn"</ODataETag>
    <Number>V00010</Number>
    <DisplayName>Zynk Software</DisplayName>
    <AddressLine1>6 Charlotte Square</AddressLine1>
    <AddressLine2 />
    <City>Newcastle Upon Type</City>
    <State>Tyne &amp; Wear</State>
    <Country>GB</Country>
    <PostalCode>NE1 4XF</PostalCode>
    <PhoneNumber />
    <Email>[email protected]</Email>
    <Website>www.zynk.com</Website>
    <TaxRegistrationNumber>GB123456789</TaxRegistrationNumber>
    <CurrencyId>00000000-0000-0000-0000-000000000000</CurrencyId>
    <CurrencyCode>GBP</CurrencyCode>
    <Irs1099Code />
    <PaymentTermsId>0298d7da-549e-ed11-988a-000d3a3885d3</PaymentTermsId>
    <PaymentMethodId>c58d3bdf-549e-ed11-988a-000d3a3885d3</PaymentMethodId>
    <TaxLiable>true</TaxLiable>
    <Blocked> </Blocked>
    <Balance>0</Balance>
    <LastModifiedDateTime>2023-03-06T16:19:37.077Z</LastModifiedDateTime>
    <PaymentTerm>
      <Id>0298d7da-549e-ed11-988a-000d3a3885d3</Id>
      <ODataETag>W/"JzIwOzExMTEyODA2NDAzMTE5NjkyMTA3MTswMDsn"</ODataETag>
      <Code>CM</Code>
      <DisplayName>Current Month</DisplayName>
      <DueDateCalculation>CM</DueDateCalculation>
      <DiscountDateCalculation />
      <DiscountPercent>0</DiscountPercent>
      <CalculateDiscountOnCreditMemos>false</CalculateDiscountOnCreditMemos>
      <LastModifiedDateTime>2023-01-27T15:11:51.347Z</LastModifiedDateTime>
    </PaymentTerm>
    <PaymentMethod>
      <Id>c58d3bdf-549e-ed11-988a-000d3a3885d3</Id>
      <ODataETag>W/"JzIwOzE0NTM2OTMxODM4MjMzMzgyMjk5MTswMDsn"</ODataETag>
      <Code>BANK</Code>
      <DisplayName>Bank Transfer</DisplayName>
      <LastModifiedDateTime>2023-01-27T15:18:51.923Z</LastModifiedDateTime>
    </PaymentMethod>
    <Picture>
      <Id>4d4971d5-39bc-ed11-9a88-002248002e07</Id>
      <ODataETag>W/"JzE5OzQ2Nzk3NzQ5OTQ3NDIwNDM2MTkxOzAwOyc="</ODataETag>
      <ParentType>Vendor</ParentType>
      <Width>0</Width>
      <Height>0</Height>
      <ContentType />
      <PictureContentEditLink>https://api.businesscentral.dynamics.com/v2.0/PRODUCTION/api/v2.0/companies(bba482b8-549e-ed11-988a-000d3a3885d3)/vendors(4d4971d5-39bc-ed11-9a88-002248002e07)/picture/pictureContent</PictureContentEditLink>
      <PictureContentReadLink>https://api.businesscentral.dynamics.com/v2.0/PRODUCTION/api/v2.0/companies(bba482b8-549e-ed11-988a-000d3a3885d3)/vendors(4d4971d5-39bc-ed11-9a88-002248002e07)/picture/pictureContent</PictureContentReadLink>
      <PictureContent><!-- base 64 encoded content here --></PictureContent>
    </Picture>
    <DefaultDimensions />
  </Vendor>
</Vendors>

In each of the following sections most of the XML has been omitted to make the samples easier to read. The whole structure of the Vendors schema is used below as a reference of where fields should be in the object model.

General

The following information can be found within the 'General' section.

Dynamics Field XML Field  Type  Input  Notes
- Id Guid Optional Used for matching existing vendors
- ExternalId string Optional Stored in Zynk's internal DB and used for matching existing vendors
No. Number string Optional Used for matching existing vendors. The next number will be used when creating a new vendor if not specified
Name DisplayName string Required
Blocked Blocked string Optional Can be: 'Payment', 'All', ' '
LastDateModified LastModifiedDateTime DateTime Read-only
Balance Balance decimal Read-only
<?xml version="1.0" encoding="utf-8"?>
<Vendors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Vendor>
    <Id>4d4971d5-39bc-ed11-9a88-002248002e07</Id>
    <ExternalId>8888</ExternalId>
    <Number>V00010</Number>
    <DisplayName>Zynk Software</DisplayName>
    <Blocked> </Blocked>
    <LastModifiedDateTime>2023-03-06T16:19:37.077Z</LastModifiedDateTime>
    <Balance>0</Balance>
  </Vendor>
</Vendors>

Address & Contact

The following information can be found within the 'Address & Contact' section.

Dynamics Field XML Field  Type  Input  Notes
Address AddressLine1 string Optional
Address AddressLine2 string Optional
City City string Optional
County State string Optional
Country/Region Code Country string Optional Use the 2 letter ISO code
Postcode PostalCode string Optional
Phone No. PhoneNumber string Optional
Email Email string Optional
Home Page Website string Optional
<?xml version="1.0" encoding="utf-8"?>
<Vendors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Vendor>
    <AddressLine1>6 Charlotte Square</AddressLine1>
    <AddressLine2 />
    <City>Newcastle Upon Type</City>
    <State>Tyne &amp; Wear</State>
    <Country>GB</Country>
    <PostalCode>NE1 4XF</PostalCode>
    <PhoneNumber />
    <Email>[email protected]</Email>
    <Website>www.zynk.com</Website>
  </Vendor>
</Vendors>

Invoicing

The following information can be found within the 'Invoicing' section.

Dynamics Field XML Field  Type  Input  Notes
VAT Registration No. TaxRegistrationNumber string Optional
Currency Code CurrencyId Guid Optional
Currency Code CurrencyCode string Optional Performs a lookup for the currency ID based on the 3 letter ISO code
<?xml version="1.0" encoding="utf-8"?>
<Vendors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Vendor>
    <TaxRegistrationNumber>GB123456789</TaxRegistrationNumber>
    <CurrencyId>00000000-0000-0000-0000-000000000000</CurrencyId>
    <CurrencyCode>GBP</CurrencyCode>
  </Vendor>
</Vendors>

Payments

The following information can be found within the 'Payments' section.

Dynamics Field XML Field  Type  Input  Notes
Payment Terms Code PaymentTermsId Guid Optional
Payment Terms Code PaymentTerm/Code string Optional Performs a lookup for the payment terms ID based on the code
Payment Method Code PaymentMethodId Guid Optional
Payment Method Code PaymentMethod/Code string Optional Performs a lookup for the payment method ID based on the code
<?xml version="1.0" encoding="utf-8"?>
<Vendors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Vendor>
    <PaymentTermsId>aab1e6b3-611d-ea11-bb2d-000d3a4884fc</PaymentTermsId>
    <PaymentTerm>
      <Code>CM</Code>
    </PaymentTerm>
    <PaymentMethodId>a314deb9-611d-ea11-bb2d-000d3a4884fc</PaymentMethodId>
    <PaymentMethod>
      <Code>BANK</Code>
    </PaymentMethod>
  </Vendor>
</Vendors>

Miscellaneous

The following information is not visible within Dynamics 365 Business Central.

Dynamics Field XML Field  Type  Input  Notes
- ODataETag string Optional Specify the last value to prevent updates if the record has since been modified
- Irs1099Code string Optional
- TaxLiable bool Optional
<?xml version="1.0" encoding="utf-8"?>
<Vendors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Vendor>
    <ODataETag>W/"JzQ0O3BQVHJ3V29pb0w4c1ZaSVZIRG1yT2dLR0w3TzZNazU4R0VKeWZXN01nTGs9MTswMDsn"</ODataETag>
    <Irs1099Code>123-45-6789</Irs1099Code>
    <TaxLiable>true</TaxLiable>
  </Vendor>
</Vendors>