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!

    Zoho Campaigns Resources

      Zoho Desk Resources

      • Desk Community Learning Series


      • Digest


      • Functions


      • Meetups


      • Kbase


      • Resources


      • Glossary


      • Desk Marketplace


      • MVP Corner


      • Word of the Day


        • 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

        Zoho CRM Plus Resources

          Zoho Books Resources


            Zoho Subscriptions Resources

              Zoho Projects Resources


                Zoho Sprints Resources


                  Zoho Orchestly Resources


                    Zoho Creator Resources


                      Zoho WorkDrive Resources



                        Zoho CRM Resources

                        • CRM Community Learning Series

                          CRM Community Learning Series


                        • Tips

                          Tips

                        • Functions

                          Functions

                        • Meetups

                          Meetups

                        • Kbase

                          Kbase

                        • Resources

                          Resources

                        • Digest

                          Digest

                        • CRM Marketplace

                          CRM Marketplace

                        • MVP Corner

                          MVP Corner




                          Zoho Writer Writer

                          Get Started. Write Away!

                          Writer is a powerful online word processor, designed for collaborative work.

                            Zoho CRM コンテンツ






                              ご検討中の方

                                • Recent Topics

                                • Editing data in Related List tables

                                  Hi, we have a related list table showing many quotes on our Client record. At present, we have to edit each quote record by entering each record and then going back to the Client record. Is there a way to edit the various fields shown in the related list
                                • Directly Edit, Filter, and Sort Subforms on the Details Page

                                  Hello everyone, As you know, subforms allow you to associate multiple line items with a single record, greatly enhancing your data organization. For example, a sales order subform neatly lists all products, their quantities, amounts, and other relevant
                                • Is there a API to fetch tasks in a Board/Section

                                  I am writing a scheduled function that retrieves all the tasks and send an reminder on cliq. I cannot seem to find a API to fetch tasks (by user / board / section) What are the way to fetch tasks?
                                • Zoho Books - uploading company logo squashed

                                  I am trying to upload my company logo with the following dimensions - 240 x 240 pixels and a file size of 106Kb. When I look at the logo in my invoices, it is squashed and not the right size. Any idea what is going on? I've tried uploading jpeg and png
                                • Streamline Custom Dashboards

                                  I'd like every brand have the same dashboard. Is there a way to streamline them so every brand has one? Or that I can use the same dashboard from another brand?
                                • Integrate MS Teams with Zoho CRM for faster collaboration

                                  Availability Editions: Standard and above DCs: All Release status: This feature has been released for all users in all DCs. Help resource: Microsoft Teams integration Hello everyone, We're adding MS Teams to our lineup of CRM chat integrations—Cliq, Slack,
                                • Easy way to delete attachments

                                  I've reached my data limit and would like to run a view/report, and mass delete attachments. Is there an easy, fast way to do this? Moderation Update: Post Summary: There are two features the post discusses a) Easy way to remove Email attachments Will
                                • Ho to restrict access to row level to Zoho Analytics users

                                  Let me explain the scenario we are trying to achieve. We have an online system our team members work with. On it we have 6 users that manage data from different areas (North, South, East and West). We would like to transfer this information to a Zoho
                                • Remove the link between app admin roles and org admin privileges

                                  Greetings Zoho One Team, Currently, assigning someone as an admin in certain Zoho apps, such as Cliq, Connect, Mail, Vault, or Forms (and maybe other apps as well) automatically grants them org admin privileges, even though they are not listed as org
                                • Standalone function is not working

                                  Hi, We have created a standalone function to integrate with a third-party service using OAuth. However, the standalone function's REST API key is expiring automatically after some time. When we regenerate the API key from the admin account, the function
                                • All Deluge environments draggy! Negatively impacting productivity

                                  Hello, I have been using Zoho flow, CRM, Project, etc to develop custom functions, integrations. etc. for over 5 years. However, just about 3 days ago, I observed the deluge integrated environment is now acting draggy across all Zoho products using Chrome
                                • Pass json to ZDK.Client.openMailer TO parameter

                                  Hello I try to make send emails to a list of emails with : ZDK.Client.openMailer({ from: 'example@zoho.com', to: details_output, subject: 'test Mailing List', body: 'Test Mailing List Body' }); where details_output is an array like : [{ "email": "testcarte18078@test.com",
                                • How to remove banners at the top of email web page

                                  Every day, I find valuable screen real estate being consumed by Zoho advertising themselves at the top of my email web page. I can dismiss that "announcement", but something else will come back the very next day. How do I permanently dismiss them as 99%
                                • My domain provider does not support to DKIM records

                                  My domain provider does not support to DKIM records in zoho mail. It does not allowed underscore in a TXT name but zoho had provide DKIM records already with an underscore This is the zoho provides But my domain provider does not allowed
                                • Zoho email experiencing delay when receiving emails from AWS SES

                                  When sending an email from our SES, our non-Zoho email is receiving emails almost instantly with a 1-2 min delay, however, the zoho email we send to is experiencing delays from 3-4 hours and sometimes dont recieve them at all. Any idea what might be going
                                • How to listen to ticket change

                                  Hello community, I created a widget, which checks all departments, if the user has written there as well, as some customer do this. Overall it works fine, except that I have to refresh the widget tab every time I go to another ticket. How can I listen
                                • Filter report using dynamic filter using function not working

                                  Hi - I am trying to dynamically filter a report as follows: when I save the filter it looks like this: However when I run the report it is not returning results as I expect. I have tested the function. If I copy and paste the output of the function and
                                • Did you know you can secure your content with Zoho Writer?

                                  Sometimes you need to protect certain parts of your content to conceal sensitive information or prevent changes to important sections of a document. Zoho Writer offers several tools for securing content to help maintain privacy, security, and confidentiality
                                • Webhook when estimate is refused is not firing

                                  Hello, I use a workflow through make that sends estimate with zoho books (I paid books and sign). -Those estimates when accepted are firing the webhook that I create in zoho sign (photo 1) -However when refused they are not firing the webhook that I created
                                • How to add coloring on List Reports

                                  Hi guys, I would like to add colors to List reports. Is there an option to apply table colors other than using the custom layout? Thank You!
                                • How do I delete a test email address to which I am supposed to send a test email?

                                  How do I delete an email address added to a test email recipient that is no longer needed due to resignation or other reasons?
                                • Formula fields - Request for dynamic recalculation / proper implementation

                                  Hi Guys, I have a big problem with Zoho formula fields. They don't recalculate each time the record is viewed - only when a record is edited. Formula fields should be updated dynamically each time a record is retrieved. As an example: I have a formula
                                • 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
                                • Creating smart filters manually

                                  Hi Team, One of my colleagues accidentally deleted the Notification folder in Zoho Mail. Now all the emails are directing to spam instead of inbox. Is there any way to create the smart filter manually?. With Regards, Logeswar V
                                • Is there a way to get Guided Conversation responses to appear on a ticket?

                                  Hello When using the Create Ticket block, is there a way to save all of the responses the user has inputted on the ticket once it's been made?
                                • Tickets Assigning Automation

                                  I am trying to build a bot which can automatically assign the tickets to the concerning team as of now we have a dedicated person who read the emails, understands the query and then assign it to the dedicated team. I have built an prototype of the same
                                • PDF API FROM ZOHO CREATOR DELUGE SCRIPT

                                  Hi I am in need of using a PDF Api to compress and Merge PDF files from zoho creator. Any support on this would be really helpfull any sample code for any PDF API would be extremely heplfull
                                • Zoho Desk using APIs

                                  We have generated the necessary tokens and successfully executed the following calls: • List all tickets • Get a ticket • Create a ticket We have encountered difficulties when attempting to perform searches using the APIs related to SEARCH, as it returns
                                • Knowledge Base - Import PDF/Doc

                                  Our company already has guides and manuals in PDF/word format. Is there a way to directly important these as articles for our customer portal? When doing a copy/paste the formatting gets a little skewed and images don't post over either. 
                                • Paid Support Plans with Automated Billing

                                  We (like many others, I'm sure) are designing or have paid support plans. Our design involves a given number of support hours in each plan. Here are my questions: 1) Are there any plans to add time-based plans in the Zoho Desk Support Plans feature? The
                                • Credit Card Terminal for Zoho Books

                                  Hello, Instead of punching the credit card number manually for customer payment, do you have a third-party hardware credit card reader that works with Braintree? Thank You
                                • Checklist/ save to onedrive/ a group of items invoicing in Zoho FSM

                                  hi, is there a way to add a specific checklist to any WO without passing eachtime by the model customization? can we save file such picture directly in our sharepoint ak onedrive? is there any way to add a group of item pre defined to make invoicing easier
                                • Splitting a List into different rows

                                  I am getting a List from a for each loop. But I can't figure out how to separate each item that is separated by a comma. Example Zone 1 - Front Door,Zone 2 - Rear Door,Zone 3 - Side Door I need it too look like this: Zone 1 - Front Door Zone 2 - Rear
                                • This domain is not allowed to add. Please contact support-as@zohocorp.com for further details

                                  I am trying to setup the free version of Zoho Mail. When I tried to add my domain, theselfreunion.com I got the error message that is the subject of this Topic. I've read your other community forum topics, and this is NOT a free domain. So what is the
                                • Zoho Analytics - CRM Sync Failure

                                  We have experienced consistent sync failures between our Zoho CRM and Analytics apps, but there aren't any details provided as to why this failure might be occuring. Please advise on troubleshooting steps so we can figure out how to restore the sync.
                                • Setup Leave Policy which increases based on years of service

                                  Please confirm if this is correct. Effective after 0 days of employment, Opening Balance is 6 days. Valid only for the first year of employment and Accrual and Reset are disabled. Effective after 1 year of employment, Opening Balance is 10 days. Valid
                                • Zoho Books Price list associated to a cusomer

                                  how we can associate a price list to a costumer? pls don't send me to your FAQ section (Associating Price List to a Customer:: Knowledge Base | Zoho Inventory) nothing it's explained and there no place where we add price list to a customer
                                • How to create Sepa Direct Debit XML file: solution and code

                                  Even though Books provides a payment integration for Stripe and Gocardless (in Europe) there are customers that want to use the Sepa services of their own bank. Mainly because Stripe and Gocardless are quite expensive. In that case they would need a Sepa
                                • Why can't I see the email from Zoho Campaigns Automation under Zoho CRM Leads module?

                                  I recently did update the field mapping on our Leads sync services between Zoho CRM and Zoho Campaigns. The end goal is to create tailored email drip campaigns with the use of segments and automation. I understand you can build cadences, email templates,
                                • Zoho Payments integration

                                  What are you going to get Zoho Payments integrated with Zoho Forms? It's kind of embarrassing to have several payment options... but not your own, which has been out for quite a while.
                                • Next Page