Function #26: Automatically update deal stage in Zoho CRM when invoice is paid in Zoho Books
Hello everyone! It's Friday, and you know what that means – it's time for a Custom Function! Let's jump right in.
The
Deals section in Zoho CRM, is a valuable tool for tracking the different stages of a business opportunity, starting from its initial qualification to the point where it is finalized and successfully closed. Typically, a deal is considered closed when payment is received, indicating a successful business transaction.
With the
Zoho Books-Zoho CRM integration in place, you can link deals to invoices. These invoices can be raised from both within Zoho Books and the Zoho Finance module in Zoho CRM. When you receive online payments or record manual payments for these invoices, you need not have to go through the manual process of changing the deal's stage to "Closed Won". Today's custom function takes care of this for you by automatically updating the deal's stage to "Closed Won" in Zoho CRM when invoices are paid.
Prerequisites:
1. Create a
Connection named "crm_connection" to successfully execute the function. You can watch the GIF attached below to know how to create the connection.
2. Create a Connection named "zbooks" to successfully execute the function. You can watch the GIF attached below to know how to create the connection.
Custom Function:
Navigate to Settings -> Automation -> Custom Functions -> +New Custom Function > Add the function code from this
GitHub link.
Workflow Rule:
Go to Settings -> Automation -> Workflow Rules -> +New Workflow Rule and set up the workflow rule as shown below:-
![](https://desk.zoho.com:443/support/ImageDisplay?downloadType=uploadedFile&fileName=1698415713417.png&blockId=edbsn43e3ede6795993d6a17c02f229ddac251399e92e88dd1bf34dfaae4f0322a110&zgId=edbsn7709df772cce2825696f51e4f4f5fe02&mode=view)
In the final step of this workflow rule, associate the custom function you created and then hit Save.
Note: To update the deal's stage to something other than "Closed Won," just replace the stage name in code line 26 with the preferred stage.
Give it a try and share your feedback with us! If you have any questions, don't hesitate to reach out to our support team at support[at]zohobooks[dot]com.
See you all next week with another interesting custom function!
Regards,
Shireen Farhana S
Zoho Cares
Zoho Developer Community
Deliver unforgettable customer experiences
Deliver unforgettable customer experiences
New to Zoho Marketing Plus?
Everything you need to run your marketing
New to Zoho Marketing Plus?
Everything you need to run your marketing
Zoho Desk Resources
-
Desk Community Learning Series
-
-
-
-
-
-
-
-
-
Sticky Posts
Latest Updates of the 53rd GST Council Meeting & Its Business Implications
Join industry expert CA Venugopal Gella as he discusses the importance of 53rd GST Council Meeting, the latest notifications and changes introduced by the Finance Act 2024. Register Now: https://zoho.to/GST_Webinar
Best practices for financial year-end closing with Zoho Books | Free Webinar
Ready to close your year-end finances like a pro? Join our free webinar and learn how Zoho Books helps you maintain clean accounts, carry forward balances, and get geared up for the new financial year. Register now - https://zoho.to/9f1
Zoho Books will discontinue support for older browser versions soon
Hello users, Starting from May 15, 2024, Zoho Books will no longer support the following browser versions: Browsers Version Restrictions Firefox Browser Versions older than 100 Google Chrome Versions older than 100 Microsoft Edge Versions older than 100
Master the art of budgeting with Zoho Books | Free Webinar | 4th & 5th March 2024
We're thrilled to launch the Zoho Books monthly webinar series! Don't wait to conquer your finances in 2024! Budgeting can be easy with Zoho Books. Join our FREE webinar and learn how to set and track goals, master budgeting, and unlock insights to make
Zoho Finance Workshop 2023 is coming to the USA. Meet the experts, get exclusive training on Zoho Finance apps and more.
Hello all, We'd like to invite you to our biggest Zoho Finance workshop in the United States. After a brief break, we are excited to be back. This year, we're bringing together our customers and community members for two days of curated hands-on sessions,
Zoho TeamInbox Resources
Zoho DataPrep Resources
Zoho CRM Plus Resources
Zoho Books Resources
Zoho Subscriptions Resources
Zoho Projects Resources
Zoho Sprints Resources
Qntrl Resources
Zoho Creator Resources
Zoho WorkDrive Resources
Zoho Campaigns Resources
Zoho CRM Resources
Zoho Show Resources
Writer Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.