Created
May 2, 2025 17:27
-
-
Save louka1996/dbcee8d921fe6beb2cb762a65515b37e to your computer and use it in GitHub Desktop.
Pushes the invoice subtotal from Zoho Books to the linked Deal in Zoho CRM.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Get the associated CRM Deal ID and the invoice subtotal | |
| invoiceDealId = invoice.get("zcrm_potential_id"); | |
| invoiceSubTotal = invoice.get("sub_total"); | |
| // Prepare the map to update the Deal | |
| subtotal = Map(); | |
| subtotal.put("Amount", invoiceSubTotal); | |
| // Retrieve the Deal details (optional if only updating) | |
| dealDetails = zoho.crm.getRecordById("Deals", invoiceDealId); | |
| // Update the Deal in Zoho CRM with the invoice subtotal | |
| response = zoho.crm.updateRecord("Deals", invoiceDealId, subtotal); | |
| info response; |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
This Zoho Deluge script syncs the
sub_totalvalue from a Zoho Books invoice to a custom field (Amount) in the associated Deal record in Zoho CRM. The script retrieves the Deal using the CRM ID stored on the invoice, then updates the Deal with the subtotal. This ensures consistency between invoice data and CRM records, enabling better reporting and forecasting directly in Zoho CRM.Ideal for automating revenue alignment between Books and CRM modules.