Automation#18: Automatically Fetch Values from Contacts to the Tickets Module

Automation#18: Automatically Fetch Values from Contacts to the Tickets Module



Hello Everyone,

Welcome to this week's edition, where you can seamlessly sync fields from the Contacts to the Tickets module. For efficient business operations, it's crucial to have details mapped across different modules.
Zylker Secure offers antivirus services with various pricing plans for its customers. Each plan purchased is stored in the Customer module. Every time a customer submitted a query, it was challenging to refer to the plan and process the requirements accordingly. Zylker Secure solved this by mapping pricing plan data from the customer record to the tickets module. This automatic sync streamlined their business operations. Let's see how to implement this automation in your Desk portal.

Prerequisites
1. Create a custom field in the Ticket and Contact layout.
    1.1 Go to Setup >> Customization >> Layouts and Fields.
    1.2 Choose the required Department and select the Ticket layout under it.
    1.3 Create a
custom field in the Ticket layout. Click Save.
    1.4 In Layouts, choose Contacts from the drop-down list for the same department.
    1.5 Click on the Contact layout and create the same custom field type in the Contacts layout.
          Click Save.  
Note: The field type in the Contacts layout must match the field type in the Tickets layout. For example, if one layout has a single line field, the other must also have a single line field. Similarly, if one has a picklist field, the other must have a matching custom picklist field.

Create a Workflow Rule
1. Go to Setup, choose Workflows under Automation.
2. Under Workflows, click Rules >> Create Rule.
In the Basic Information section,
3. Select Tickets from the drop-down menu under Module.
4. Enter a Rule Name and Description for the rule.
5. If you want to activate the rule right away, select the Active checkbox. Else, create the rule and activate it later.
6. Click Next.
In the Execute on section, follow these steps:
7. Select the Create checkbox to execute this rule every time a new ticket is created.  
8. Click Next.
9. Leave the Criteria blank and click Next.
10. In the Actions section, click the + icon and select New next to Custom Functions.
11. Enter a Name and Description for the custom function.
12. In the script window, insert the Custom Function given below:
  1. orgId = "6*********0"; // replace orgId
  2. ticketAPIName = "cf_name"; // replace API name of the custom field in Tickets layout
  3. contactAPIName = "cf_name"; // replace API name of the custom field in Contacts layout
  4. getContact = zoho.desk.getRecordById(orgId,"contacts",ContactID);
  5. customFields = getContact.getJSON("cf");
  6. updateTicket = zoho.desk.update(orgId,"tickets",TicketID,{"cf":{ticketAPIName:customFields.getJSON(contactAPIName)}});
  7. info updateTicket;
Note: In line 1, place your OrgId. To access your OrgId, go to Setup >> Developer Space >> API.
In line 2, replace the value with the API name of the custom field created in the Tickets layout.
In line 3, replace the value with the API name of the custom field created in the Contacts layout.
 
To access API name of the custom field, Go to Setup>>Customization>>Layouts and Fields >> Fields List. Select the module, and you can find the API name of the custom field created.
13. Click Edit Arguments and include the argument mapping as below: 
13.1. In the Name field type ContactID, and from the Value drop-down list select Contact Id under Contact Sections.
13.2. In the Name field type TicketID, and from the Value drop-down list select Ticket Id under Ticket Sections.
14. Click Save to save the custom function.
15. Click Save again to save the workflow.

Implementation
When a ticket is created, the custom field in the Tickets layout is updated automatically by fetching the value from the custom field in the Contacts layout.
 
