1 Reply Latest reply on Sep 25, 2014 2:15 AM by nilsw

    Mapping XML feed to FileMaker

    SteveWalsh

      Title

      Mapping XML feed to FileMaker

      Your post

      We want to develop an ERP type database for a small business niche in FileMaker.

      We need to update this database with an XML feed from our eCommerce system. What is the best way to map our XML feed from our shopping cart to the data elements in FileMaker so all the customer info, product and product variations, etc. come over accurately?

      Anyone with experience here?

      Here is a small XML feed sample:

      <Orders>
      <Order>
      <OrderId>1637</OrderId>
      <OrderDate>2013-05-01 10:09:24</OrderDate>
      <OrderStatus>on-hold</OrderStatus>
      <BillingFirstName>Steve</BillingFirstName>
      <BillingLastName>Jobs</BillingLastName>
      <BillingFullName>Steve Jobs</BillingFullName>
      <BillingCompany>Apple, Inc.</BillingCompany>
      <BillingAddress1>1 Infinite Loop</BillingAddress1>
      <BillingAddress2/>
      <BillingCity>Cupertino</BillingCity>
      <BillingState>CA</BillingState>
      <BillingPostCode>90143</BillingPostCode>
      <BillingCountry>US</BillingCountry>
      <BillingPhone>414-398-1412</BillingPhone>
      <BillingEmail>steve@apple.com</BillingEmail>
      <ShippingFirstName>Steve</ShippingFirstName>
      <ShippingLastName>Jobs</ShippingLastName>
      <ShippingFullName>Steve Jobs</ShippingFullName>
      <ShippingCompany>Apple, Inc.</ShippingCompany>
      <ShippingAddress1>1 Infinite Loop</ShippingAddress1>
      <ShippingAddress2/>
      <ShippingCity>Cupertino</ShippingCity>
      <ShippingState>CA</ShippingState>
      <ShippingPostCode>90143</ShippingPostCode>
      <ShippingCountry>US</ShippingCountry>
      <ShippingMethodId>flat_rate</ShippingMethodId>
      <ShippingMethod>Flat Rate</ShippingMethod>
      <PaymentMethodId>cheque</PaymentMethodId>
      <PaymentMethod>Cheque Payment</PaymentMethod>
      <OrderDiscountTotal>0.00</OrderDiscountTotal>
      <CartDiscountTotal>0.00</CartDiscountTotal>
      <DiscountTotal>0.00</DiscountTotal>
      <ShippingTotal>1.00</ShippingTotal>
      <ShippingTaxTotal>0.00</ShippingTaxTotal>
      <OrderTotal>30.00</OrderTotal>
      <TaxTotal>0.00</TaxTotal>
      <CompletedDate>2013-05-01 10:09:24</CompletedDate>
      <CustomerNote/>
      <CustomerId>0</CustomerId>
      <OrderLineItems>
      <SKU>W007</SKU>
      <Quantity>1</Quantity>
      <Price>29</Price>
      <LineTotal>29</LineTotal>
      <Meta/>
      </OrderLineItems>
      </Order>
      </Orders>

        • 1. Re: Mapping XML feed to FileMaker
          nilsw

          Hi Steve,

          you will have to dig into XSLT stylesheets for XLM import. There are quite a few sources that cover this topic, once you are familiar with the mechanics of XSL it's pretty straightforward. 

          On the FileMaker side there are (at least) two ways of importing data. One is to import all the raw data, in your case on the LineItems basis, into a temporary table an than in a second step iterate through all the records to insert or update your Orders and OrderlineItems tables. If you want to import directly into these you will have to run actually two imports using individual stylesheets for Orders an LineItems.

          Btw., your XML needs an additional OrderLineItem node inside the OrderLineItems array.

          Hope that helps,

          Nils