Deluge and Books with line items
I am trying to code a solution that looks at invoice line item in a workflow and if they contain certain products updates CRM module.
I have been slowly trying to learn deluge but am stuck.
I have managed to grab the invoice data and can pullout various elements as I need them but line items is only ever giving me the first item. Even when I created a loop. Have I missed something or more likely I am going at it the wrong way.
I would love a point in the correct direction please.
- invoiceId = invoice.get("invoice_id");
- organizationId = organization.get("organization_id");
- invoiceRecord = zoho.books.getRecordsByID("invoices",organizationId,invoiceId,"zohobooks").get("invoice");
- customerId = invoiceRecord.get("customer_id");
- dateIn = invoiceRecord.get("date");
- info customerId;
- info dateIn;
- info invoiceRecord;
- lineitem = invoiceRecord.toJSONlist();
- for each product_json in lineitem
- itemmap = lineitem.toMap();
- name = itemmap.get("line_items").getJson("name");
- //name2 = name.get(product_json);
- info name;
- info product_json;
Zoho Pagesense Resources
Zoho SalesIQ Resources
Zoho TeamInbox Resources
Zoho DataPrep Resources
Zoho CRM Plus Resources
Zoho Books Resources
Zoho Subscriptions Resources
Zoho Desk Resources
Zoho Projects Resources
Zoho Sprints Resources
Zoho Creator Resources
Zoho WorkDrive Resources
Zoho Campaigns Resources
Zoho CRM Resources
Zoho Show Resources
Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.