Hi every one just want to share about process with you.. I just want to share my code to build JSON string in DELUGE.
As the api is not as complete as javascript.. we need to have tricks.. For myself i have 1rst try to use the combination of Map(); and List(); with toString(); function to build the perfect JSON Map but it was realy a long script, difficult to read.. so now i just concatenate string or part of string...
Its important to create json string instead of pure json as square Bracket List "[0,1,2,..]" is not supported and will be squish into curly brace "{}" on save.
Exemple : THIS
- {
- "metaApiName": "contract-end-date",
- "inputs": [
- {
- "inputApiName": "contract-end-date",
- "inputValue": 3
- },
- {
- "inputApiName": "n-monthsyears-value",
- "inputValue": "contract_month"
- },
- {
- "inputApiName": "n-monthsyears-term",
- "inputValue": 0
- }
- ]
- }
- will become this on save wich is incorrect
- {
- "metaApiName": "contract-end-date",
- "inputs": {
- {
- "inputApiName": "contract-end-date",
- "inputValue": 3
- },
- {
- "inputApiName": "n-monthsyears-value",
- "inputValue": "contract_month"
- },
- {
- "inputApiName": "n-monthsyears-term",
- "inputValue": 0
- }
- }
- }
So thirst thing i suggest is build the entire request in json an then passing it as string with escaped caracters as bellow
- jsonString = "{\"metaApiName\":\"contract-end-date\",\"inputs\":[{\"inputApiName\":\"contract-end-date\",\"inputValue\":3},{\"inputApiName\":\"n-monthsyears-value\",\"inputValue\":24},{\"inputApiName\":\"n-monthsyears-term\",\"inputValue\":0}]}"
Then you can split the request string in parts and build the full request string with
- string = "3"
- string += "2"
- string += "3"
- info string; = "123";
, add variable with + operator and the outpout will be correct.
InnerArrayVaraibleSTRING = "{\"inputApiName\":\"contract-end-date\",\"inputValue\":3},";
- InnerArrayVaraibleSTRING += "{\"inputApiName\":\"n-monthsyears-value\",\"inputValue\":24},";
- InnerArrayVaraibleSTRING += "{\"inputApiName\":\"n-monthsyears-term\",\"inputValue\":0}";
jsonString = "{\"metaApiName\":\"contract-end-date\",\"inputs\":[ " + InnerArrayVaraibleSTRING + "]}";
And bellow the full exemple to build the map of a contract :
- TypeDeContrat = "you-contract-type-id"; // Contract type id = url part of edit contract type
- contrat_title = "Contrat Test 2024 Auto"; // Contract title
- requester = "NAME OF REQUESTER";
- contrat_description = "Description of the contract";
- CounterpartNAme = "ACCOUNT-ID-IN-ZOHO-CONTRACT";
// Counterpart id = url part id of counterpart
// (exemple : green veggy society is certainely : green-veggy-society ) - counterpartUserNAmeMAil = "COUNTERPART EXISTING CONTACT EMAIL";
- contract_month = 36; // the duration of my contrat // this one start with sign for contract_month ;
- //Contract map title and template
- contrat_content = "{\"metaApiName\":\"contract-type\",\"inputs\":[{\"inputApiName\":\"contract-type\",\"inputValue\":\""+ TypeDeContrat +"\"}]},{\"metaApiName\":\"title\",\"inputs\":[{\"inputApiName\":\"title\",\"inputValue\":\""+ contrat_title + "\"}]},{\"metaApiName\":\"description\",\"inputs\":[{\"inputApiName\":\"description\",\"inputValue\":\""+ contrat_description + "\"}]},";
- //Contract map asker
- contrat_content += "{\"metaApiName\":\"requester-name\",\"inputs\":[{\"inputApiName\":\"requester-name\",\"inputValue\":\""+ requester + "\"}]},";
- //Contract map counterpart
- contrat_content += "{\"metaApiName\":\"party-b-name\",\"inputs\":[{\"inputApiName\":\"party-b-name\",\"inputValue\":\""+ CounterpartNAme + "\"}]},{\"metaApiName\":\"counterparty-primary-contact\",\"inputs\":[{\"inputApiName\":\"party-b-primary-contact-name\",\"inputValue\":\""+ counterpartUserNAmeMAil + "\"}]},";
- contrat_content += "{\"metaApiName\":\"contract-term\",\"inputs\":[{\"inputApiName\":\"contract-term\",\"inputValue\":true}]},{\"metaApiName\":\"is-renewable\",\"inputs\":[{\"inputApiName\":\"is-renewable\",\"inputValue\":false}]},{\"metaApiName\":\"contract-effective-date\",\"inputs\":[{\"inputApiName\":\"contract-effective-date\",\"inputValue\":1}]},";
- //Contract map Basic Options i selected (start with signature for x month )
- contrat_content += "{\"metaApiName\":\"contract-end-date\",\"inputs\":[{\"inputApiName\":\"contract-end-date\",\"inputValue\":3},{\"inputApiName\":\"n-monthsyears-value\",\"inputValue\":" + contract_month + "},{\"inputApiName\":\"n-monthsyears-term\",\"inputValue\":0}]}";
- // concatenate all input field list in brackets
- inputfieldlist = "[" + contrat_content + "]";
- // Finaly add anythings to the final json array map
- input_contract_map = "{\"externalSource\": true, \"inputfields\":" + inputfieldlist + "}";
//Show and debug the array maps generated- info input_contract_map;
You can notice the formula :
\"inputValue\":\""+ contrat_title + "\" , where contrat_title = "string_variable";
double quote is escaped before string and variable concatenation to ensure string variable to appear as string..
as "inputValue": " + contrat_title + " ,
become "inputValue": "string_variable " ,
Then you just have to put it to add it to the request :
- headerMap = Map();
- headerMap.put("Content-Type","application/json");
- //GET ZOHO CONTRACT EXEMPLE
- // CREATE THE CONTRACT
- //url :"https://contracts.zoho.eu/api/v1/createcontract" // create with subfields
- response_create_contract = invokeurl
- [
-
- url :"https://contracts.zoho.eu/api/v1/contracts"
- type :POST
- parameters: input_contract_map
- headers:headerMap
- detailed:true
- connection: "YOUR_CONNEXION_NAME"
- ];
- info response_create_contract;
If you have better way to ensure good encoding of the JSON string please comment and share !
Recent Topics
Google Fonts Integration in Pagesense Popup Editor
Hello Zoho Pagesense Team, We hope you're doing well. We’d like to submit a feature request to enhance Zoho Pagesense’s popup editor with Google Fonts support. Current Limitation: Currently, Pagesense offers a limited set of default fonts. Google Fonts
Improved Contact Sync flow in Google Integration with Zoho CRM
Hello Everyone, Your contact sync in Google integration just got revamped! We have redesigned the sync process to give users more control over what data flows into Google and ensure that this data flows effortlessly between Zoho CRM and Google. With this
CRM Canvas - Upload Attachments
I am in the process of changing my screens to Canvas. On one screen, I have tabs with related lists, one of which is attachments. There doesn't appear to be a way to upload documents though. Am I missing something really obvious? Does anyone have
Custom Fonts in Zoho CRM Template Builder
Hi, I am currently creating a new template for our quotes using the Zoho CRM template builder. However, I noticed that there is no option to add custom fonts to the template builder. It would greatly enhance the flexibility and branding capabilities if
Improved Functionality PO Bill SO Invoice
Hello, I need to enter over 100 items, it's frustrating to scroll a few item rows and wait for more to load, then scroll again. It would be nice to have buttons that scroll to the top or bottom with one click. Furthermore, these items I'm adding are VAT
Camera access
My picture doesn't appear in a group discussion. (The audio is fine.) The guide says "Click the lock icon on address bar," but I can't find it. Advise, please
Wishes for 2026
Hello, and a happy new year 2026! Let's hope it's better for everyone. I'd like to share some thoughts on Zoho One and what could be useful in the short, medium, and long term. Some things are already there, but not applied to Zoho One. Others seem like
How to Integrate Zoho Books with Xero (No Native Connection Available)
Hi everyone, I’m currently facing an issue with integrating Zoho Books invoices with Xero, as I’ve noticed Zoho does not provide a native integration with Xero at this time. I would like to ask: What are the common or recommended solutions for syncing
How to install Widget in inventory module
Hi, I am trying to install a app into Sales Order Module related list, however there is no button allow me to do that. May I ask how to install widget to inventory module related list?
Picklist field shows "none" as default
Hello, Is there an option to avoid showing "none" as the default value in a picklist field? I also don't want to see any option displayed. My expectation is to have a blank bar, and then when I display the drop-down list, I can choose whichever I wa
error while listing mails
I can't access email in any of my folders: Oops, an error occurred - retry produces the second error response: error while listing mails (cannot parse null string). I've signed in and out of Zoho, restarted my iMac.
Unlocking New Levels: Zoho Payroll's Journey in 2025
Every year brings its own set of challenges and opportunities to rethink how payroll works across regulations and teams. In 2025, Zoho Payroll continued to evolve with one clear focus: giving businesses more flexibility, clarity, and control as they grow.
CRM project association via deluge
I have created a workflow in my Zoho CRM for closing a deal. Part of this workflow leverages a deluge script to create a project for our delivery team. Creating the project works great however, after or during the project creation, I would like to associate
Zoho Browser??
hai guys, this sounds awkward but can v get a ZOHO BROWSER same as zoho writer, etc. where i can browse websites @ home and continue browsing the same websites @ my office, as v have the option in Firefox, once i save and close the browser and again when i open it i will be getting the same sites. If u people r not clear with my explanation, plz let me know. Thanks, Sandeep
Sync desktop folders instantly with WorkDrive TrueSync (Beta)
Keeping your important files backed up and accessible has never been easier! With WorkDrive desktop app (TrueSync), you can now automatically sync specific desktop folders to WorkDrive Web, ensuring seamless, real-time updates across devices. Important:
MCP no longer works with Claude
Anyone else notice Zoho MCP no longer works with Claude? I'm unable to turn this on in the claude chat. When I try to toggle it on, it just does nothing at all. I've tried in incognito, new browsers, etc. - nothing seems to work.
Enable History Tracking for Picklist Values Not Available
When I create a custom picklist field in Deals, the "Enable History Tracking for Picklist Values" option is not available in the Edit Properties area of the picklist. When I create a picklist in any other Module, that option is available. Is there a specific reason why this isn't available for fields in the Deals Module?
The reason I switched away from Zoho Notebook
My main reason for switching to Zoho was driven by three core principles: moving away from US-based products, keeping my data within India as much as possible, and supporting Indian companies. With that intent, I’ve been actively de-Googling my digital
Ability to Edit YouTube Video Title, Description & Thumbnail After Publishing
Hi Zoho Social Team, How are you? We would like to request an enhancement to Zoho Social that enables users to edit YouTube video details after the video has already been published. Your team confirmed that while Zoho Social currently allows editing the
Free Webinar : Unlock AI driven business insights with Zoho Inventory + Zoho Analytics
Are you tired of switching between apps and exporting data to build customized reports? Say hello to smarter & streamlined insights! Join us for this exclusive webinar where we explore the power of the Zoho Inventory–Zoho Analytics integration. Learn
Critical Issue: Tickets Opened for Zoho Support via the Zoho Help Portal Were Not Processed
Hi everyone, We want to bring to your attention a serious issue we’ve experienced with the Zoho support Help Portal. For more than a week, tickets submitted directly via the Help Portal were not being handled at all. At the same time no alert was posted
Hide/Show Subform Fields On User Input
Hello, Are there any future updates in Hide/Show Subform Fields "On User Input"?
Cloning Item With Images Or The Option With Images
Hello, when I clone an item, I expect the images to carry over to the cloned item, however this is not the case in Inventory. Please make it possible for the images to get cloned or at least can we get a pop up asking if we want to clone the images as
Archiving Contacts
How do I archive a list of contacts, or individual contacts?
Custom validation in CRM schema
Validation rules in CRM layouts work nicely, good docs by @Kiran Karthik P https://help.zoho.com/portal/en/kb/crm/customize-crm-account/validation-rules/articles/create-validation-rules I'd prefer validating data input 'closer to the schema'
Adding Default Module Image into mail merge field
As with most people finding their way to these forums i have a specific requirement that doesn't seem to be supported by Zoho I have created 2 custom modules to suit my purpose 1 is an inventory type module that lists aluminium extrusions, and all relevant
Sync Data from MA to CRM
Currently, it's a one-way sync of data from the CRM to MA. I believe we should have the ability to select fields to sync from MA to the CRM. The lead score is a perfect example of this. In an ideal world we would be able to impact the lead score of a
Is it possible to roll up all Contact emails to the Account view?
Is there a way to track all emails associated with an Account in one single view? Currently, email history is visible when opening an individual Contact record. However, since multiple Contacts are often associated with a single Account, it would be beneficial
Update CRM record action
Currently, MA only offers a "Push Data" action to push data to a CRM module. This action is built to cover the need to both create a new record and update an existing record. Because it has been implemented this way all required fields on the CRM module
Free Training - Explore What’s New in Zoho One 2025
Greetings! We hope you have all had a chance by now to get hands-on with the new features and updates released as part of ZO25. Yes, we understand that you may have questions and feedback. To ensure you gain a comprehensive understanding of these updates,
Good news! Calendar in Zoho CRM gets a face lift
Dear Customers, We are delighted to unveil the revamped calendar UI in Zoho CRM. With a complete visual overhaul aligned with CRM for Everyone, the calendar now offers a more intuitive and flexible scheduling experience. What’s new? Distinguish activities
Edit default "We are here to help you" text in chat SalesIQ widget
Does anyone know how this text can be edited? I can't find it anywhere in settings. Thanks!
Quick way to add a field in Chat Window
I want to add Company Field in chat window to lessen the irrelevant users in sending chat and set them in mind that we are dealing with companies. I request that it will be as easy as possible like just ticking it then typing the label then connecting
How to create a two way Sync with CRM Contacts Module?
Newbie creator here (but not to Zoho CRM). I want to create an app that operates on a sub-set of CRM Contacts - only those with a specific tag. I want the app records to mirror the tagged contacts in CRM. I would like it to update when the Creator app
Zoho Sheet for Desktop
Does Zoho plans to develop a Desktop version of Sheet that installs on the computer like was done with Writer?
Where is the settings option in zoho writer?
hi, my zoho writer on windows has menu fonts too large. where do i find the settings to change this option? my screen resolution is correct and other apps/softwares in windows have no issues. regards
Develop and publish a Zoho Recruit extension on the marketplace
Hi, I'd like to develop a new extension for Zoho Recruit. I've started to use Zoho Developers creating a Zoho CRM extension. But when I try to create a new extension here https://sigma.zoho.com/workspace/testtesttestest/apps/new I d'ont see the option of Zoho Recruit (only CRM, Desk, Projects...). I do see extensions for Zoho Recruit in the marketplace. How would I go about to create one if the option is not available in sigma ? Cheers, Rémi.
How to import data from PDF into Zoho Sheet
I am looking to import Consolidated Account Statement (https://www.camsonline.com/Investors/Statements/Consolidated-Account-Statement) into zoho sheet. Any help is appreciated. The pdf is received as attachment in the email, this document is password
Zoho Projects Android app: Integration with Microsoft Intune
Hello everyone! We’re excited to announce that Zoho Projects now integrates with Microsoft Intune, enabling enhanced security and enterprise app management. We have now added support for Microsoft Intune Mobile Application Management (MAM) policies through
Cant't update custom field when custom field is external lookup in Zoho Books
Hello I use that : po = zoho.books.updateRecord("purchaseorders",XXXX,purchaseorder_id,updateCustomFieldseMap,"el_books_connection"); c_f_Map2 = Map(); c_f_Map2.put("label","EL ORDER ID"); c_f_Map2.put("value",el_order_id); c_f_List.add(c_f_Map2); updateCustomFieldseMap
Next Page