Auto Apply Retainer via Zoho Books

Zoho Books Auto Apply Retainer

For this custom function to work, you will need the following:

  1. A connection to the Zoho Books API named “zoho_books”.
  2. At least one Retainer Invoice.
  3. An Invoice to apply it to.

Zoho Books Connection

Create API Credentials: Gives you a Client ID and Client Secret to use in the next step.

  1. Go to the Zoho API Console
  2. Click Add Client and select Server-based Applications
  3. Fill in the following fields:
    • Client Name -> Zoho Books API
    • Homepage URL ->
    • Authorized Redirect URIs ->
  4. Click Update
  5. Notice the Client ID and Client Secret here. You will need these in the next step, so keep this tab open.

Want to learn even more?
Sign up for one of our Zoho courses!

Create Custom Connection

  1. Go to Zoho Books
  2. Click Settings, select the Automation tab, then choose Custom Functions.
  3. Select + New Custom Function and give it a random name and module. We will only use this function for a simple test.
  4. Choose Connections on the right hand side, then Go To Connections.
  5. Click Add Connection. Choose Custom Service.
  6. Fill in the following fields (This has to be very exact):
    • Service Name -> Zoho Books
    • Service LinkName -> zoho_books
    • Authentication Type -> oAuth2
    • Param Type -> Header
    • Grant Type -> Authorization Code
    • Client ID -> [YOUR_CLIENT_ID]
    • Client Secret -> [YOUR_CLIENT_SECRET]
    • Authorize URL ->
    • Access Token URL ->
    • Refresh Token URL ->
    • Connection Name -> Zoho Books
    • Connection LinkName -> zoho_books
    • Scope -> ZohoBooks.fullaccess.all (Note: Be sure to click the ‘+’ for the scope)
    • Use credentials of login user -> UNCHECKED
  7. Click Create and Connect. If asked to authenticate, enter your login details.

Click here to copy these scripts. For more Zoho-wizardry, check out our GitHub page.

Want to learn how to create Invoice and collect payment from Zoho Creator?

Or learn how complex assignment rules config Via Zoho CRM modules works?

Want this functionality, but don't want to do it yourself?

Click here to speak to us!

Need help with your Zoho system?

Hire a full time Zoho System Admin from our poolof highly qualified program graduates!

Related Resources