Hi Everyone,
We've been exploring custom functions which help in performing advanced automation tasks. Custom functions enable you to achieve possibilities based on your organization's requirements. Custom functions require user inputs that allow the function to operate specifically for your organization based on the data provided.
The User Inputs section
Zoho Desk team provides you custom functions in a uniform code format. We have the "user inputs section" at the beginning of most of our custom functions.
The code below demonstrates what the User Inputs section looks like in custom functions. The User inputs section lets you feed in customized inputs based on your organization/portal.
- // ----<<<< User Inputs format>>>>----
- logs = Map();
- deskUrl = "https://desk.zoho.com"; //Replace .com the domain based on your DC
- Orgid = "***********" //replace with org ID
- cfApiName = "cf_field_name";// replace with the API name of the custom field
- departmentId = ***********;// Replace *********** with your department Id
- templateId = "enter_the_email_template_id";
-
- from_email = "enter_the_from_email_address";
- // ----<<<< Code Section >>>>----
-
- logs.insert("templateId":templateId);
- if(templateId != "")
- {
- // info templateId;
Here's how you can add your portal-based inputs to the custom function:
- // ----<<<< User Inputs with data >>>>----
- logs = Map()
- deskUrl = "https://desk.zoho.au"; //DC is au
- Orgid = "10000000x7" //replace with the complete org ID
- cfApiName = "cf_country_name";// replaced with the API name of the field Country name.
- departmentId = 29x0x0x0x0x0x9;// Replace *********** with your department Id
- templateId = "1x3x00xx9x8xxx0x0x";
- from_email = "1x4x00xx1x0xxx0x0x";
- // ----<<<< Code Section >>>>----
- logs.insert("templateId":templateId);
- if(templateId != "")
- {
- // info templateId;
What makes the 'User Inputs' section valuable in custom functions?
Some developers prefer to include user inputs directly within the code in every line. However, using the dedicated User Inputs section offers several advantages: it keeps your code clean, enhances efficiency, and separates hard-coded values from the logic, making your custom function more manageable and easier to maintain.
In the User Inputs section, you’ll need to replace the sample values or placeholders with actual data. This is necessary because the Arguments option in the Custom Function script provides access to only a limited set of field values. In most cases, inputs such as Org ID, ticket ID, and API names must be entered in the User Inputs section to ensure the function runs correctly and is tailored to your organization/portal.
User Inputs: where to get the required values?
This section explores how to fetch the user inputs required for specific parameters. These inputs play a key role in helping you code custom functions tailored to your needs. In most cases, they include IDs related to your organization, tickets, custom views, departments, holiday lists, and more; each referring to a unique record ID within the Zoho Desk platform.
1. Zoho Desk Domain
Many user inputs begin with "replace .com based on the your DC".
The easy way to find your DC(data center) or location is from the browser's URL. Login to your Zoho account via this link, your DC is present after accounts. zoho.
For example : deskURL = "https://desk.zoho.com";
If your DC is IN, replace .com with in in the deskURL like this "https://desk.zoho.in". Based on your DC : eu/au/in, replace .com with the respective DC alone.
2. Org ID
To get the Org ID of your Zoho Desk portal, go to Setup >> APIs under Developer Space. You will find the Org ID under the API Plan details.
3. Ticket ID
To get the ticket ID, go to Tickets >> open the ticket for which you want the ticket ID. In the browser's URL, you will find an 18-digit number after the "/tickets/details/" section, which is the ticket ID of the particular opened ticket.
4. Contact ID
To fetch the contact ID, go to Customers and choose the contact for which you wish to find the Contact ID. In the browser's URL, you will find an 18-digit number at the end of the URL after the "/contacts/details/" section. This is the contact ID for the selected contact.
5. Account ID
To get the Account ID, click on Customers in your Zoho Desk portal, then click on Account on the bottom left of the window. Click on the account for which you want the account ID. Once the account is displayed, the 18-digit number at the end of the browser's URL after "/accounts/details/" is the Account ID for the selected account.
6. Agent ID
To fetch the Agent ID, go to Setup (S) >> User Management >> Agents. You can search the Agent using the Search space on the top left. Select the Agent for detailed view. The 18 digit number in the browser URL at the end after the "/user-control/agents/" is the Agent ID of the selected ID.
7. Department ID
Navigate to Setup >> Organization >> Departments >> select the department for which you want to fetch the ID. The URL in the browser has the department ID after the "/general/departments/" section.
8. Help Center ID
To fetch the ID of the Help Center, go to Setup >> Channels >> Help Center >> select the Help Center for which you want to fetch the Help Center ID, then click Customization. Now the browser URL will have the 18-digit number between #setup/channels/ <Help Center ID> and /hcCustomize.
9. ID of Business hours
To get the ID for a business hour configured, go to Setup >> Organization >> Business Hours. Select the Business hour to view the Business hour page. The browser's URL will have the business hour ID after "/businesshours/edit/" section.
10. ID of a Holiday list
To get the ID of the Holiday Lists configured, go to Setup >> Organization >> Holiday Lists. Click on the Edit button in the Holiday list to view the Holiday list page. You will find the Holiday list ID next to "/holidaylist/edit/" in the browser URL.
11. Email template ID
Navigate to Setup >> Customization >> Email Templates. Click on the Email template for which you need the ID. Once you've selected the Email template, you can locate the Email template ID in the URL of the email template page. It is found after the "/emailtemplates/edit/" section.
12. Custom field API name
When custom functions are triggered based on a specific field or a custom field created, they require the field's API name to be included in the user inputs.
To fetch the API names, go to Setup >> Customization >> Layouts and Fields >> Field list. You will find the API name for the respective Field Name in the Fields list.
13. Custom view ID
Some custom functions operate based on a custom view you've created. To execute the custom function based on the custom view within your portal, you'll need the custom view ID.
To fetch the ID of the Custom View, select the Module where you created the Custom View >> Views >> choose the custom view, right click on the page and select inspect. Click on Network in the Inspect tab. Click clear to clear the Network tab. Click Save on the custom view. In the Network console, the first 16 digit number you see is the Custom view ID. Click on the ID to view the headers, you can confirm the ID here.
To fetch the Custom View ID:
- Navigate to the module where the custom view was created.
- Go to Views and select the desired custom view. Click Edit on the custom view.
- Right-click on the page and select Inspect to open the developer tools. Click the Network tab.Click on Click Clear to empty the Network logs.
- Now, click Save on the Custom View. In the Network console, look for the first 16-digit number—this is the Custom View ID.
- Click on that entry to view the Headers, where you can confirm the ID.
With this episode, we bring the custom function series to a close.
Here are the links to visit the previous episodes:
We’d love to hear how these inputs have helped you! If there are any topics you'd like us to focus on, share them in the comments below.
Until the next post, see you soon!
Lydia | Zoho Desk
Recent Topics
【Zoho CRM】CRM for Everyoneに関するアップデート:関連データ機能
ユーザーの皆さま、こんにちは。コミュニティチームの中野です。 今回は「Zoho CRM アップデート情報」の中から、CRM for Everyoneの新機能「関連データ機能」をご紹介します。 関連データ機能は、あるタブのデータを別のタブに柔軟に関連付け、異なるタブで管理されている情報を1か所にまとめて表示できます。 たとえば、組織タブとチームタブのデータを関連付けることで、必要な情報に効率よくアクセスでき、顧客理解を深めながら他チームとの連携もスムーズに行えます。 目次 1. 関連データの設定方法
Inventory to Xero Invocie Sync Issues
Has anyone had an issue with Invoices not syncing to Xero. It seems to be an issue when there is VAT on a shipping cost, but I cannot be 100% as the error is vague: "Unable to export Invoice 'INV-000053' as the account mapped with some items does not
How to activate RFQ? What if a price list has ladder price for items?
Where can I find the option to activate request for quotation? How does it work? If the item has ladder price, does it gets calculated depending on how many items are in the cart?
Cannot access KB within Help Center
Im working with my boss to customize our knowledge base, but for some reason I can see the KB tab, and see the KB categories, but I cannot access the articles within the KB. We have been troubleshooting for weeks, and we have all permissions set up, customers
Can't join canal Developers Zoho User
Hello, I received an invitation to join this channel, but I get an error when I try to join it, and I get the same error when I go to the Zoho Cliq interface > Search for a channel. Is this because I don't have a license linked to this email address?
Desk Email reply - set default font / use custom font
Hello, in our e-mails, which we send to our customers, a certain font must be used (Corporate Design): Segoe UI https://en.wikipedia.org/wiki/Segoe#Segoe_UI How can this be included? How can this be set as the default font to ensure that this font is
Notes created in mobile can no longer be accessed in desktop
Working with a 2013 Mac running OS 10.14.6; Desktop Notebook version 4.5.3. Using Motorola Moto G Power 5G - 2024; Android app version 6.7 I have been using Notebook for some years. Starting several weeks ago, the notes newly created ion the phone can
PDF Templates - Checkbox Borders
Is there a way to remove the border of a radio/checkbox on a PDF? I'd like to use the function of checkbox but if there's no easy way to remove the border (the PDF form already has a rectangle so it gets cluttered), then I'm forced to create a single
Zoho CRM's custom views are now deployable from sandboxes
This feature is now available for users in the AU, JP, and CN DCs. New update: This feature is now available for users in CA and SA DCs. Hello everyone, We're excited to announce that you can now deploy custom views from sandboxes to your production environment
Generate a link for Zoho Sign we can copy and use in a separate email
Please consider adding functionality that would all a user to copy a reminder link so that we can include it in a personalized email instead of sending a Zoho reminder. Or, allow us to customize the reminder email. Use Case: We have clients we need to
Settings Icon No Longer in ZOHO Desk?
In ZOHO desk, there has been a gear icon for settings. as of yesterday, it is no longer there. I showed up briefly this morning but is gone again. Anybody else experiecing this?
Introducing the all-new email parser!
Greetings, We are pleased to introduce to you, a brand-new, upgraded version of the Zoho CRM Email Parser, which is packed with fresh features and has been completely redesigned to meet latest customers needs and their business requirements. On that note,
Tip #43 - Track, Review, and Analyze Your Assist Sessions with Reports-'Insider Insights'
Did you know you can generate detailed reports for both remote support sessions and unattended access sessions in Zoho Assist? This makes it easy to monitor technician activity, measure efficiency, and review customer interactions. Let us now take a closer
Can we generate APK and IOS app?
Dears, I want to know the availability to develop the app on zoho and after that .. generate the APK or IOS app and after that I added them to play store or IOS store.. Is it possible to do this .. I want not to use zoho app or let my customers use it. thanks
Simplified Call Logging
Our organization would like to start logging calls in our CRM; however, with 13 fields that can't be removed, our team is finding it extremely cumbersome. For our use case, we only need to record that a call happened theirfor would only need the following
Sub form doesn't as formula field
Is it possible to get formula field in sub form in futures?
Week date range in pivot table
Hello, I need to create a report that breakouts the data by week. I am using the pivot table report, and breaking out the date by week, however the date is displayed as 'Week 1 2014' format. Is there anyway to get the actual dates in there? ex. 1/6/2014-1/12/2014 Thanks,
How do I get Status History data of my Projects?
I want to build a table in Zoho Analytics that Groups by Date, when Projects entered a certain status. I cannot find Status History or any such useful data available in the Setup of my Data Source sync. Please advise how I can achieve this?
Is it possible to hide fields in a Subform?
Since layout rules cannot be used with Subforms, is there another way, or is it even possible, to hide fields in a subform based on a picklist fields within said subform? For example, if the Service Provided is Internet, then I do not want to see the
Single Task Report
I'd like a report or a way to print to PDF the task detail page. I'd like at least the Task Information section but I'd also like to see the Activity Stream, Status Timeline and Comments. I'd like to export the record and save it as a PDF. I'd like the
Weekly Tips :Instantly find what you need with Attachment Viewer
Your inbox must be packed with project emails, shared notes, and scattered attachments. You are looking for one specific file—a presentation slide or maybe a media clip from a team update—but don’t want to dig through endless email threads or switch between
Putting Watermark on Zoho Sheet
Can this be done?
Missing Zoho Desk integration option for form workflows
According to the help page "Configure Zoho Desk integration in form workflows" we should be able to select Zoho Desk as an integration target but when I open the integrations list then Zoho Desk is not being listed in it. We are on the Premium plan which should already support Zoho Desk integrations.
CRM x WorkDrive: File storage for new CRM signups is now powered by WorkDrive
Availability Editions: All DCs: All Release plan: Released for new signups in all DCs. It will be enabled for existing users in a phased manner in the upcoming months. Help documentation: Documents in Zoho CRM Manage folders in Documents tab Manage files
Gantt for 2 or more projects
Hello, I'm trying the free version of your produtc. It is veryyy good!!!! I don't know if in the Standard plan, I can overview a Gantt Graph for 2 or more Projects Milestone. This would be very helpfull for managing teams and taking decisions about who I will assign a task to. In the paid plan Do I have this possibility? Thank you.
Integrating a Zoho Project Gantt Chart into Reports
Is is possible to integrate a Zoho Project Gantt Chart into a Zoho Report Dashboard. I am in the process of creating Project Status Dashboards for the projects that we track in Zoho Projects and I would like to incorporate the gantt chart within Reports. Please let me know! Thanks
ZOHO BOOKS - EXCESSIVELY SLOW TODAY
Dear Zoho Books This is not the first time but it seems to be 3 times per week now that the system is extremely slow. I work on Zoho Books 95% of my day so this is very frustrating. Zoho you need to do something about this. I have had my IT guy check
Gantt Chart - Zoho Analytics
Are there any plans to add Gantt Charts capabilities to Zoho Analytics?
Displaying related quotes in sales order and back
Hi, My colleague liked to see to which sales orders, the quote has been converted. Quote shows Invoices, but not SO. Same, they would like to see the quotes in the sales order, as they can see invoices, packages, shipment, How can we achieve this ? Thank
Tip of the Week #71–Auto-move incoming messages to the right inboxes with keywords
We all know that customer-facing teams, especially your sales and support teams, can’t afford to miss even a single customer conversation. But sometimes, sales queries or support requests can easily get lost in a crowded inbox or even end up in the wrong
Clearing Fields using MACROS?
How would I go about clearing a follow-up field date from my deals? Currently I cannot set the new value as an empty box.
Migrating a Zoho Forms form into Zoho Creator
Hi, How can I migrate my Zoho Forms form into Zoho Creator? Thanks. Truly, Emad
Is there any way to recall an email sent using Zoho CRM?
If an email is sent using Zoho Mail, there is a recall option/functionality that is available to the sender. Is there any way to recall an email if it was sent using Zoho CRM? I can't seem to find that option. Any help would be appreciated.
Quick Create needs Client Script support
As per the title. We need client scripts to apply at a Quick Create level. We enforce logic on the form to ensure data quality, automate field values, etc. However, all this is lost when a user attempts a "Quick Create". It is disappointing because, from
is it possible to add more than one Whatsapp Phone Number to be integrated to Zoho CRM?
so I have successfully added one Whatsapp number like this from this User Interface it seems I can't add a new Whatsapp Number. I need to add a new Whatsapp Number so I can control the lead assignment if a chat sent to Whatsapp Phone Number 1 then assign
Problem with reports due to "Connected" items change - Yes this IS a problem
Now that the change has been made to use "connected" items I can no longer run the reporting I need in CRM. I should be able to start with Deals as the parent, connect down to the Account (Account_Name) on the deal as the child, then to any child items
Zoho sheet desktop version
Hi Zoho team Where can I access desktop version of zoho sheets? It is important as web version is slow and requires one to be online all the time to do even basic work. If it is available, please guide me to the same.
Introducing notifications in the vendor portal
Imagine this: You're a recruiter working with multiple vendors on a high-volume hiring project. You’ve just updated a job description after a last-minute change from the hiring manager. One of your vendors, however, is still working off the older version
CRM limit reached: only 2 subforms can be created
we recently stumbled upon a limit of 2 subforms per module. while we found a workaround on this occasion, only 2 subforms can be quite limiting in an enterprise setting. @Ishwarya SG I've read about imminent increase of other components (e.
LESS_THAN_MIN_OCCURANCE - code 2945
Hi I'm trying to post a customer record to creator API and getting this error message. So cryptic. Can someone please help? Thanks Varun
Next Page