Kaizen #129 : Client Script Support for Blueprints

Kaizen #129 : Client Script Support for Blueprints

Hello everyone!

Welcome to another week of Kaizen. Today, let us discuss about how you can use Client Script during a Blueprint transtion to meet your requirements. This Kaizen post will provide solution for the post - Need non-mandatory fields in blueprint pop-up using Client Script.


In this Kaizen post,
  1. What is a Blueprint?
  2. Blueprint event in Client Script
  3. ZDKs and methods available in Client Script related to Blueprint
  4. Use Case - During a blueprint transition, show a pop up with fields that are not mandatory
  5. Solution
  6. Summary
  7. Related Links
  8. Kaizen Collection


1. What is a Blueprint?

Blueprint is an online replica of a business process. For instance, leads generation and follow-up, deals closure and order management. Each of these processes has several stages, and different teams may be responsible to complete each stage. At this point, one needs to take a moment to see if the CRM dictates how these processes should be executed. It captures every detail of your entire offline process within the software. Click here to know more about Blueprint in Zoho CRM.

Moving from one stage of a blueprint to the next stage  is called as Blueprint transition.

2. Blueprint event in Client Script

Whenever you want to meet your custom requirements in Zoho CRM before a Blueprint transition happens, you can use the beforeTransition event type available in Client Script. This event occurs before the transitions occur, as per the process flow designed in the Blueprint. You can add the "return false" statement at the end of the script to prevent the blueprint transition. Click here to know more about the events in Client Script.

3. ZDKs and methods available in Client Script related to Blueprint

Here is the list of ZDKs and methods using which you can code in Client Script.

ZDK.Page.getBlueprintTransitionByID()    -       You can get the blueprint transition by id.

ZDK.Page.getBlueprintTransitions().          -       You can get all the blueprint transitions in page.

getId()                                                            -       You can get the id of transition using Blueprint transition object.

getName()                                                     -        Get the name of transition using Blueprint transition object.

initiate()                                                         -        Initiate the transition using Blueprint transition object.


Click here to view the detailed documentation of ZDKs and methods related to Blueprint in Client Script.

4. Use Case

Zylker is a manufacturing organisation which uses Blueprint to manage the various updates in the status of Leads. Below is the blueprint configuration. For the transition "Gather details", the field  "Alternate Number" will be prompted as mandatory. Without entering this detail, the transition cannot proceed.



This is the existing Blueprint.
Now, the Admin wants to prompt the user to enter a value for the Alternate Number, but it should not be mandatory for the transition "Gather Details".

4. Solution

Currently in Blueprint the fields in the pop-up are mandatory. You can achieve non-mandatory fields in a pop-up using Client Script and update the values to that record. However you should not add the fields in the "During" phase of the "Gather Details" transition in Blueprint, to achieve this non-mandatory pop-up using Client Script. This solution will work for the requirement raised in this post.

For this,  you need to create a Client Script and use the "Before Transition" type of "Blueprint" Event.  



For more details on how to configure a Client Script, click here. Once you give the module and event details, you can see the Client Script IDE's Editor.



The argument "transition" will hold the the details of current Blueprint transition.

In the Client Script IDE, type the below script and click Save.

 if (transition.name == 'Gather details') {
// To show pop up and get the Alternate Number and update the 
//record's Alternate Number 
var var_alt = ZDK.Client.getInput([{ type: 'text', label: Alternate Number}], 'Give these details', 'OK', 'Cancel');

    if (var_alt != null) {

        var lead = ZDK.Apps.CRM.Leads.fetchById($Page.record_id);
        lead.alternate_number = var_phone.toString();
        var response = lead.__update();
    }

    else {

        ZDK.Client.showMessage('Details have been gathered successfully' });

    }

 
   $Client.refresh();// to refresh the page

}

The above script will get executed before every transition happens in the Blueprint. So, in the script, the code is added based on the transition name. As per the requirement, when the transition name is "Gather details" , you can show the pop-up through Client Script's getInput() function. Once you capture this value you can update the alternate number using the CRM API ZDKs. $Page.record_id will return the id of the current Lead record.

Here is how the Client Script works.



You can see that the transition happens even after the "Alternate Number" field is not filled by the user.


Note : 

1.  If you want to prevent a Blueprint Transition you need to add "return false" statement in the Script.      

2.  The blueprint event and the related ZDKs are  available only for Detail(Standard) Page and Detail(Canvas) Page
5. Summary

