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



                                          Zoho Marketing Automation


                                                  Manage your brands on social media



                                                        Zoho TeamInbox Resources

                                                          Zoho DataPrep 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

                                                                                                  • Tip #10: Various time zone settings on the bookings page

                                                                                                    Managing appointments across different time zones has become an integral part of our daily lives. Whether you're arranging a global business meeting or expanding your consultations to other countries, the ability to adapt to various time zones is crucial.
                                                                                                  • Canva Integration

                                                                                                    Hello! As many marketing departments are streamlining their teams, many have begun utilizing Canva for all design mockups and approvals prior to its integration into Marketing automation software. While Zoho Social has this integration already accomplished,
                                                                                                  • Issues with Calendar .ics Files Attached in Customer Email Notifications

                                                                                                    Hello, Thank you for recently adding .ics files as attachments in confirmation emails generated by Zoho Bookings; however, it seems that there are some issues with the new feature, particularly in the email notifications sent to customers: If a booking
                                                                                                  • Zoho Assist no longer works using VPN

                                                                                                    I have been using Zoho assist for a bit longer than a year. I have been using the VPN Private Internet Access for even longer.  For the first year of using Zoho assist I could remote into a pc, turn on a vpn, it would disconnect but then reconnect my
                                                                                                  • How to edit a cancellation reason

                                                                                                    We are trying to improve our cancellation reasons so we can better understand why customers are cancelling. Our list of reasons has improved as we have studied the matter. I would like to update the reasons for past cancellations, but I can't find anyplace
                                                                                                  • Kiosk can't merge picklist or multiselect

                                                                                                    There is no ability to load a multiselect or picklikst field into a kiosk with the values that have been previously selected. So, I essentially have 3 unacceptable options: 1.)Load the value into a text string and include instructions like this: "Picklist
                                                                                                  • Can we turn off archiving views?

                                                                                                    Is there a way to turn off view archiving? Some views aren't used regularly, and archiving may force us to recreate them.
                                                                                                  • How do you send an email to a customer from Zoho Desk?

                                                                                                    I have pulled up a customer record and I click the email icon and the email address, nothing happens.... Email attached of where I am.  Is there a different way to send an email?
                                                                                                  • Downloading Image from Subform using Deluge (invokeUrl) - Data Mismatch / Connection Issues

                                                                                                    Hi Zoho Community, I'm struggling to download an image from a subform in Zoho Creator using Deluge and then attach it to a Zoho CRM Deal record. I've been working on this for a while, and I'm encountering issues that I believe are related to either data
                                                                                                  • Why hasn't Zoho CRM For Everyone been rolled out?

                                                                                                    I don't understand the point of rolling out new features so slowly after a big fanfare launch 8 months ago. I've signed up for 'early access' and also contacted my point of contact, but nothing. Not even an auto reply. Would you say that this is good
                                                                                                  • WorkDrive API Documentation

                                                                                                    WorkDrive provides users and developers an extensive set of APIs to help integrate functionalities of Zoho WorkDrive with other Zoho applications and third-party tools. We have published the official WorkDrive API Documentation page for all external users.
                                                                                                  • Announcing Early Access to "Zoho CRM for Everyone" — A new and exciting update to Zoho CRM

                                                                                                    We are delighted to announce an Early Access to Zoho CRM for Everyone— a truly democratic approach to managing a CRM, gift-wrapped in an exciting and intuitive user interface. Here, multiple teams across an organization can coordinate among each other
                                                                                                  • Notification sender email is coming from Zoho, not from my domain

                                                                                                    Hello, I have Zoho Desk configured to use "From address" as my domain support email i.e. support@ mydomain.com (email is verified) , we send automatic notification to contact (customer) when they submit a new ticket. Yet the notification email is sent
                                                                                                  • Recovering deleted notebook

                                                                                                    I am not sure what happened to one of my notebooks, might of deleted it. I did empty the trash without looking. Is there a way of recovering it?
                                                                                                  • Which WhatsApp API works seamlessly with Zoho CRM?

                                                                                                    I’m exploring WhatsApp API solutions that integrate seamlessly with Zoho CRM for customer communication, lead nurturing, and automation. I would love to hear insights from those who have successfully implemented WhatsApp within Zoho CRM. My Requirements:
                                                                                                  • Auto Reply on Zoho Desk

                                                                                                    Can we set an Auto Respond to every email that Zoho Desk receives? Is there a way that any of the information in the original email can be pulled through to that reply? Like a mail merge?
                                                                                                  • Re-create auth token

                                                                                                    I need to re-create a self-client auth token, with the same scopes (and additional ones) as the current token. Is there a way to view the scopes assigned to the current token to ensure that no scopes are missing when creating the new one?
                                                                                                  • Client Can't View Ticket

                                                                                                    Hi, I created a ticket for my Client since he had an issue. I added him as a Contact as well. My client got a notification in his email that the ticket has been created. When he went to view the ticket on his desktop, the screen was blank. He then viewed
                                                                                                  • Boost Customer Experience: Let Visitors Choose Their Preferred IM Channel in Your Chat Widget

                                                                                                    We have an exciting enhancement coming your way. Pushing the perimeter has always been our thing, and we have come up with yet another enhancement for your Zoho SalesIQ live chat. Did you know your live chat can support more than chats and calls? That's
                                                                                                  • Re-emphasizing the importance of Domain Whitelisting in ASAP's JWT Authentication Mechanism

                                                                                                    The problem We discovered a security vulnerability related to using OAuth tokens in non-whitelisted domains and have reinforced our security measures. If you experience any request failures in the authorized domains, please verify that they are whitelisted
                                                                                                  • Issue Saving Workflow Rule – "Unable to Process Your Request" Error

                                                                                                    Dear Zoho Recruit Support Team, I am experiencing an issue while trying to integrate a new rule into a workflow. Specifically, I am setting up a Follow-Up workflow for applicants, where a user is assigned based on specific requirements. However, when
                                                                                                  • Introducing Booking Pages—a topping for your Calendar Scheduling needs!

                                                                                                    Greetings, We're here with a new topping for Bigin! Let's dive into the details. What does this topping do? Scheduling appointments with customers is one of the most common challenges small businesses face on a daily basis, as it often involves frequent
                                                                                                  • Multiple Blueprints on different fields at the same time.

                                                                                                    It looks only 1 Blueprint can run at the same time, it makes sense for many Blueprints on the same field (Eg. Stage). But what about multiple Blueprints on "different" fields? the multiple options must be available. (Eg. Stage, Documents Status, Contract
                                                                                                  • Chat window do not auto scroll on Firefox for mobile.

                                                                                                    The chat window doesn't auto-scroll when typing, and the phone's keyboard covers what the visitor is typing until they manually scroll. This happens in Firefox for both Android and iOS, regardless of the device. It's not a good user experience as you
                                                                                                  • More admin control over user profiles

                                                                                                    It's important for our company, and I'm sure many others, to keep our users inline with our branding and professional appearance. It would be useful for administrators to have more control over profile aspects such as: Profile image User names Email signatures Themes  Although we can guide our users on the branding style they should adhere to, administrators really don't have any control over user profiles once they have been created.  At this stage I will have to spend time going in to each Zoho
                                                                                                  • Zoho CRM's new Homepage component: See all your activities in one powerful view!

                                                                                                    Hello everyone, We’re excited to introduce a new feature to your CRM dashboards: the Homepage Open Activity Component! Now you can effortlessly track all your open activities—including tasks, meetings, calls, and appointments—in a unified view, tailored
                                                                                                  • Customer Parent Account or Sub-Customer Account

                                                                                                    Some of clients as they have 50 to 300 branches, they required separate account statement with outlet name and number; which means we have to open new account for each branch individually. However, the main issue is that, when they make a payment, they
                                                                                                  • Identifying a collegue in remark section - Zoho CRM

                                                                                                    When I mention my colleague in the Remarks section (Contact CRM), she should receive an email notification. However, I receive them, but she does not. How can she enable notifications? Thanks!
                                                                                                  • New Agent Creation - Not Receiving Activation Email

                                                                                                    I created multiple new agents within Zoho Desk with no issue. Everyone one of them received the activation email except one. The email is correct and confirmed multiple times. It is not located in the Spam folder. I withdrew the activation and recreated
                                                                                                  • Introducing Screening Bot for pre-screening automation

                                                                                                    We’ve transformed the chatbot experience in Zoho Recruit! What was once a general Chatbot for sourcing is now a streamlined system with dedicated tools. The original chatbot has evolved into the Sourcing Bot, while the newly introduced Screening Bot simplifies
                                                                                                  • How to Initiate WhatsApp Message on SalesIQ?

                                                                                                    I've just activated a Business WhatsApp phone number through SalesIQ because of its touted omnichannel chat approach. Sounds exciting. I understand that when a customer sends me a WA message, I can reply to it on SalesIQ and keep the chat going, perfect.
                                                                                                  • WorkDrive Download Issue

                                                                                                    My client has been sending me files via WorkDrive, which generally has worked fine. Recently files won't download at all. If you try and individually select and download a file, a popup will appear in the bottom right saying it's preparing and then it
                                                                                                  • Zoho Custom

                                                                                                    Hi guys, is there a way that you can give the client a simple login area without the advert of ZohoCRM and other ad as the free one, if so which which one comes with this customisation. Thanks
                                                                                                  • How to get NSE/BSE Stock Prices in Zoho sheets?

                                                                                                    I've been looking for a function that provides me with the NSE/BSE listed stocks price in Zoho Sheets like GOOGLEFINANCE in Google sheets, but I found none. Please help if there is any way to het stock prices?
                                                                                                  • Comment Reactions like a Thumbs Up

                                                                                                    Can we please have the ability to emoji react on comments or at the very least, thumbs a comment up? Literally every other project management system out there can support this and it is very much needed to just acknowledge a comment instead of completely
                                                                                                  • Feature Request – Auto-Save Draft for Interview Assessments

                                                                                                    Hello Zoho Recruit Team, I’d like to suggest a feature that would be incredibly helpful for recruiters conducting multiple interviews. Currently, when filling out an Interview Assessment, there is no option to auto-save progress as a draft. At times,
                                                                                                  • Different timezone for users

                                                                                                    Is it possible for users to set a different timezone for themselves? We have staff in different locations.   Thanks!
                                                                                                  • Attachment Template as PDF from Another Form Zoho Creator

                                                                                                    Hi Everyone, have a good day. I have question, below my script for put the attachment into email. But my template PDF from another form ("Form B"). I get errror because template PDF not exist in the form "Alasan Reject". The form name for example "Form
                                                                                                  • Reopen and Continue WhatsApp Chats within 24-Hour Window

                                                                                                    Dear Zoho SalesIQ Team, I'm writing to request a new feature that would enhance WhatsApp communication management within the 24-hour window: the ability to reopen and continue conversations with customers after a chat has been closed from our end. Current
                                                                                                  • Accessing Extension Created Functions

                                                                                                    Good day. I have recently been attempting to access a function from an extension that is installed on my crm in a standalone function I have created with deluge on Zoho CRM, however I have not managed to get this to work. I am attempting to send an SMS
                                                                                                  • Next Page