
{"id":18047,"date":"2024-04-22T18:27:00","date_gmt":"2024-04-22T12:57:00","guid":{"rendered":"https:\/\/www.vtiger.com\/blog\/?p=18047"},"modified":"2024-05-16T17:13:57","modified_gmt":"2024-05-16T11:43:57","slug":"vtiger-server-scripts-and-jobs-automate-tasks-by-creating-custom-workflows","status":"publish","type":"post","link":"https:\/\/www.vtiger.com\/blog\/vtiger-server-scripts-and-jobs-automate-tasks-by-creating-custom-workflows\/","title":{"rendered":"Vtiger Server Scripts and Jobs: Automate Tasks by Creating Custom Workflows"},"content":{"rendered":"\n<p>Do you use third-party applications to validate your email address, enhance lead information, or any other task?&nbsp;<\/p>\n\n\n\n<p>Businesses often use various external applications to carry out everyday repetitive activities or those unique to their business needs. What if I tell you that you can run a code on the CRM server to perform and automate these activities?<\/p>\n\n\n\n<p>Yes, you heard that right. Using the Vtiger Server Scripts functionality, you can write and execute code on Vtiger\u2019s server to perform these functions.&nbsp;<\/p>\n\n\n\n<p>Server scripting allows you to create custom code, and automate tasks without needing to modify the core CRM code.<\/p>\n\n\n\n<p>Let\u2019s deep dive into it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Defining Server Scripts and Jobs in Vtiger CRM<\/h2>\n\n\n\n<p><strong>Let us talk about Vtiger Server Scripts first.<\/strong><\/p>\n\n\n\n<p><a href=\"https:\/\/vcub.ly\/2Voun2in\" target=\"_blank\" rel=\"noreferrer noopener\">Server-side scripting<\/a> is a technique used in web development where the server executes and processes the scripts or commands, and then generates a response that is sent back to the client or user&#8217;s web browser. This is in contrast to client-side scripting, where the scripts are executed directly in the user&#8217;s web browser.<\/p>\n\n\n\n<p>Server Scripts are available in the Vtiger <a href=\"https:\/\/vcub.ly\/HYp7KiYx\" target=\"_blank\" rel=\"noreferrer noopener\">Workflows <\/a>and <a href=\"https:\/\/vcub.ly\/p5F1cIVq\" target=\"_blank\" rel=\"noreferrer noopener\">Approvals<\/a> settings. You can run a script to perform any action by selecting the Server Script option from the Actions Tab.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Server Script in Workflows<\/h3>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1920\" height=\"1080\" src=\"https:\/\/www.vtiger.com\/blog\/wp-content\/uploads\/2024\/04\/marketing-case-study-3-1.gif\" alt=\"\" class=\"wp-image-18086\" style=\"width:800px;height:auto\"\/><\/figure><\/div>\n\n\n<p>Consider the lead information in your CRM is limited to only name, contact details, and email addresses making it difficult to run targeted campaigns. To obtain in-depth information such as company names, and social profiles, you would typically need to invest a significant amount of time in manual research.&nbsp;<\/p>\n\n\n\n<p>However, by writing a server-side script, you can automate the process of populating lead records with missing information from external sources, thereby enriching the lead. This approach can save time and streamline the process of gathering valuable data.<\/p>\n\n\n\n<p>Similarly, you can execute code on the server to validate email addresses, update the credit score of a contact, and more.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Server Script in Approvals<\/h3>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"540\" src=\"https:\/\/www.vtiger.com\/blog\/wp-content\/uploads\/2024\/04\/Server-Scripts-and-Jobs-Blog-02-1024x540.png\" alt=\"\" class=\"wp-image-18054\" style=\"width:705px;height:auto\" srcset=\"https:\/\/www.vtiger.com\/blog\/wp-content\/uploads\/2024\/04\/Server-Scripts-and-Jobs-Blog-02-1024x540.png 1024w, https:\/\/www.vtiger.com\/blog\/wp-content\/uploads\/2024\/04\/Server-Scripts-and-Jobs-Blog-02-300x158.png 300w, https:\/\/www.vtiger.com\/blog\/wp-content\/uploads\/2024\/04\/Server-Scripts-and-Jobs-Blog-02-768x405.png 768w, https:\/\/www.vtiger.com\/blog\/wp-content\/uploads\/2024\/04\/Server-Scripts-and-Jobs-Blog-02-1536x810.png 1536w, https:\/\/www.vtiger.com\/blog\/wp-content\/uploads\/2024\/04\/Server-Scripts-and-Jobs-Blog-02-2048x1079.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>Server scripting can also be done to automate the approval process. For instance, after creating an invoice, a code can be written to send a message to the manager&#8217;s chat application, such as Google Chat or Telegram, requesting approval. So, once the invoice is created your manager will receive a notification automatically, thereby making the approval process more efficient.&nbsp;<\/p>\n\n\n\n<p><strong>So, what are&nbsp; Server jobs?<\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"540\" src=\"https:\/\/www.vtiger.com\/blog\/wp-content\/uploads\/2024\/04\/Server-Scripts-and-Jobs-Blog-03-1024x540.png\" alt=\"\" class=\"wp-image-18055\" style=\"width:645px;height:auto\" srcset=\"https:\/\/www.vtiger.com\/blog\/wp-content\/uploads\/2024\/04\/Server-Scripts-and-Jobs-Blog-03-1024x540.png 1024w, https:\/\/www.vtiger.com\/blog\/wp-content\/uploads\/2024\/04\/Server-Scripts-and-Jobs-Blog-03-300x158.png 300w, https:\/\/www.vtiger.com\/blog\/wp-content\/uploads\/2024\/04\/Server-Scripts-and-Jobs-Blog-03-768x405.png 768w, https:\/\/www.vtiger.com\/blog\/wp-content\/uploads\/2024\/04\/Server-Scripts-and-Jobs-Blog-03-1536x810.png 1536w, https:\/\/www.vtiger.com\/blog\/wp-content\/uploads\/2024\/04\/Server-Scripts-and-Jobs-Blog-03-2048x1079.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>Server Jobs in Vtiger are a set of commands on the server side that are executed at scheduled intervals. The time frequency can be hourly, weekly, or daily. Suppose you want to update stocks available to a data warehouse at 6:30 PM every day. You can write code, and the action will be triggered at the set time.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Difference between VTAP and Server Scripts<\/h2>\n\n\n\n<p>As someone who has been following Vtiger CRM for a long time, you may be curious about why there is a need for Server-Side Scripting when there is already a low-code platform called <a href=\"https:\/\/vcub.ly\/xs4mI0PW\" target=\"_blank\" rel=\"noreferrer noopener\">VTAP<\/a> available.&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>VTAP is a no-code platform that enables users to create custom business processes without writing code. It is client-side scripting software, where the code is written and executed in the user\u2019s browser to improve the user experience and interactivity of a website.&nbsp;<\/p>\n\n\n\n<p>Hence, the main difference between server-side and client-side scripting is that the former is done on the server and the latter on the client.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Benefits of Server-Side Scripting and Server Jobs<\/h2>\n\n\n\n<p>Some of the key advantages of using Server-Side Scripting and Jobs in Vtiger are as follows:<\/p>\n\n\n\n<p>1)&nbsp; <strong>Automation: <\/strong>Server-side scripting allows you to automate tasks that involve multiple steps or interactions with other systems. You can write a script for day-to-day activities and save significant time. This can reduce the risk of errors compared to performing tasks manually.&nbsp;<\/p>\n\n\n\n<p>With Server Jobs, you can schedule specific actions to run automatically, ensuring that important activities are done on time.&nbsp;<\/p>\n\n\n\n<p>2) <strong>Customization: <\/strong>Write custom code and extend the functionality of the CRM feature that is specific to your business. You can write custom codes to understand the lifetime value of a customer based on the purchase history or behavior, modify the way records are displayed on the User Interface (UI), etc. This level of customization can allow you to tailor workflows to ease the process.<\/p>\n\n\n\n<p>3) <strong>Security: <\/strong>Server-side scripting can be more secure than client-side scripting. This is because the code is run on the server, not on the client&#8217;s computer, so it can not be easily viewed or modified by users.<\/p>\n\n\n\n<p>Read our<a href=\"https:\/\/vcub.ly\/9MM4Jnrw\" target=\"_blank\" rel=\"noreferrer noopener\"> Server-side Scripting and Jobs User Guide <\/a>to learn more scripting, helper methods, and use cases.&nbsp;<\/p>\n\n\n\n<p>So, are you looking to streamline your business processes, reduce manual effort, and improve efficiency?&nbsp;<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><a href=\"https:\/\/vcub.ly\/wNv4f6HC\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"239\" src=\"https:\/\/www.vtiger.com\/blog\/wp-content\/uploads\/2024\/04\/Server-Scripts-and-Jobs-Blog-04-1024x239.png\" alt=\"\" class=\"wp-image-18056\" style=\"width:836px;height:auto\" srcset=\"https:\/\/www.vtiger.com\/blog\/wp-content\/uploads\/2024\/04\/Server-Scripts-and-Jobs-Blog-04-1024x239.png 1024w, https:\/\/www.vtiger.com\/blog\/wp-content\/uploads\/2024\/04\/Server-Scripts-and-Jobs-Blog-04-300x70.png 300w, https:\/\/www.vtiger.com\/blog\/wp-content\/uploads\/2024\/04\/Server-Scripts-and-Jobs-Blog-04-768x179.png 768w, https:\/\/www.vtiger.com\/blog\/wp-content\/uploads\/2024\/04\/Server-Scripts-and-Jobs-Blog-04-1536x359.png 1536w, https:\/\/www.vtiger.com\/blog\/wp-content\/uploads\/2024\/04\/Server-Scripts-and-Jobs-Blog-04-2048x478.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/div>","protected":false},"excerpt":{"rendered":"<p>Do you use third-party applications to validate your email address, enhance lead information, or any other task?&nbsp; Businesses often use various external applications to carry out everyday repetitive activities or those unique to their business needs. What if I tell you that you can run a code on the CRM server to perform and automate&hellip;&nbsp;<a href=\"https:\/\/www.vtiger.com\/blog\/vtiger-server-scripts-and-jobs-automate-tasks-by-creating-custom-workflows\/\" class=\"\" rel=\"bookmark\">.<span class=\"screen-reader-text\">Vtiger Server Scripts and Jobs: Automate Tasks by Creating Custom Workflows<\/span><\/a><\/p>\n","protected":false},"author":49,"featured_media":18050,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":"","neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","neve_meta_reading_time":"","_themeisle_gutenberg_block_has_review":false,"_ti_tpc_template_sync":false,"_ti_tpc_template_id":"","footnotes":""},"categories":[7],"tags":[],"class_list":["post-18047","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-automation"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Vtiger Server Scripts and Jobs: Automate Tasks by Creating Custom Workflows - Vtiger CRM Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.vtiger.com\/blog\/vtiger-server-scripts-and-jobs-automate-tasks-by-creating-custom-workflows\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Vtiger Server Scripts and Jobs: Automate Tasks by Creating Custom Workflows - Vtiger CRM Blog\" \/>\n<meta property=\"og:description\" content=\"Do you use third-party applications to validate your email address, enhance lead information, or any other task?&nbsp; Businesses often use various external applications to carry out everyday repetitive activities or those unique to their business needs. What if I tell you that you can run a code on the CRM server to perform and automate&hellip;&nbsp;.Vtiger Server Scripts and Jobs: Automate Tasks by Creating Custom Workflows\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.vtiger.com\/blog\/vtiger-server-scripts-and-jobs-automate-tasks-by-creating-custom-workflows\/\" \/>\n<meta property=\"og:site_name\" content=\"Vtiger CRM Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/vtiger\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-16T11:43:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.vtiger.com\/blog\/wp-content\/uploads\/2024\/04\/Server-Scripts-and-Jobs-Blog-Banner.png\" \/>\n\t<meta property=\"og:image:width\" content=\"3334\" \/>\n\t<meta property=\"og:image:height\" content=\"1250\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Megha Adityan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@vtigercrm\" \/>\n<meta name=\"twitter:site\" content=\"@vtigercrm\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Megha Adityan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Vtiger Server Scripts and Jobs: Automate Tasks by Creating Custom Workflows - Vtiger CRM Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.vtiger.com\/blog\/vtiger-server-scripts-and-jobs-automate-tasks-by-creating-custom-workflows\/","og_locale":"en_US","og_type":"article","og_title":"Vtiger Server Scripts and Jobs: Automate Tasks by Creating Custom Workflows - Vtiger CRM Blog","og_description":"Do you use third-party applications to validate your email address, enhance lead information, or any other task?&nbsp; Businesses often use various external applications to carry out everyday repetitive activities or those unique to their business needs. What if I tell you that you can run a code on the CRM server to perform and automate&hellip;&nbsp;.Vtiger Server Scripts and Jobs: Automate Tasks by Creating Custom Workflows","og_url":"https:\/\/www.vtiger.com\/blog\/vtiger-server-scripts-and-jobs-automate-tasks-by-creating-custom-workflows\/","og_site_name":"Vtiger CRM Blog","article_publisher":"https:\/\/www.facebook.com\/vtiger","article_modified_time":"2024-05-16T11:43:57+00:00","og_image":[{"width":3334,"height":1250,"url":"https:\/\/www.vtiger.com\/blog\/wp-content\/uploads\/2024\/04\/Server-Scripts-and-Jobs-Blog-Banner.png","type":"image\/png"}],"author":"Megha Adityan","twitter_card":"summary_large_image","twitter_creator":"@vtigercrm","twitter_site":"@vtigercrm","twitter_misc":{"Written by":"Megha Adityan","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.vtiger.com\/blog\/vtiger-server-scripts-and-jobs-automate-tasks-by-creating-custom-workflows\/#article","isPartOf":{"@id":"https:\/\/www.vtiger.com\/blog\/vtiger-server-scripts-and-jobs-automate-tasks-by-creating-custom-workflows\/"},"author":{"name":"Megha Adityan","@id":"https:\/\/www.vtiger.com\/blog\/#\/schema\/person\/67704b2319a01224ec0b8ba108cbf4d2"},"headline":"Vtiger Server Scripts and Jobs: Automate Tasks by Creating Custom Workflows","dateModified":"2024-05-16T11:43:57+00:00","mainEntityOfPage":{"@id":"https:\/\/www.vtiger.com\/blog\/vtiger-server-scripts-and-jobs-automate-tasks-by-creating-custom-workflows\/"},"wordCount":798,"publisher":{"@id":"https:\/\/www.vtiger.com\/blog\/#organization"},"articleSection":["Automation"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.vtiger.com\/blog\/vtiger-server-scripts-and-jobs-automate-tasks-by-creating-custom-workflows\/","url":"https:\/\/www.vtiger.com\/blog\/vtiger-server-scripts-and-jobs-automate-tasks-by-creating-custom-workflows\/","name":"Vtiger Server Scripts and Jobs: Automate Tasks by Creating Custom Workflows - Vtiger CRM Blog","isPartOf":{"@id":"https:\/\/www.vtiger.com\/blog\/#website"},"dateModified":"2024-05-16T11:43:57+00:00","breadcrumb":{"@id":"https:\/\/www.vtiger.com\/blog\/vtiger-server-scripts-and-jobs-automate-tasks-by-creating-custom-workflows\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.vtiger.com\/blog\/vtiger-server-scripts-and-jobs-automate-tasks-by-creating-custom-workflows\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.vtiger.com\/blog\/vtiger-server-scripts-and-jobs-automate-tasks-by-creating-custom-workflows\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.vtiger.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Vtiger Server Scripts and Jobs: Automate Tasks by Creating Custom Workflows"}]},{"@type":"WebSite","@id":"https:\/\/www.vtiger.com\/blog\/#website","url":"https:\/\/www.vtiger.com\/blog\/","name":"Vtiger CRM Blog","description":"Latest CRM Topics, Tips, Insights and Updates","publisher":{"@id":"https:\/\/www.vtiger.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.vtiger.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.vtiger.com\/blog\/#organization","name":"Vtiger","url":"https:\/\/www.vtiger.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.vtiger.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.vtiger.com\/blog\/wp-content\/uploads\/2023\/02\/vtiger-logo-only.png","contentUrl":"https:\/\/www.vtiger.com\/blog\/wp-content\/uploads\/2023\/02\/vtiger-logo-only.png","width":490,"height":399,"caption":"Vtiger"},"image":{"@id":"https:\/\/www.vtiger.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/vtiger","https:\/\/twitter.com\/vtigercrm"]},{"@type":"Person","@id":"https:\/\/www.vtiger.com\/blog\/#\/schema\/person\/67704b2319a01224ec0b8ba108cbf4d2","name":"Megha Adityan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.vtiger.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/468b5b152cf4415a14ed43a575c91954?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/468b5b152cf4415a14ed43a575c91954?s=96&d=mm&r=g","caption":"Megha Adityan"},"url":"https:\/\/www.vtiger.com\/blog\/author\/megha-avtiger-com\/"}]}},"_links":{"self":[{"href":"https:\/\/www.vtiger.com\/blog\/wp-json\/wp\/v2\/posts\/18047","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.vtiger.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.vtiger.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.vtiger.com\/blog\/wp-json\/wp\/v2\/users\/49"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vtiger.com\/blog\/wp-json\/wp\/v2\/comments?post=18047"}],"version-history":[{"count":18,"href":"https:\/\/www.vtiger.com\/blog\/wp-json\/wp\/v2\/posts\/18047\/revisions"}],"predecessor-version":[{"id":18087,"href":"https:\/\/www.vtiger.com\/blog\/wp-json\/wp\/v2\/posts\/18047\/revisions\/18087"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.vtiger.com\/blog\/wp-json\/wp\/v2\/media\/18050"}],"wp:attachment":[{"href":"https:\/\/www.vtiger.com\/blog\/wp-json\/wp\/v2\/media?parent=18047"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vtiger.com\/blog\/wp-json\/wp\/v2\/categories?post=18047"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vtiger.com\/blog\/wp-json\/wp\/v2\/tags?post=18047"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}