New Aggregate formula fields not calculating when a Sales Order is created via API

New Aggregate formula fields not calculating when a Sales Order is created via API

I have connected WooCommerce to Zoho via a plugin which uses Zoho API to sync Orders in WooCommerce to create/update a Sales Order in Zoho.

The problem with the default layout of a Sales Orders, is that you can modify the Discount and Tax in the sub-total after the Sub Total. This is completely wrong, because Discount and Tax are calculated per the line-item. The Sub-total for the Discount and Tax is a SUM of each line-item field. Being able to edit Discount and TAX can incorrectly SUM up the Grand Total, and provide false costing to the client if a PDF Sales Order is sent out from Zoho.

To solve this, I have made 2 new aggregate formulas, which SUM up the line-item Discount and TAX, these 2 fields are: Total Discount & Total VAT. This means the Grand Total is now ((Quantity*Item Price)-Discount)+TAX.

However, when a Sales Order is created in Zoho from an order in WooCommerce via API, the Total Discount & Total VAT fails to calculate any value. So it means the user must go into the Sales Order > Edit > Save, then the aggregate calculation is run.

    Access your files securely from anywhere







                            Zoho Developer Community





                                                  Use cases

                                                  Make the most of Zoho Desk with the use cases.

                                                   
                                                    

                                                  eBooks

                                                  Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho Desk.

                                                   
                                                    

                                                  Videos

                                                  Watch comprehensive videos on features and other important topics that will help you master Zoho Desk.

                                                   
                                                    

                                                  Webinar

                                                  Sign up for our webinars and learn the Zoho Desk basics, from customization to automation and more

                                                   
                                                    
                                                  • Desk Community Learning Series


                                                  • Meetups


                                                  • Ask the Experts


                                                  • Kbase


                                                  • Resources


                                                  • Glossary


                                                  • Desk Marketplace


                                                  • MVP Corner






                                                            Manage your brands on social media



                                                                  Zoho TeamInbox Resources



                                                                      Zoho CRM Plus Resources

                                                                        Zoho Books Resources


                                                                          Zoho Subscriptions Resources

                                                                            Zoho Projects Resources


                                                                              Zoho Sprints Resources


                                                                                Qntrl Resources


                                                                                  Zoho Creator Resources



                                                                                      Zoho CRM Resources

                                                                                      • CRM Community Learning Series

                                                                                        CRM Community Learning Series


                                                                                      • Kaizen

                                                                                        Kaizen

                                                                                      • Functions

                                                                                        Functions

                                                                                      • Meetups

                                                                                        Meetups

                                                                                      • Kbase

                                                                                        Kbase

                                                                                      • Resources

                                                                                        Resources

                                                                                      • Digest

                                                                                        Digest

                                                                                      • CRM Marketplace

                                                                                        CRM Marketplace

                                                                                      • MVP Corner

                                                                                        MVP Corner







                                                                                          Design. Discuss. Deliver.

                                                                                          Create visually engaging stories with Zoho Show.

                                                                                          Get Started Now


                                                                                            Zoho Show Resources


                                                                                              Zoho Writer Writer

                                                                                              Get Started. Write Away!

                                                                                              Writer is a powerful online word processor, designed for collaborative work.

                                                                                                Zoho CRM コンテンツ








                                                                                                  Nederlandse Hulpbronnen


                                                                                                      ご検討中の方