Updating Woocommerce Variation Products Prices Via Zoho CRM

Updating Woocommerce Variation Products Prices Via Zoho CRM

I can update product prices with this flow:



But I can't update variant products. I got a code from Zoho for this, but I couldn't get it to work. It needs to find the product in the CRM from the SKU field and update the variation with the price there.

  1. void updateVariableProductInWoocommerce(string product_id, string variation_id, string regular_price, string sale_price, string stock_quantity)
  2. {
  3. url = "<Your Base URL>/wp-json/wc/v3/products/" + product_id + "/variations/" + variation_id;
  4. params = Map();
  5. params.put("regular_price",regular_price);
  6. params.put("sale_price",sale_price);
  7. params.put("stock_quantity",stock_quantity);
  8. response = invokeurl
  9. [
  10. url :url
  11. type :PUT
  12. parameters:params.toString()
  13. connection:"<Connection Link Name of Woocommerce>"
  14. content-type:"application/json"
  15. ];
  16. info response;
  17. }

    Zoho Desk Resources

    • Desk Community Learning Series


    • Digest


    • Functions


    • Meetups


    • Kbase


    • Resources


    • Glossary


    • Desk Marketplace


    • MVP Corner


    • Word of the Day


      Zoho CRM Plus Resources

        Zoho Books Resources


          Zoho Subscriptions Resources

            Zoho Projects Resources


              Zoho Sprints Resources


                Zoho Orchestly Resources


                  Zoho Creator Resources


                    Zoho WorkDrive Resources



                      Zoho Campaigns Resources

                        Zoho CRM Resources

                        • CRM Community Learning Series

                          CRM Community Learning Series


                        • Tips

                          Tips

                        • Functions

                          Functions

                        • Meetups

                          Meetups

                        • Kbase

                          Kbase

                        • Resources

                          Resources

                        • Digest

                          Digest

                        • CRM Marketplace

                          CRM Marketplace

                        • MVP Corner

                          MVP Corner




                          Zoho Writer Writer

                          Get Started. Write Away!

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

                            Zoho CRM コンテンツ




                              ご検討中の方