9 Replies Latest reply on Dec 13, 2016 2:02 PM by databuzz

    Woocommerce invoices into FM question

    ameliorator

      WARNING: I didn't even know FM existed a month ago.

       

      I'm building my first FM solution and trying to reverse engineer solutions to put their abilities in my solution. Currently, I'm working on an order system that will take orders as they come in from Woocommerce (I'm planning on having someone connect FM with WooCommerce via API). I hit a road block because I think my application is different than the solution I found in the Lynda.com example pack.

       

      ***Let me preface this by saying I'm assuming I'll be able to have the order invoices fed into FM from WooCommerce. If it doesn't work like that, I think I'll need another work around.***

       

      In the solution from the example pack that I'm trying to learn from, the products in the Product table have a price assigned to them. In my business, the same item/sku/product will have different pricing based on the member, so I can't assign a static price to the item in the FM Product table.

       

      I'm assuming I'll have to have the data from Woo feed into the Order/Invoice table. I can visualize that kind of feed working easily with fields like name, address, dates... but when the orders coming in vary in items, quantity, AND price, I don't know what that'd look like or how to do it. I've attached my work in progress.

        • 1. Re: Woocommerce invoices into FM question
          mikebeargie

          This *shouldn't* be a problem since all of your pricing is being done on the Woo side of things and you're only pulling orders after they are generated into filemaker.

           

          However, if you needed an exact mirror between filemaker and your web side (EG, to generate quotes/estimates or see a member's price of a product), then you'll need to add the members table as well to filemaker for that purpose.

           

          When you get to the actual integration, there's two ways to do it. You can use the Woo API and Custom Web Publishing from FileMaker to write records from your website directly into FileMaker. OR, you can use FileMaker's ESS feature to connect directly to the MySQL tables storing the Woo data and pull it into filemaker via some scripts.

          1 of 1 people found this helpful
          • 2. Re: Woocommerce invoices into FM question
            mikebeargie

            Also, I didn't look at it, but if that OrderSquirrel file came from lynda.com you shouldn't share it as those solutions are paywalled. If it's your own custom code, you also shouldn't share it. This is a public forum so it's dangerous to openly post your files without "anonymizing" what you need into a demo file.

            1 of 1 people found this helpful
            • 3. Re: Woocommerce invoices into FM question
              ameliorator

              Very helpful tip. Yea, it's the project I created. Thank you

              • 4. Re: Woocommerce invoices into FM question
                bigtom

                Just to follow up on what mikebeargie has said. The other thing you can do is use FM to directly access data in WC with ESS and only bring in temporary data to a FM table as needed. Using FM as a UI for the WC data. I have done this in a few instances when it made sense.

                 

                The WC 2.6 API is nice and you can pull data in with a simple cURL and a FM plugin like Base Elements. If you are only pulling in data you might not need a full API integration. If you are sending data back to WC, the API is likely better, but depending on what you are doing a simple script and a layout with the WC table on it will work.

                 

                If you use ESS the connection speed between your FMS and your MySQL web server matters. You also usually end up with a filtered portal.

                 

                As another piece of advice is I tend to avoid using the SKU as an identifier. The SKU is in the postmeta table and it can be a brutal wait as FM sorts through all the postmeta records. I try to find a way to manage using the postID or I add a column to the wp_posts table called UUID and connect the FM records to the WC records this way. I used to use the GUID column but recently WP has been prepending the entries as URLs in that field.

                2 of 2 people found this helpful
                • 5. Re: Woocommerce invoices into FM question
                  CICT

                  Just to add to the good advice you've already received above. We're in the early days of a Woocommerce project and the web developer has requested that we use ESS rather an the API.

                   

                  Their reasoning is that with various extensions within the Woocommerce system, not all data is available within the standard API, which would result in them having to write a significant amount of code.

                   

                  I can't vouch for this information, but thought it worth passing on.

                   

                  Kind regards

                   

                  Andy

                  1 of 1 people found this helpful
                  • 6. Re: Woocommerce invoices into FM question
                    bigtom

                    You want to leverage the benefits of ESS and the API. One example is using ESS to change an order status from processing to completed. If you do this via ESS you can succeed in updating the order but you will not get all of the other actions such as sending the automated order emails to the customer. When you use the API these things happen.

                     

                    The way Woo handles sale prices and sale dates is another one of these situations.

                     

                    Another example is setting stock status as qty moves to and from 0. Can be tracked in Fm but why not let Woo do it?

                     

                    Low stock reorder reminder emails is another.

                    3 of 3 people found this helpful
                    • 7. Re: Woocommerce invoices into FM question
                      CICT

                      Thanks, useful info.

                       

                      Andy

                      • 8. Re: Woocommerce invoices into FM question
                        ameliorator

                        Thanks, Tom. Great advice. 80% is over my head, but I guess that gives me some stuff to focus on learning, haha.

                        • 9. Re: Woocommerce invoices into FM question
                          databuzz

                          FYI we just released a new product today that helps you integrate FileMaker with WooCommerce - fmEcommerce Link (WooCommerce Edition):

                           

                          http://www.databuzz.com.au/fmecommerce-link-woocommerce-edition/

                           

                          It has examples for downloading WooCommerce Orders into FileMaker via the WooCommerce API amongst others.