Zoho CRM

We're excited to announce that we have partnered up with Zoho CRM to provide a direct integration to Formstack Documents.  With the Formstack Documents plugin, available in the Zoho Marketplace, you can generate documents (invoices, contracts, quotes, etc) with the click of a button right inside Zoho CRM!  You’ll never have to copy & paste data from Zoho into documents again!

For this example, we’re going to show you how you can generate contracts for a Potential that has been closed/won in Zoho CRM.  We’ll also be sending the contract over to DocuSign for signature.  Zoho CRM has released a new plugin that we’ll be using to send data over to Formstack Documents – more on that in a bit.

To get started, we’re going to setup the template for our contract using a Word document.  Inside our contract template, we’ll add our boilerplate contract info and then for the spots that we want our customer and potential data to go, we’re going to use merge fields that looks like {$FirstName}, {$Amount}, etc.

Here’s what our contract template looks like:
 


Since we’ll be collecting a signature for the contract using DocuSign, we need to add a signature tag to the doc so that DocuSign knows where to place the signature.  This signature tag is just like any other text in our document and looks like:   \s1\
 


Once we have our contract template finished, we need to upload it to Formstack Documents.  From the Documents page in Formstack Documents, click the New Document button and enter a name for your document.  On the next step, pick Office Document as the document type and select the file from your computer.
 

mceclip0.png


After we upload our template, we’ll be taken to the Settings tab where we can change various settings like the type of file that we want to generate and the name of the file.  For this example, we’re going to generate a PDF and include the name of the deal in the file name.
 

mceclip1.png


Next, we’re going to setup the delivery of our document so that it is automatically sent over to DocuSign for signature.  From the Deliver page, click the New Delivery button and select DocuSign from the list.  After you authenticate your DocuSign account, you’ll need to pick the merge fields for the signer’s name and email address.
 

mceclip2.png


After you have setup the DocuSign delivery, we are done with the setup in Formstack Documents and we’re ready to integrate with Zoho CRM.

To integrate with Zoho CRM, we’re going to use the Formstack Documents plugin that is available from Zoho Marketplace.  You can install this plugin here: https://crm.zoho.com/market/installPlugin.do?portalName=zohoplugin&nameSpace=webmergedocumentgeneration

Inside Zoho CRM, to go the Formstack Documents Mappings module and create a New Mapping.  Give the mapping a descriptive name and then pick Potential as the module.  We’re going to choose Document as the Formstack Documents Resource and then choose the document that we just setup in Formstack Documents.
 


Once you pick your Formstack Documents document, Zoho will load a list of all the merge fields that are in your document.  For each of the merge fields, you need to pick the corresponding CRM fields.  This tells Zoho how to send your data over to Formstack Documents so that it gets populated in the correct spot on your template.
 


After you have matched up all of your merge fields, go ahead and save the mapping.  We’re ready to generate the contract!  Open up one of your Potentials and then click the Formstack Documents button.  This will generate the contact and send it over to DocuSign for signature.

Here’s what our contract looked like ready to sign:
 

Integrating Custom Modules with Formstack Documents

For custom modules of Zoho CRM, you'll need to manually integrate the extension.

Before getting started, the you must know the auto-generated module name (API

name).

To identify the API name:

  • Click the Settings Icon (Setup) > Customization > Modules and Fields
  • Select the Module (for which the custom button has to be created) > Summary.
  • Under Primary, the API name will be displayed.

This value is the required Module name.

Zoho_1.jpg

To integrate the extension:

  • Click the Settings Icon (Setup) > Customization > Modules and Fields
  • Select the Module (for which the custom button has to be created) > Links and
  • Buttons > click New Button.
  • Enter a name for the button (For Ex: Formstack Documents).
  • Enter description about the button.
  • Select List View Page from the drop-down list.
  • Select Invoke a URL . from the drop-down list

7. Paste the below URL

https://extensions.zoho.com/plugin/webmerge/handler?action=mergeDocumentP

