Magento Integration: Sales Order Synchronisation with Configurable Products

Magento supports different product types. Each product type has its own characteristic from the API. It is important to understand them before building the integration.

 

Configurable

 

Magento User can create Simple product from the Configurable product by choosing different options. For example, in our sample store, someone has purchased a medium size T-shirt (The Only Children: Paisley T-Shirt). The Sales Order will look like this:

 

<item xsi:type=”ns1:salesOrderItemEntity”>
<item_id xsi:type=”xsd:string”>14</item_id>

    <product_id xsi:type=”xsd:string”>123</product_id>
    <product_type xsi:type=”xsd:string”>configurable</product_type>
    <sku xsi:type=”xsd:string”>oc_med</sku>
<name xsi:type=”xsd:string”>The Only Children: Paisley T-Shirt</name>

    <price xsi:type=”xsd:string”>120.0000</price>

</item>
<item xsi:type=”ns1:salesOrderItemEntity”>
<item_id xsi:type=”xsd:string”>15</item_id>

    <product_id xsi:type=”xsd:string”>124</product_id>
    <product_type xsi:type=”xsd:string”>simple</product_type>
    <sku xsi:type=”xsd:string”>oc_med</sku>
<name xsi:type=”xsd:string”>The Only Children: Paisley T-Shirt</name>

    <price xsi:type=”xsd:string”>0.0000</price>

</item>

From the extracted data above, we can see that:
  • product_id : Each item will have a unique product_id. One represents the Configurable product and another one represents the simple product.
  • product_type  : Both items will have different product types.
  • price : The price will only appear in the Configurable (parent) item. The simple product will show 0 value.

Get in touch today to see how WDCi can help your business.