Create Payment Automation Script
Hi there, I am trying to automate some routine tasks.
I have integration with Shopify, all paid orders from Shopify automatically create Invoices in Zoho Books.
I want to automate this process for Invoices that created from Shopify.
To do so I have created automation script which will be performed via Workflow Rules.
Here the script:
- organizationID = organization.get("organization_id");
- customerID = invoice.get("contact_id");
- invoiceID = invoice.get("invoice_id");
- invoiceTotal = invoice.get("total");
- invoiceDate = invoice.get("date").toDate();
- zoho.books.createRecord("Customerpayments",organizationID,{"customer_id":customerID,"payment_mode":"cash","amount":invoiceTotal,"date":invoiceDate,"invoices":{{"invoice_id":invoiceID,"amount_applied":invoiceTotal}}});
For some reason it not working, could somebody help with this script.
Thanks