age&module=ModuleName&rec_id=${Module.Module id}

8. with the value identified in API name. In the link, replace ModuleName

9. In Fields List, search your module name. From the drop-down list, select the

value with your module name along with "id".

Zoho_2.jpg

10. Select New Window from the drop-down list.

11. Select the Profile who wants to see the button.

12.Click Save.


Congrats, you’re all finished!  You can now generate all types of documents from your Zoho CRM account.  Can you think of any other ways that you could use Formstack Documents to simplify your paperwork process?
 

Have more questions? Submit a request

27 Comments

  • Avatar
    Site Admin

    Jeremy,

    When custom date (as opposed to the system standard Datetime) fields are mapped from Zoho CRM, which locale is used and can I control that locale?
    In our CRM, a custom date is shown (through the API) as YYYY-MM-DD but in the merged document it is showing as MM/DD/YYYY even though my WM account timezone is set to Melbourne Australia.

  • Avatar
    Jeremy Clarke

    Hello,

    You'll need to format the date in your template like this: {$FieldName|date_format:"Y-m-d"}

  • Avatar
    Mark Balsam

    Does it allow for subtables? The native mail merge (which is not so great) allows for dynamic tables so that you can insert a table with all the linked records associated with the record you're merging

  • Avatar
    Jeremy Clarke

    Hi Mark,

    Yes, you can send over related records (collections) and then loop through them like this in your document: https://support.webmerge.me/hc/en-us/articles/206526116-Loop-through-a-list-of-items

  • Avatar
    Mark Balsam

    The table in my document is not displaying any data. I have my document table set up as follows:

    {tablerow from=$bbls item=_bbl}{$_bbl.Account_Name} {$_bbl.Owner} {$_bbl.Description} {$_bbl.Deal_Name}{/tablerow}

    I have a related records (collections) mapped to bbls, and _bbl is blank.

    The schema for the collection is as follows:

    bbls

    Collection Model Schema
    [
    {
    "Owner": "",
    "Description": "",
    "Campaign_Source": "",
    "Super_Name_and_Phone": "",
    "Closing_Date": "",
    "Last_Activity_Time": "",
    "Modified_By": "",
    "Lead_Conversion_Time": "",
    "Tenant_Name_and_Phone": "",
    "Deal_Name": "",
    "Exchange_Rate": "",
    "Expected_Revenue": "",
    "Currency": "",
    "Overall_Sales_Duration": "",
    "Stage": "",
    "Account_Name": "",
    "Modified_Time": "",
    "Created_Time": "",
    "Amount": "",
    "Probability": "",
    "Next_Step": "",
    "Prediction_Score": "",
    "Contact_Name": "",
    "Sales_Cycle_Duration": "",
    "Contact_2_Name": "",
    "Type": "",
    "Lead_Source": "",
    "Created_By": "",
    "Tag": ""
    }
    ]

    What am I not doing right?

  • Avatar
    Jeremy Clarke

    Hi Mark,

    On the surface, this looks correct. Can you turn on Debug Mode (https://support.webmerge.me/hc/en-us/articles/206526126-Debug-Mode) to make sure that we're receiving the collection (array) from Zoho correctly?

  • Avatar
    Mark Balsam

    Here's the test data

    [{"tpId":null,"Owner":{"name":"Redacted","id":"3657945000000185017"},"Description":null,"$currency_symbol":"$","Campaign_Source":null,"Super_Name_and_Phone":"Redacted","Closing_Date":"2019-04-18","Last_Activity_Time":null,"Modified_By":{"name":"Redacted","id":"3657945000000185017"},"Lead_Conversion_Time":null,"Tenant_Name_and_Phone":"Redacted","$process_flow":false,"Deal_Name":"2032250052","Exchange_Rate":1,"Expected_Revenue":129.9,"Currency":"USD","Overall_Sales_Duration":0,"Stage":"Qualification","Account_Name":{"name":"2032250052","id":"3657945000002596009"},"id":"3657945000002585179","$approved":true,"$approval":{"delegate":false,"approve":false,"reject":false,"resubmit":false},"Modified_Time":"2019-04-18T09:59:00-05:00","Created_Time":"2019-04-18T09:59:00-05:00","Amount":1299,"Probability":10,"Next_Step":null,"$tpId":null,"$editable":true,"Prediction_Score":null,"Contact_Name":null,"Sales_Cycle_Duration":0,"Contact_2_Name":null,"Type":null,"Lead_Source":null,"Created_By":{"name":"Redacted","id":"3657945000000185017"},"Tag":[]}]

  • Avatar
    Jeremy Clarke

    Hi Mark,

    Ok, I thought Zoho had fixed this, but it looks like they are still sending over JSON string instead of the object. They should be fixing this soon, but until then, we'll need to use the Field Map (https://support.webmerge.me/hc/en-us/articles/206526086-Field-Map) to parse the JSON like this:

    bbls:
    {if is_array($bbls)}{json_encode($bbls)}{else}{$bbls}{/if}

    Our system to recognize the JSON in the field map value and parse it correctly.

  • Avatar
    Mark Balsam

    Thanks, almost there. The resulting merged doc now shows the first(account_name) and last(deal_name) columns of the table, however the middle column simply displays as "array". Also it's only displaying three total columns as opposed to the four that I wanted.

  • Avatar
    Jeremy Clarke

    Hi Mark,

    It looks like those fields have subfields, so with your owner, you'll want to use {$_bbl.Owner.name}

    Please confirm that you have 4 columns setup in your table inside your template.

  • Avatar
    Mark Balsam

    Looks to be a success for that one merge. The only issue now is that as a test, I selected two records to merge(to the same doc template) at the same time. The first record merged correctly. The second one did not and in the first column said "array" despite the fields being set up the same way.

    Also it would be awesome if this plugin could support custom modules as well. As far as I can tell, it does not currently.

  • Avatar
    Jeremy Clarke

    Hi Mark,

    Please check the merge data from Debug Mode to see what the field names are called in that 2nd merge. There could be special differences with each record.

    Also, Zoho built the plugin for WebMerge so you'll need to reach out to their team if you have improvement suggestions. But I thought they support custom modules. You might need to add them under the WebMerge Settings page in the plugin.

    Thanks!

  • Avatar
    Randy Warner

    I would like to leverage this integration with a custom module in Zoho but the integration doesn't appear to support that. Should we just leverage the WebMerge API instead?

  • Avatar
    Jeremy Clarke

    Hi Randy,

    You should be able to add the custom module under the WebMerge Settings page inside the plugin. Do you see that option there?

  • Avatar
    Randy Warner

    I can't seem to figure out where the settings page would be "inside" the plugin. Do you have a path that you can share?

  • Avatar
    Jeremy Clarke

    Hi Randy,

    Sorry, I mispoke - it doesn't look like the WebMerge Settings page allows you to add those custom modules. We've reached out to Zoho through our team, but I would suggest you reach out to Zoho as well to request they add the ability to use Custom Modules. We were told this was already available (they built the plugin) but they might not have released it yet.

    Fingers crossed they can release it quickly!

  • Avatar
    Chad Youngblut

    Hi there,

    We've been successfully using WebMerge with Zoho CRM for quite some time. However, as of today, when we use the WebMerge button within Zoho, it fails with a "Success:0 | Failed:1" but no details within the failed link. Nothing seems to be wrong with the account and we have not changed anything on our end. Any ideas as to what might cause this to happen?

  • Avatar
    Jeremy Clarke

    Hi Chad,

    It looks like there might be an issue with Zoho CRM right now. Can you please reach out to their support team to get more information?

    Thanks!

  • Avatar
    Chad Youngblut

    Thanks for the speedy response, Jeremy. I'm on with Zoho right now. They just let me know that there is, indeed, an ongoing issue and their extensions team are looking into it now.

  • Avatar
    Mark Balsam

    It looks like they now support custom modules, but they don't support custom "collections"/ related lists for custom modules which is disappointing. I have a module called ABC. Then I created "member ABCs" . These are basically the child ABC records which I link to a parent ABC record with a lookup field. They do not, however, appear as a choice in collections. Any thoughts on this?

  • Avatar
    Jeremy Clarke

    Hey Mark,

    We'll reach out to Zoho and ask them to update the integration to support the custom collections! Please reach out to them as well so they know it's a priority :)

  • Avatar
    Mark Balsam

    I'm using the Zoho plugin and I have a "collection" that I'm trying to send over to the webmerge document. There are two fields of concern in the collection: "NOVID" and "Deal_Name". For each unique NOVID, I want the document to repeat and I want the "Deal_Name" to be grouped by NOVID such that in cases where multiple records in the collection contain the the same "NOVID" but unique deal names, each deal name would display in a row on the document IE(Deal_Name 1 Deal_Name 2 Deal_Name 3, etc). Can I accomplish this and how? Been running into errors with support thus far.

  • Avatar
    Jeremy Clarke

    Hi Mark,

    You can group the array (collection) like this:

    {foreach from=$Collection item=_row}{$_groups[$_row.NOVID][] = $_row}{/foreach}

    Then you can print that in a table like this:

    {tablerow from=$_groups key=_novid item=_rows}
    {$_novid}
    {tablerow from=$_rows item=_row}{$_row.Deal_Name}{/tablerow}{/tablerow}

  • Avatar
    Mark Balsam

    Hi

    I'm not clear on a few things.

    What in what you provided gets it to copy onto the next page? I thought we would need a page break or something like that?  Maybe I should clarify that when I say I want the document to repeat, I mean I want it to copy onto a new page with new data.  

    What I currently have for deal name in the document and what lays it out the way I want is {foreach from=$items item=_row} {_row.Deal_Name} {/foreach}. Is there a way to use this with what you have proposed?

    When you say "group the array (collection), do I do that in the document or in the field map?

    When you say $Collection are you using that as placeholder for the actual name of the collection or should I actually use that.

    Thanks!

    Edited by Mark Balsam
  • Avatar
    Jeremy Clarke

    Mark,

    Yes, if you need each NOVID group on it's own page you can add page break. Like this:

    {foreach from=$_groups key=_novid item=_rows}
    {$_novid}
    {foreach from=$_rows item=_row}
    {$_row.Deal_Name}{/foreach}
    PAGE BREAK
    {/foreach}

    You'll put that grouping code in your template and instead of "$Collection" you'll use the field name you used for your collection. That was just a placeholder.

  • Avatar
    Mark Balsam

    Jeremy, I'm 98% to the finish line and I'm hoping you can get push me past it. The resulting document is almost good but the first page is populated with a "0" value, the next two pages are populated and grouped perfectly, and the last page is completely blank. How do I get rid of the first and last pages moving forward.

    I have it entered as follows:

    {foreach from=$items item=_row}{$_groups[$_row.NOVID][] = $_row}{/foreach}{foreach from=$_groups key=_NOVID item=_rows} 
    {$_NOVID} 
    {foreach from=$_rows item=_row} 
    {$_row.Deal_Name}{/foreach}

    PAGEBREAK

    {/foreach}

    Edited by Mark Balsam
  • Avatar
    Jeremy Clarke

    Hi Mark,

    Try this:

    {foreach from=$items item=_row}{if !empty($_row.NOVID)}{$_groups[$_row.NOVID][] = $_row}{/if}{/foreach}{$_doPageBreak = false}{foreach from=$_groups key=_NOVID item=_rows}{if $_doPageBreak}PAGE BREAK{/if}
    {$_NOVID}
    {foreach from=$_rows item=_row}
    {$_row.Deal_Name}{/foreach}
    {$_doPageBreak = true}{/foreach}

Please sign in to leave a comment.
Powered by Zendesk