Choco Customer Order Guide XML
Tasks
This XML format represents the products to link to individual customer's order guides in Choco.
Tasks
Minimal XML Sample
The XML below represents the minimum information that needs to be provided to import customer order guides in Choco.
<?xml version="1.0"?>
<CustomerOrderGuides>
<CustomerOrderGuide>
<CustomerNumber>ZYNK0001</CustomerNumber>
<Products>
<Product>
<ExternalId>PE23</ExternalId>
<CategoryName>Stuff</CategoryName>
</Product>
</Products>
</CustomerOrderGuide>
</CustomerOrderGuides>
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 CustomerOrderGuides schema is used below as a reference of where fields should be in the object model.
CustomerOrderGuide
The CustomerOrderGuide
element represents a combination of a customer and the products to link to their order guide. This element appears within the root CustomerOrderGuides
collection of XML document.
XML Field | Example | Field Type | Input | Description |
---|---|---|---|---|
ZynkExternalId | 123456 | string | Optional | Used in conjunction with the Prevent Reprocessing setting. Max 255 chars |
CustomerId | 58482754-b9b9-46a8-b4eb-4a33a415cf61 | guid | Dependant | Either CustomerId or CustomerNumber must be provided. |
CustomerNumber | ZYNK0001 | string | Dependant | Either CustomerId or CustomerNumber must be provided. |
Products | See below | Collection | Required | The collection of Products to link to the order guide. |
<?xml version="1.0"?>
<CustomerOrderGuides>
<CustomerOrderGuide>
<ZynkExternalId>123456</ZynkExternalId>
<CustomerId>58482754-b9b9-46a8-b4eb-4a33a415cf61</CustomerId>
<CustomerNumber>ZYNK0001</CustomerNumber>
<Products>
<!-- See below for example -->
</Products>
</CustomerOrderGuide>
</CustomerOrderGuides>
Product
The Product
element represents a product to link to the customer's order guide. This element appears within the Products
collection of the CustomerOrderGuide element.
XML Field | Example | Field Type | Input | Description |
---|---|---|---|---|
ProductId | 4be1163f-28c1-4572-a99c-172caa12b4a4 | guid | Dependant* | Choco's internal identifier for the product |
ExternalId | PE23 | string | Dependant* | The ID of the product |
Unit | Each | string | Optional | The unit the product is sold in. Only used when ProductId is not specified. |
CategoryName | Stuff | string | Optional | If the product doesn't exist in the order guide, it will be added with this category name. If the product already exists, the category won't be updated. |
*You must provide either a ProductId
or ExternalId
to identify which product to link to the order guide. If both are provided, ProductId
will take precedence over ExternalId
. If you are using ExternalId
, we would recommend also specifying the Unit
wherever possible as this will speed up the import. If Unit
is not specified, it will be looked up against the product records.
<?xml version="1.0"?>
<CustomerOrderGuides>
<CustomerOrderGuide>
<Products>
<Product>
<ProductId>4be1163f-28c1-4572-a99c-172caa12b4a4</ProductId>
<ExternalId>PE23</ExternalId>
<Unit>Each</Unit>
<CategoryName>Stuff</CategoryName>
</Product>
</Products>
</CustomerOrderGuide>
</CustomerOrderGuides>
Complete XML Sample
This sample shows all data that can be provided via our customer order guide XML format.
<?xml version="1.0"?>
<CustomerOrderGuides>
<CustomerOrderGuide>
<ZynkExternalId>123456</ZynkExternalId>
<CustomerId>58482754-b9b9-46a8-b4eb-4a33a415cf61</CustomerId>
<CustomerNumber>ZYNK0001</CustomerNumber>
<Products>
<Product>
<ProductId>4be1163f-28c1-4572-a99c-172caa12b4a4</ProductId>
<ExternalId>PE23</ExternalId>
<Unit>Each</Unit>
<CategoryName>Stuff</CategoryName>
</Product>
<Product>
<ProductId>c1c327f2-2819-482a-a6b2-8c9b80c5dd38</ProductId>
<ExternalId>008</ExternalId>
<Unit>Pack</Unit>
<CategoryName>Stuff</CategoryName>
</Product>
<Product>
<ProductId>b39a9d18-ef9f-4242-ab35-de2cc1dced39</ProductId>
<ExternalId>HSYE</ExternalId>
<Unit>Pack</Unit>
<CategoryName>Stuff</CategoryName>
</Product>
</Products>
</CustomerOrderGuide>
<CustomerOrderGuide>
<ZynkExternalId>234567</ZynkExternalId>
<CustomerId>9f7c506b-727f-4694-acdd-26cabdfa74f7</CustomerId>
<CustomerNumber>ABCD0001</CustomerNumber>
<Products>
<Product>
<ProductId>4be1163f-28c1-4572-a99c-172caa12b4a4</ProductId>
<ExternalId>PE23</ExternalId>
<Unit>Each</Unit>
<CategoryName>Stuff</CategoryName>
</Product>
<Product>
<ProductId>c1c327f2-2819-482a-a6b2-8c9b80c5dd38</ProductId>
<ExternalId>008</ExternalId>
<Unit>Pack</Unit>
<CategoryName>Stuff</CategoryName>
</Product>
<Product>
<ProductId>b39a9d18-ef9f-4242-ab35-de2cc1dced39</ProductId>
<ExternalId>HSYE</ExternalId>
<Unit>Pack</Unit>
<CategoryName>Stuff</CategoryName>
</Product>
</Products>
</CustomerOrderGuide>
</CustomerOrderGuides>