Contract creation for Accounts and Vendors in CRM integration

Contract creation for Accounts and Vendors in CRM integration

One of the most sought feature requests in our Zoho CRM integration is the ability to request contracts for other modules such as Accounts and Vendors. Even though we have considered it on our priority list, we felt it would be helpful for our valuable customers to give a provisional solution through our APIs and the customization capabilities in Zoho CRM, such as custom buttons and custom functions.

Creating a connection:

1) Go to Zoho CRM's Settings > Developer Space > Connections.
2) Select Default Services from the left panel.
3) Click Zoho OAuth service from the list, then click Create Connection.
4) Enter the connection details and choose these scopes: contracts.contracts.ALL, contracts.meta.CREATE, contracts.meta.READ, and contracts.meta.UPDATE.
5) Click Create and Connect.

The connection will be created and listed under the My Connections list.

Adding a custom button and associating a function:

To create a contract for an account record, follow the below steps:

1) Go to Zoho CRM's Settings > Customization > Modules and Fields, then click Accounts.

2) Click your layout in the Layouts tab.

3) Add a Single Line custom field named "Contracts Counterparty ID".

4) Click Set Permission from the 3 dots menu and set the permission of the field as Read Only for all the profiles, then click Save and Close.

5) Select the Links and Buttons tab and click New Button to create a new custom button.

6) In the Create Your Button form, 
  • Enter the name of the button (say, Create Contract).
  • Choose where you want to place the button (say, View Page).
  • Choose Writing Function (under Functions group) as the action you want to perform.
  • In the Create New Function popup that's displayed, enter the function name without any spaces between the words (say, ContractForAccount) and display name (say, Contract For Account), then click Save.
7) In the Deluge editor window that opens up,
  • Click Edit Arguments seen at the top of the editor.
  • Under the Argument Mapping section, enter AccountId in the Key field.
  • Type # in the Param Value field to choose a value.
  • Select Accounts module followed by its Account ID field from the popup displayed, then click Save.
  • Download the attached file "Contract Creation Snippet for Accounts.txt", then copy and paste the code into the editor.
  • Replace all the occurrences of "zcontractsconn" in the code with the connection name you've created in the previous section.
  • If your account belongs to a DC other than the US, then replace all the occurrences of .com with your DC's extension (e.g., .in for India DC).
  • Save and close the editor.
8) Click Save to save the button.

9) Go to an account record and click Create Contract.

Your contract for the account will be created that you can access from within

Repeat the above steps for the Vendor module. Here, instead of AccountId, use the argument name as VendorId and download the attached file "Contract Creation Snippet for Vendors.txt" and copy and paste the code into the editor. For vendor records, the counterparty primary contact is created with the same Vendor as the contact.

  • Each account for which a contract is created will be added as a counterparty record in Zoho Contracts. But it won't be duplicated if you create another contract for the same account.
  • The contract details (such as counterparty type, contract type, term details, renewal details, etc.) have the default values configured within the snippet. You should change them as per your preference within the code.
  • If you would like to get these data through an intermediate form, then you can associate a widget to the button. And, upon submission of the widget, you can call the function.
  • Here, you can even ask the user to choose a contact from a dropdown field whose values can be populated from the Contacts related list. In the given snippet for Accounts module, the contract is created without the counterparty primary contact.
  • To list the contracts created for each account, you can create a custom module and then save the contract name of the each contract created into it and set it as a hyperlink.

Please give it a try. If you have any questions or clarifications related to the functionality and above mentioned configurations, please write to us at

For any assistance related to Deluge scripting and CRM functions, please get the assistance from our Zoho CRM Developer community.

Zoho Contracts Team

Edit Note: Replaced the first section by removing registering Zoho Contracts application steps and updated the related points because Zoho Contracts' related connections are now available under the default service Zoho OAuth service.

                            Zoho Desk Resources

                            • Desk Community Learning Series

                            • Digest

                            • Functions

                            • Meetups

                            • Kbase

                            • Resources

                            • Glossary

                            • Desk Marketplace

                            • MVP Corner

                            • Word of the Day

                                Zoho Marketing Automation
                                        • Sticky Posts

                                        • Adding signature fields in your contract template

                                          When you send a contract document for the signing process, you have to insert the signature fields into your contract document by dragging and dropping them for each signer. It won't be effort-intensive for contracts that have fewer pages or signers.
                                        • Contract creation for Accounts and Vendors in CRM integration

                                          One of the most sought feature requests in our Zoho CRM integration is the ability to request contracts for other modules such as Accounts and Vendors. Even though we have considered it on our priority list, we felt it would be helpful for our valuable
                                        • Mapping Billing Country Field to Your Contract Template Field

                                          In Zoho CRM, while configuring Counterparty Fields Mapping to map counterparty information in your contract type, the field 'Billing Country' doesn't have the support to be mapped due to field type mismatch. Because the Billing Country field in Zoho CRM
                                        • Bulk Import Counterparty Data

                                          Currently, as the feature to bulk import counterparty data is not available, here is a solution using our APIs that would be useful for our customers. For example, Zoho CRM customers can import their Accounts as counterparties in Zoho Contracts. Using

                                        Manage your brands on social media

                                                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

                                                                      • CRM Community Learning Series

                                                                        CRM Community Learning Series

                                                                      • Tips


                                                                      • Functions


                                                                      • Meetups


                                                                      • Kbase


                                                                      • Resources


                                                                      • Digest


                                                                      • CRM Marketplace

                                                                        CRM Marketplace

                                                                      • MVP Corner

                                                                        MVP Corner



                                                                          Design. Discuss. Deliver.

                                                                          Create visually engaging stories with Zoho Show.

                                                                          Get Started Now