Articles in this section
Server Scripts & Jobs Overview
Table of Contents
Introduction
Server Scripts and Jobs empower you to craft server-side scripts for executing diverse tasks. Often there arises a necessity for customized processing on the server, either triggered by record updates or scheduled intervals. This module empowers Vtiger users to author server-side scripts for executing diverse tasks. Through this capability, users can enact custom actions upon record saving or upon approval or rejection. Moreover, they can devise bespoke background tasks to execute at predetermined intervals.
Use Cases
- Validate contact email addresses.
- Enhance lead information.
- Retrieve customer credit scores from an external service and synchronize with CRM.
- Execute actions based on business rules if it's a weekend.
- Periodically import leads from external sources.
- Adjust data in parent records according to child records or vice versa based on business rules.
- Create or update related records by merging CRM data and data from external source
- Transmit CRM data to a warehouse.
- Integrate AI-powered customer sentiment analysis for feedback analysis.
This module provides two ways to trigger these server-side codes Server Scripts and Server Jobs.
Server Scripts
These are server-side codes executed when a certain action happens. For example, a record is saved or is approved or rejected. They should be used for lighter operations like updating some field values based on complex business logic.
- These are triggered when a record is saved, approved, or rejected, usually set up within workflows, processes, or approvals.
- They receive both the data of the record being saved and user information.
- Tasks include updating record data based on complex logic, creating records in other modules, or sending emails through external services.
- Field values changed in the record data through code get updated back in CRM like an update field action.
- They execute immediately and can slow down record saves if they take too long.
For more details refer to Server Scripts documentation.
Server Jobs
These are server-side codes executed at fixed intervals. They should be used for heavy and periodic operations.
- These are background tasks that run at scheduled intervals (like hourly, daily, or weekly).
- They don't receive user or record data but run under the owner user's context.
- Useful for heavy and periodic tasks such as fetching data from external services or sending data to them.
- They operate in the background without blocking CRM operations.
- Scheduled and executed by a service, which manages its load and returns results to the CRM after execution.
For more details refer to Server Jobs documentation.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Edition Limits
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|