In this post, we have discussed,
  • About Blueprint events in Client Script.
  • The ZDKs and methods related to Blueprint.
  • How to configure a Client Script to trigger before a Blueprint transition
  • How to open a non - mandatory fields pop up before a blueprint transition
  • How to update current record using Update Records API through Client Script
  • How to refresh a page using Client Script
  • How to prevent a Blueprint Transition
6. Related Links
Kaizen Collection : 


Cheers!
Maadhari M








    Access your files securely from anywhere



                          Zoho Developer Community




                                                  • Desk Community Learning Series


                                                  • Digest


                                                  • Functions


                                                  • Meetups


                                                  • Kbase


                                                  • Resources


                                                  • Glossary


                                                  • Desk Marketplace


                                                  • MVP Corner


                                                  • Word of the Day


                                                  • Ask the Experts





                                                            Manage your brands on social media



                                                                  Zoho TeamInbox Resources



                                                                      Zoho CRM Plus Resources

                                                                        Zoho Books Resources


                                                                          Zoho Subscriptions Resources

                                                                            Zoho Projects Resources


                                                                              Zoho Sprints Resources


                                                                                Qntrl Resources


                                                                                  Zoho Creator Resources



                                                                                      Zoho CRM Resources

                                                                                      • CRM Community Learning Series

                                                                                        CRM Community Learning Series


                                                                                      • Kaizen

                                                                                        Kaizen

                                                                                      • Functions

                                                                                        Functions

                                                                                      • Meetups

                                                                                        Meetups

                                                                                      • Kbase

                                                                                        Kbase

                                                                                      • Resources

                                                                                        Resources

                                                                                      • Digest

                                                                                        Digest

                                                                                      • CRM Marketplace

                                                                                        CRM Marketplace

                                                                                      • MVP Corner

                                                                                        MVP Corner





                                                                                          Design. Discuss. Deliver.

                                                                                          Create visually engaging stories with Zoho Show.

                                                                                          Get Started Now


                                                                                            Zoho Show Resources


                                                                                              Zoho Writer Writer

                                                                                              Get Started. Write Away!

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

                                                                                                Zoho CRM コンテンツ










                                                                                                  Nederlandse Hulpbronnen


                                                                                                      ご検討中の方




                                                                                                            • Recent Topics

                                                                                                            • Making emails and notes private......

                                                                                                              Having experience using a plethora of CRM's I have noticed that this is one of the pitfalls of Zoho. Many notes and emails we want to add to Zoho we would like to make private or only visible to a set group of people.  The attached image from another CRM displays this feature.  While company policy at some firms could be that all information added to the CRM is public information.  This is a two way street.  Lots of companies have employees that are independent contractors in sales industries like
                                                                                                            • Search WorkDrive File Contents from Creator

                                                                                                              Good afternoon, I am building out a Creator app where I want to allow users to input search terms from Creator that will return the appropriate files that contain those keywords from their Creator search. Is this possible?
                                                                                                            • LinkedIn X-ray Search on Google

                                                                                                              Are there any workarounds or ways to extract mutliple Linkedin Profiles from a google Linkedin X-Ray search. My ideal would be copy the X-Ray search
                                                                                                            • How to send invoices to 2 emails?

                                                                                                              Hi! We are sending invoices to the "Customer email" field that is defined Zoho Books and is obtained/synced from a custom email field in Zoho CRM. But in some clientes, the invoices have to be sent to 2 emails and we are wondering how this could be accomplished.
                                                                                                            • 2 Ideas, Clone timesheet entry from monthly view and Notes in Weekly view

                                                                                                              While i love timekeeping I am finding some things slow me down.  Slow to the point of considering writing my own API call to do this. It would be so useful to be able to clone a timesheet entry from the monthly view.  It is somewhat painful to have to
                                                                                                            • Writing a single vendor check for multiple bills

                                                                                                              I need to be able to create a single payment for 15 to 75 bills.  We have a few vendors that bill us per transaction.  During our heavy sales season those vendors will send as many as 40 bills per day and we pay these bills weekly. The check wringing
                                                                                                            • Zoho CRM mobile: support for record images, predefined WhatsApp messages, and multi-select lookup field

                                                                                                              Hello Everyone We've made a few enhancements to the Zoho CRM mobile app to improve your experience. Here’s what’s new: Extended record image support for modules (Android) Predefined text support for WhatsApp messages (Android) Multi-select lookup field
                                                                                                            • Exciting Updates to the Kiosk Studio Feature in Zoho CRM!

                                                                                                              Hello Everyone, We are here again with a series of new enhancements to Kiosk Studio, designed to elevate your experience and bring even greater efficiency to your business processes. These updates build upon our ongoing commitment to making Kiosk a powerful
                                                                                                            • How can I bulk import product images to Zoho crm.

                                                                                                              How can I import product images to Zoho crm within bulk imports. I am using an excel sheet or csv and want to include an image (via URL) for each product. This topic is the closest I have found to a solution but I need further help to implement it: https://help.zoho.com/portal/en/community/topic/import-file-upload-and-image
                                                                                                            • Everything you want to share — in ONE link

                                                                                                              Hey everyone, Say hello to our very own link in bio tool – Linkthread is designed to create a single customizable link that contains everything you want to share with your audience on social media. Welcome to the Linkthread Community! What's Linkthread?
                                                                                                            • Zoho Customer Portal App for android is not compatible

                                                                                                              Trying to get client to install the app with their android phone but all the same which mention not compatible but IOS is working fine, anyone has the same issue and has alternative solutions?
                                                                                                            • Zoho Social vous présente Linkthread : un seul lien pour tout votre univers digital

                                                                                                              Nous sommes fiers de vous présenter Linkthread, la toute dernière solution signée Zoho Social. Cet outil repense la manière de partager vos contenus sur les réseaux sociaux, en offrant une expérience plus fluide, personnalisée et impactante. Pourquoi
                                                                                                            • Automatically restrict access to a sub-folder within a team folder

                                                                                                              I have a flow that creates a folder within a team folder and then it creates a handfull of sub folder within each folder that is created in this team environment. There is one folder that is created in this team environment that i want to restrict access
                                                                                                            • Task List Workflow Rule

                                                                                                              I'm having an issue when creating a workflow rule to notify customers by email of the project progress. I need the criteria to be TASK LIST STATUS not just task status. I don't want our customers getting too many email notifications throughout the project,
                                                                                                            • Using Zoho for Quarterly Forecasts and Tracking Sales

                                                                                                              Hi, I'm trying to set up Zoho to be useful for our company, and am finding it exceedingly difficult. We sell inexpensive products directly to a large number of accounts. All I want to do is to be able to make quarterly sales estimates, then track how
                                                                                                            • Presenting the brand new Zoho Bookings!

                                                                                                              Hello everyone, Greetings from Zoho Bookings! We're happy to announce a new version of our product with enhanced features to simplify scheduling, coupled with a sleek interface and improved privacy across teams. Here's what you can expect from the latest
                                                                                                            • Presenting ABM for Zoho CRM: Expand and retain your customers with precision

                                                                                                              Picture this scenario: You're a growing SaaS company ready to launch a powerful business suite, and are looking to gain traction and momentum. But as a business with a tight budget, you know acquiring new customers is slow, expensive, and often delivers
                                                                                                            • Adding Sender Address with Basic Plan

                                                                                                              According to the knowledge base, I should be able to add Sender addresses with the Basic Plan. But whenever I try to add an email, it takes me to a search window and I cannot find any emails in the list. Even mine, which is the admin. email.
                                                                                                            • 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
                                                                                                            • Payment for product renewal

                                                                                                              Good morning, I am requesting your kind assistance to renew my subscription because when I try to make the payment I get this way
                                                                                                            • Como puedo mover un prospecto "Cliente" de modulo

                                                                                                              Tengo un modulo llamado Seguimiento de Ventaa y otro llamado Cierre de Venta. Que cuando se marca como venta efectiva o venta no efectiva, pase a Cierre de Venta, Esto sin duplicarlo "Que esten en ambos modulos" ,Como esta en una base de datos "Excel"
                                                                                                            • Email with uppercase letters causes problem with portal

                                                                                                              Hello, When my customers register on a form, if they use uppercase letters in their email adress it causes problem with the portal. When I send the invitation for the portal, all letters are automatically modified in lowercase by the system, and when
                                                                                                            • How to make Deal field required for "Standard" layout and hidden in "Customer Portal" Layout?

                                                                                                              How to make Deal field required in tge "Standard" layout and hidden in "Customer Portal" Layout?
                                                                                                            • Introducing Color and Order Preferences for Blueprint Transitions

                                                                                                              Blueprints exist to improve the efficiency of your company's processes and ensure compliance — but only if your users follow them promptly. More often than not, your users may find it challenging to adopt your processes and follow through on them, especially
                                                                                                            • The Status in Zoho Finance is inaccurate

                                                                                                              We have many overdue invoices, but when we try to filter it by Status Overdue in the Zoho Finance Module it shows it as none This is also creating a problem when I need to Create a Chart or KPI for overdue Invoices If I open the Invoice I can see the
                                                                                                            • Permissions within a sub-folder

                                                                                                              Hi all, I am interested to know if it is possible to remove a member from a subfolder, even if he/she is member of a folder of higher hierarchy. As an example, let's assume I add 5 members in folder X with Edit privileges and folder X has several sub-folders, let's say X1, X2, ...., X1.1, X1.2, ... In this case, all 5 members inherit the same privileges to all sub folders. Is it possible to go and change the privilege in one of the subfolders? So far, I have not managed to do it. thank you, Sofoklis
                                                                                                            • Workdrive - permissions inside folders

                                                                                                              Is it possible to set folder permissions inside team folders that are different to the main folder? My specific case is so that I can share a team folder with my sales team, to access shared docs, but have one folder per user that are shared only with
                                                                                                            • Hide subfolders in a team folder

                                                                                                              Hello, I am starting to use Zoho WorkDrive to manage files and I find the need to restrict access to a subfolder in the team folder for some users until all of the documents in it are ready to be printed. However, I do not want to create separate team
                                                                                                            • Introducing WhatsApp Marketing with Zoho Marketing Automation

                                                                                                              Dear Marketers, In the world of marketing, personalizing engagements with customers is often exhaustive but—thanks to WhatsApp—not exactly mysterious. WhatsApp has evolved from a simple messaging platform to a sophisticated tool for sending out marketing
                                                                                                            • Zoho Creator delete validation seems like does not support <br> html code

                                                                                                              Validation Workflow in Create or Edit, We can use this styling code eg: <br>, <b>, <u> Those very simple code in those validation (in Create or Edit) But, for Validation (In Delete) Zoho Creator seems like does not support it. The alert task just shown
                                                                                                            • Data Model - CRM Adjusting size of Entity boxes

                                                                                                              (Sorry if duplicate, previous post seems to have disappeared.) I am viewing the Data Model for CRM, and while it is great to see such a model, there is an obstacle. Many of the entities show only a subset of their fields. The entity boxes have scrollbars
                                                                                                            • Mapping a new Ticket in Zoho Desk to an Account or Deal in Zoho CRM manually

                                                                                                              Is there any way for me to map an existing ticket in Zoho desk to an account or Deal within Zoho CRM? Sometimes people use different email to put in a ticket than the one that we have in the CRM, but it's still the same person. We would like to be able
                                                                                                            • Zoho CRM - Analytics: How Can I Set Monday as First Day of The Week?

                                                                                                              Hello, In the analytics section of our Zoho CRM (not Zoho Analytics), we would like to track our SDRs' outreach activity. However, it appears that Zoho CRM treats Sunday as the first day of the week for the "This Week" and "Previous Week" filters. How
                                                                                                            • Location functionality now deletes bundle information if changed

                                                                                                              With the introduction of Locations, we are experiencing several issues. 1. When bundling an item, the 'default' is to the organisation, not a location. This is not a significant issues, other than when you change the value, any batch tracking information
                                                                                                            • Improved RingCentral Integration

                                                                                                              We’d like to request an enhancement to the current RingCentral integration with Zoho. RingCentral now automatically generates call transcripts and AI-based call summaries (AI Notes) for each call, which are extremely helpful for support and sales teams.
                                                                                                            • Is Zoho Abandoning Zapier Integrations in Favor of Flow?

                                                                                                              I recently invested in a paid Zapier account to automate key parts of my Zoho workflows, but I’m hitting roadblocks. Zoho’s automation tool, Flow, clearly gets the lion’s share of development effort, and their Zapier connectors feel neglected. When I
                                                                                                            • Zoho Flow y subformularios de Zoho CRM

                                                                                                              Buenas tardes, En mi empresa vamos a empezar a usar los subformularios de zoho crm pero estos los voy a tener que rellenar con zoho flow ya que va a ser el encargado de rellenar dichos campos del subformulario. El problema es que a la hora de intentar
                                                                                                            • FSM Job Sheets data to CRM

                                                                                                              Hello, is there anyway of getting the data collected in the job sheets into the CRM. We are collecting inspection data which we were using zoho forms for but the job sheets in fsm seem like a lot better way to collect it but we need to be able to get
                                                                                                            • Bookmark order

                                                                                                              Hi all, We have a very big document/template that requires manual editing after doing a mail merge. To make this easier, I thought I would add bookmarks to navigate to the areas that will require editing. I thought these would be in order that they appear
                                                                                                            • Zoho Bookings API, timezone is not recognized when passed

                                                                                                              Has something changed? Time zone is being passed through API but it is NOT being recognized. response is not showing time zonetime that was passed through request. This is an URGENT issue as it is preventing bookings! Seems like this is due to a recent
                                                                                                            • Next Page