See you next week with another custom function coming your way!

    • Sticky Posts

    • Zoho Desk Virtual Meetup: US Central, October 5 - 7, 2021

      After the interactive Virtual Meetups in the other regions, we are starting with the US Central and Midwest regions from October 5 to October 7, 2021. The dates for other regions will be announced soon.  At this event, we will explore the topics which
    • Register for Zoho Desk Beta Community

      With the start of the year, we have decided to take a small step in making the life of our customers a little easier. We now have easy access to all our upcoming features and a faster way to request for beta access. We open betas for some of our features
    • Ask the Experts 10: A 5-hour online Q&A on Zoho Desk Best Practices

      Welcome to Zoho Desk's Ask the Experts session! This is a monthly discussion on our  forums; wherein a panel of experts will take on questions  specific to topics related to Zoho Desk. The panel will be available for a 5-hour period and will answer any questions posted here.   Let's begin the year learning some best practices from our experts. In this month's ATE we are opening the floor to questions on how to use Zoho Desk the best way.  If you have a business use case but not sure if Workflow is
    • Share your Zoho Desk story with us!

      Tell us how you use Zoho Desk for your business and inspire others with your story. Be it a simple workflow rule that helps you navigate complex processes or a macro that saves your team a lot of time; share it here and help the community learn and grow with shared knowledge. 
    • Ask the Experts 7: A 5-hour online Q&A on Telephony and Call Module

      Welcome to Ask the Experts session! This is a monthly discussion in forums; each session, a panel of experts will take questions on specific topics related to Zoho Desk. The panel will be available for a 5-hour period and answer any questions posted here. In this month's Ask the Experts, we will take questions on everything related to Telephony and the Call Module in Zoho Desk. We will discuss the following aspects:  Integration with different Telephony vendors Routing calls to agents Converting
    • Recent Topics

    • How to easy change layout in existing records in Deals?

      Hello, So far i have used only 1 layout in Deals. I have about 1000 records. Now i want to make new layout. So i have 2 layouts: Layout Old (1000 records) Layout New (0 records) How to easy change layout from Layout Old into Layout New for existing records?
    • Location Lookup

      Hi Team, When I enter an address into the location field, there is no map address lookup happening. What setting have I missed that will get this working? Kind Regards John
    • Zoho Vault App for Windows

      Hello, is there a Windows app that can be used to access the passwords saved in Zoho Vault? Thank you
    • Zoho Payroll's Year in Review 2024

      As we roll into 2025, we'd like to pay tribute to all the milestones we hit in 2024! From releasing out new features that streamlined your workflows to updates that made payroll management smoother, we’ve had a prolific year—all while keeping you, our
    • Key Highlights of 2024: Recalling a Year of Progress and Advancements!

      As we step into 2025, we’re excited to share the progress and developments we’ve made to simplify and streamline your travel and expense management in the past year. Let’s take a look back at some of the key updates and enhancements that have helped us
    • Ticket Views: filter criteria -> dynamic date values in relation to the current date

      Hello all, It would be very helpful if you could build custom views in such a way that you do not have to adjust the criteria daily or at whatever interval in order to change the fixed date value as needed. For example, I would like to create a view that,
    • How can I understand in the search results which collection a note is in and how to immediately go to this collection?

      How can I understand in the search results which collection a note is in and how to immediately go to this collection? You can call the note properties window, but only the notepad is listed there. This is very inconvenient, especially when there are
    • Zoho Desk Validation Rule Using Custom Function

      Hi all, I tried to find the way to validate fields using custom function just like in Zoho CRM but to no avail. Is there a way to do this?
    • Is there a way to request a password?

      We add customers info into the vaults and I wanted to see if we could do some sort of "file request" like how dropbox offers with files. It would be awesome if a customer could go to a link and input a "title, username, password, url" all securely and it then shows up in our team vault or something. Not sure if that is safe, but it's the best I can think of to be semi scalable and obviously better than sending emails. I am open to another idea, just thought this would be a great feature.  Thanks,
    • Link Images to a Excel Report

      When I export to a spreadsheet. How do I get it to create a link that goes to my image. Right now it shows up in Excel as: /sharedBy/appLinkName/viewLinkName/fieldName/image/1510098844838_Image_07-Nov-2017_18_54_03.jpg
    • Possible to change Deal Stage via Deluge function in a Workflow automation when there's a Blueprint implemented for the pipeline?

      I've configured a Blueprint for my Deals module pipeline. I want to change the Stage value for a Deals module record through a Deluge function in a Workflow Rule, but I get this error message: "Deals record update response = {"code":"RECORD_IN_BLUEPRINT","details":{"api_name":"Stage"},"message":"Stage
    • Alert for Back Navigation in Zoho Creator Widgets on Mobile Apps

      In Zoho Creator widgets, when a user navigates back on mobile devices, the data within the widget is reset. This leads to a loss of any unsaved changes or inputs, causing frustration for users. To enhance user experience, we need to implement a confirmation
    • Limit excceding issue in zoho creator

      I am transferring data from Zoho Books to Zoho Creator using a Deluge script. However, I am frequently encountering a "limit exceeding error," which seems to be related to the Deluge statements limit. I reached out to Zoho Support, and they informed me
    • Explication sur comment mettre en place des règles d'affichage ou "layout Rules"

      J'ai passé plus d'une heure hier avec le support et je n'ai rien compris !! Je suis lecteur assidu des guides (je "RTFM") qui ne sont absolument pas orienté "client" chez Zoho, et je tiens à le rappeler ici . Dans la documentation on m'indique un cas
    • Create custom rollup summary fields in Zoho CRM

      Hello everyone, In Zoho CRM, rollup summary fields have been essential tools for summarizing data across related records and enabling users to gain quick insights without having to jump across modules. Previously, only predefined summary functions were
    • Matching ZOHO Payments in Banking

      Our company has recently integrated ZOHO Payments into our system. This seemed really convenient at first because our customers could pay their account balance by clicking on a link imbedded in the emailed invoice. Unfortunately, we can't figure out how
    • Projectic Specific Calendar Dates

      We are trying to create a project request form. One of the first fields is a multiple choice field that requests the user to select the type of project they are requesting. We are wanting to have a calendar view that changes the allowable dates to be
    • Off cycle pay run 10 day

      How would I go about running an off cycle pay run for 10 days? (Jan 1-10)? I have been trying to be in contact with support and we keep paying phone tag. I need to change my pay period from bi-weekly to weekly. This should be much easier than they are
    • Set another Layout as Standard

      We created a few layouts and we want to set another one to standard:
    • Values in multi pick list are not copied to copied deal

      Hi, After a deal is completed in our sales funnel we copy the deal to an automatically created new deal in our project funnel. All fields are copied properly, but only a Multi Pick List is not copied. How can we copy the selected values in this field
    • Change Last Name to not required in Leads

      I would like to upload 500 target companies as leads but I don't yet have contact people for them. Can you enable the option for me to turn this requirement off to need a Second Name? Moderation update (10-Jun-23): As we explore potential solutions for
    • Creation of Path and subpath

      In order to improve the structure of the website for better organization, I would like to consider that when publishing a page, it can be within a section and sub-section. For example, if I have an events option in the menu, I can put past events and
    • Kaizen #172 - Leveraging the 'crmAPIResponse' Object in Queries

      Hello everyone! Welcome back to another week of Kaizen! We released the Queries feature sometime back and hope you have tried it out. A little gist about this feature before we move on to our post. Zoho CRM's Queries feature enables dynamic data retrieval
    • "We’ve fine-tuned Zoho Inventory..."

      Every day I have this message at the top of my screen. I hit refresh everyday and then the next I see it again. What is being "fine-tuned" on a daily basis?
    • Default Sort Order in Project Tasks View

      It should be possible to specify a default sort order (or have the last explicit sort order restored upon reload) for the tasks in the project tasks view. Currently the sort order must be manually re-selected for each sub-group whenever any changes are
    • BIN Locations

      Hi, I’m new to Zoho inventory and unless Im missing something, I cannot find BIN locations anywhere in ‘items’? please tell me it’s there somewhere?!? Thanks
    • How to query for Deals record based on Pipeline?

      I want to query for Deals records that matches a specified Pipeline using a Deluge function. When I call zoho.crm.searchRecords("Deals","(Pipeline:equals:" + myPipeline + ")"), I get this error: { code: 'INVALID_QUERY' , details: {...} , message: 'Invalid
    • Status properties

      Hello, I created a new status called "Hold", but I want Zoho to recognize that when a project is on "Hold" the tasks will not appear as open and the deadlines will not show as delinquent. Basically, freezing the project until it's ready to start up again.
    • Need to change author's name in blog post

      My colleague wrote a blog post for our blog but when I put it on our site, the author's name automatically populated as mine. I contacted ZohoSupport and was told to change the Nickname in my profile. Well, I did and then ALL the blog posts were listed as being written by my colleague! Is there any way to simply change one blog post with the correct author's name?
    • Getting 401 Unauthorized while creating Ticket

      I'm getting 401 UnAuthorized  when I try to create a ticket using the Zoho Desk API. I am using using  OAuth2.0 for getting access token and generated accesstoken and used Desk.tickets.ALL as a SCOPE . Kindly help me to resolve this issue while creating
    • Rich-text fields in Zoho CRM

      Hello everyone, We're thrilled to announce an important enhancement that will significantly enhance the readability and formatting capabilities of your information: rich text options for multi-line fields. With this update, you can now enjoy a more versatile
    • What do the Image Sizes mean in Zoho CRM Email Templates?

      Below you can see the image options in email templates: Banner, Fit, Small, Medium, Original, Custom. Can someone from Zoho please share with me: What each is/means? How each will look on desktop AND mobile? How to edit "custom"? If I choose "Custom"
    • Marketing Automation : Adding to existing Lead Score

      I want to be able to add a score to an existing ZMA lead however I can't find the field in the "Fetch Lead" action that contains the existing score. There is an action for Add lead score, but that's not clear if it overwrites the existing value or adds
    • Zoho developer edition does not work for us

      Hi Is anyone else having this problem? I'm signed in with our admin/super user account. When I click on the link on this page: https://www.zoho.com/crm/developer/docs/dev-edition.html I am asked to agree to Terms and Conditions. Clicking Agree to Terms
    • Option to specify or disable "Idle" times in preferences

      It seems strange to me that my Cliq shows me as "Idle" when I'm using the PC and available just because I haven't interacted with Cliq in a while.  I'm far from "Idle" so we're just treating "Idle" and "Available" to mean the same thing.  I'd like to suggest a setting to change the timeout or even disable the automatic "Idle" mode.
    • Changing Color Theme of Guided Conversations

      Hello, We have recently added Guided Conversations to one of our websites, but I am wondering if there is a way to customize the color scheme so it matches the appearance of the website? Thank you in advance!
    • Is there a Kanban view of Tasks across all Projects?

      As the title indicates, I could use a Kanban view of my Tasks across my Projects. If it's there, I don't see it. If it isn't there, I'd like to submit this as a feature request. Thx.
    • Create Invoice and Invoice Items from Sales Order via API

      Currently, when creating an Invoice associated with a Sales Order via the API, it appears that I must manually include all of the items (line_items) even though they are already part of the Sales Order. My question is this: is it possible to raise an Invoice via the API based on all of the information associated with a Sales Order--such as the  items? In other words, do I always have to manually include the items (line_items) when raising an Invoice via the API when the Invoice is associated with
    • Stock Count - Does it really work?

      We have been trying to use the new Zoho Inventory stock count feature. It seems great at first glance.. ..but what we can't get our heads around is if a count doesn't match you can't simply set up a recount of those that are unmatched, which just seems
    • Working with keywords

      Hello everyone, first time here so I will try to be brief. I am working on my company's data set. I have a table with all the images we have on line. For each image we hava a cell tha contains all keywords related to that image. I would like to explore
    • Next Page