Sample script implementation

Sample script implementation

Configuring the Script: Auto-Resolve and Close Request

This script automatically applies a default resolution and closes the request. With the Import Sample Script feature, setup is quick and requires no manual coding.


1. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Request.

  2. Click Import Sample Script.

  3. From the list, select  Add Resolution and Close Request

  4. Save the function.


2. Configure with Custom Triggers

To run the script when specific conditions are met:

  1. Go to Admin → Automation → Custom Triggers.

  2. Select the Request module.

  3. Click New Trigger.

  4. Define the trigger conditions (e.g., Status = Resolved).

  5. Under Actions, choose Execute Custom Function → Auto-Resolve and Close Request.

  6. Save the trigger.

  7. Refer to the screenshot



Example Use Cases

  • Automatically close simple or repetitive tickets once marked as resolved.

  • Applying a standard resolution note for low-effort requests.

  • Streamlining repetitive closure tasks to improve technician productivity.


Configuring the Script: Add Default Work Log

This script automatically adds a predefined work log entry to a request. Using the Import Sample Script feature, you can enable it without writing or pasting any code.


1. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Request.

  2. Click Import Sample Script.

  3. From the list, select  Add Default Work Log.

  4. Save the function.


2. Configure with Custom Triggers

To run the script when specific conditions are met:

  1. Go to Admin → Automation → Custom Triggers.

  2. Select the Request module.

  3. Click New Trigger.

  4. Define the trigger conditions (e.g., Status = InProgress).

  5. Under Actions, choose Execute Custom FunctionAdd Default Work Log.

  6. Save the trigger.

  7. Refer to the screenshot



Example Use Cases

  • Automatically log time when requests move to In Progress.
  • Add a default troubleshooting entry for common tickets (e.g., "Performed basic checks").

  • Ensure consistent work log entries for compliance or reporting purposes.


Configuring the Script: Validate Resolution Content

This script validates the resolution field and prevents request updates if the resolution text is shorter than the configured minimum character length. Using the Import Sample Script feature, this setup is quick and code-free.


1. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Request.

  2. Click Import Sample Script.

  3. From the list, select  Validate Resolution Content

  4. Save the function.


2. Configure with Business Rules

To run the script when specific conditions are met:

  1. Go to Admin → Automation → Business Rules

  2. Select the Incident / Service module.

  3. Click New Business Rule.

  4. Define the Rule conditions (e.g., Resolution Content  >> is not empty).

  5. Under Actions, choose Execute Custom Function → Validate Resolution Content

  6. Save the rule.

  7. Refer to the screenshot.

      


Example Use Cases

  • Ensure technicians provide adequate resolution details before closing a request

  • Prevent accidental or incomplete closure of tickets with vague resolution notes

  • Maintain compliance with internal documentation standards


Configuring the Script: Dynamic Approvals Based on Category

This script automatically assigns the first-level approver based on the request’s category. It helps streamline approval workflows by dynamically routing approvals without manual intervention.


1. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Request.

  2. Click Import Sample Script.

  3. From the list, select Dynamic Approvals Based on Category.

  4. Save the function.


2. Configure with Custom Triggers

To run the script when specific conditions are met:

  1. Go to Admin → Automation → Custom Triggers.

  2. Select the Request module.

  3. Click New Trigger.

  4. Define the trigger condition, such as:
     • If Category = "Desktop Hardware"

  5. Under Actions, select Execute Custom Function → Dynamic Approvals Based on Category.

  6. Save the trigger.

  7. Refer to the screenshot

      


Example Use Cases

  • Automatically assign the IT Manager as an approver for “Hardware” requests.

  • Route “Software” or “Access” categories to different department heads.

  • Reduce delays by ensuring the right person is assigned based on the category.


Configuring the Script: Merge Requests with Similar Subjects

This script identifies requests with the same subject and merges them into a single request to reduce duplication and improve tracking.


1. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Request.

  2. Click Import Sample Script.

  3. From the list, select Merge Requests with Similar Subjects.

  4. Save the function.


2. Configure with Custom Triggers

To run the script when specific conditions are met:

  1. Go to Admin → Automation → Custom Triggers.

  2. Select the Request module.

  3. Click New Trigger.

  4. Define the trigger condition, such as:
     • Status = Open

  5. Under Actions, select Execute Custom Function → Merge Requests with Similar Subjects.

  6. Save the trigger.

  7. Refer to the screenshot

      


Example Use Cases

  • Merge duplicate tickets logged by multiple users for the same outage.

  • Consolidate repetitive requests with identical subjects (e.g., “VPN not working”).

  • Reduce clutter in the request queue and improve response time.


Configuring the Script: Block Requests without Attachments

This script prevents a request from being submitted or processed if no attachments are included, ensuring mandatory file submission.


1. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Request.

  2. Click Import Sample Script.

  3. From the list, select Block Requests without Attachments.

  4. Save the function.


2. Configure with Business Rules

To run the script when specific conditions are met:

  1. Go to Admin → Automation → Business Rules

  2. Select the Incident / Service module 

  3. Click New Business Rule and define the scope (On Request Creation or On Request Update).

  4. Specify conditions (e.g., Category = "Software").

  5. Under Actions, select Execute Custom Function → Block Requests without Attachments.

  6. Save the rule.

  7. Refer to the screenshot

      


Example Use Cases

  • Enforce that users attach purchase receipts for reimbursement requests.

  • Prevent hardware/software requests from proceeding without approval documents.

  • Ensure compliance by requiring supporting documents (e.g., ID proof, forms).



Configuring the Script: Block Request creation and notify Requester

This script blocks the creation of a request and automatically notifies the requester via email, ensuring they are informed about the rejection reason.


1. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Request.

  2. Click Import Sample Script.

  3. From the list, select Block Request Creation and Notify Requester.

  4. Save the function.


2. Configure with Business Rules

To run the script when specific conditions are met:

  1. Go to Admin → Automation → Business Rules

  2. Select the Incident / Service module 

  3. Click New Business Rule  and define the scope (On Request Creation ).

  4. Specify conditions (e.g., Requester  >> Job title >> is not empty ).

  5. Under Actions, select Execute Custom Function → Block Request Creation and Notify Requester.

  6. Save the rule.

  7. Refer to the screenshot

      


Example Use Cases

  • Block requests from users outside of a specific department and notify them.

  • Prevent creation of requests in restricted categories (e.g., “Financial Approvals”).

  • Inform requesters via email when their request does not meet submission criteria.


Configuring the Script: Mark Note as First Response

This script adds a system note to indicate that the first response has been sent for the request, helping track SLA compliance and communication timelines.


1. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Request.

  2. Click Import Sample Script.

  3. From the list, select Mark Note as First Response.

  4. Save the function.


2. Configure with Custom Triggers

To run the script when specific conditions are met:

  1. Go to Admin → Automation → Custom Triggers.

  2. Select the Request module 

  3. Click New Trigger and define the actions (On Request Creation or On Request Update).

  4. Define the trigger condition,(e.g., Status changes to In Progress).

  5. Under Actions, select Execute Custom Function → Mark Note as First Response.

  6. Save the trigger.

  7. Refer to the screenshot

      


Example Use Cases

  • Track when the first response SLA has been met.

  • Add transparency by logging an automatic note visible to all technicians.

  • Standardize the process of recording the first customer communication.


Configuring the Script: Send Email from Request Field

This script sends an email to the address specified in a custom (additional) field of a request, enabling dynamic notifications.


1. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Request.

  2. Click Import Sample Script.

  3. From the list, select Send Email from Request Field.

  4. Save the function.


2. Configure with Custom Triggers

To run the script when specific conditions are met:

  1. Go to Admin → Automation → Custom Triggers.

  2. Select the Request module 

  3. Click New Trigger  and define the actions (On Request Creation or On Request Update).

  4. Define the trigger condition, (e.g., Approval Status = Approved).

  5. Under Actions, select Execute Custom Function → Send Email from Request Field.

  6. Save the trigger.

  7. Refer to the screenshot

      


Example Use Cases

  • Send notifications to a vendor contact email stored in the request.

  • Automatically notify a manager or department head defined in a custom field.

  • Ensure task-related updates go directly to external stakeholders.


Configuring the Script: Set Service SLA Based on Priority

This script automatically assigns a service SLA to the request based on the selected priority, ensuring accurate response and resolution timelines.


1. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Request.

  2. Click Import Sample Script.

  3. From the list, select Set Service SLA Based on Priority.

  4. Save the function.


2. Configure with Custom Triggers

To run the script when specific conditions are met:

  1. Go to Admin → Automation → Custom Triggers.

  2. Select the Request module 

  3. Click New Trigger and define the actions (On Request Creation or On Request Update).

  4. Define the trigger condition,(e.g., Priority = High).

  5. Under Actions, select Execute Custom Function → Set Service SLA Based on Priority.

  6. Save the trigger.

  7. Refer to the screenshot

      


Example Use Cases

  • Apply a 4-hour SLA to Critical requests.

  • Assign a 24-hour SLA to High priority tickets.

  • Standardize SLA handling to ensure consistent response times across priorities.


Configuring the Script: Format and Update Subject

This script reformats and updates the subject of a request to maintain consistency and improve readability.


1. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Request.

  2. Click Import Sample Script.

  3. From the list, select Format and Update Subject.

  4. Save the function.


2. Configure with Custom Triggers

To run the script when specific conditions are met:

  1. Go to Admin → Automation → Custom Triggers.

  2. Select the Request module.

  3. Click New Trigger.

  4. Define the trigger condition, such as:
     • If Category = "Software"

  5. Under Actions, select Execute Custom Function → Format and Update Subject.

  6. Save the trigger.

  7. Refer to the screenshot

      


Example Use Cases

  • Prefix requests with their category or department (e.g., [HR] Leave Request).

  • Standardize subjects for tickets created via email integration.

  • Improve reporting by maintaining a uniform subject structure.


Configuring the Script: Cancel Tasks When Request Status is Cancelled

This script automatically cancels all ongoing tasks linked to a request when the request status is changed to Cancelled, ensuring consistency and avoiding redundant work.


1. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Request.

  2. Click Import Sample Script.

  3. From the list, select Cancel Tasks When Request Status is Cancelled.

  4. Save the function.


2. Configure with Custom Triggers

To run the script when specific conditions are met:

  1. Go to Admin → Automation → Custom Triggers.

  2. Select the Request module 

  3. Click New Trigger and define the actions (On Request Creation or On Request Update).

  4. Define the trigger condition,(e.g., Status = Cancelled).

  5. Under Actions, select Execute Custom Function → Cancel Tasks When Request Status is Cancelled

  6. Save the trigger.

  7. Refer to the screenshot

      


Example Use Cases

  • Stop all pending approval tasks when the request is withdrawn.

  • Cancel technician tasks for incidents that are no longer valid.

  • Prevent wasted effort on projects/requests that have been closed by the requester.


Configuring the Script: Send Email to Associated Requesters on Problem Closure

This script automatically sends an email notification to the requesters of all requests linked to a problem when the problem is closed, ensuring communication and closure visibility.


1. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Problem

  2. Click Import Sample Script.

  3. From the list, select Send Email to Associated Requesters on Problem Closure.

  4. Save the function.


2. Configure with Custom Triggers

To run the script when specific conditions are met:

  1. Go to Admin → Automation → Custom Triggers.

  2. Select the Problem module.

  3. Click New Trigger.

  4. Define the trigger condition,(e.g., Status = Closed).

  5. Under Actions, select Execute Custom Function → Send Email to Associated Requesters on Problem Closure.

  6. Save the trigger.

  7. Refer to the screenshot

      


Example Use Cases

  • Notify all affected users that the problem has been resolved.

  • Ensure linked incidents/requesters receive closure communication.

  • Provide transparency for major outages or recurring issues when they are officially closed.


Configuring the Script: Set Priority Based on Urgency and Impact

This script automatically assigns the priority of a problem by evaluating its urgency and impact values, ensuring consistent classification and quicker response.


1. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Problem

  2. Click Import Sample Script.

  3. From the list, select Set Priority Based on Urgency and Impact .

  4. Save the function.


2. Configure with Custom Triggers

To run the script when specific conditions are met:

  1. Go to Admin → Automation → Custom Triggers.

  2. Select the Problem module 

  3. Click New Trigger and define the actions (On Problem Creation or On Problem Update).

  4. Define the trigger condition, (Priority is High)

  5. Under Actions, select Execute Custom Function → Set Priority Based on Urgency and Impact .

  6. Save the trigger.

  7. Refer to the screenshot

      


Example Use Cases

  • Ensure critical problems with wide impact and urgency are escalated as P1.

  • Maintain uniform priority assignment across all problems.

  • Improve SLA adherence by removing manual errors in problem prioritization.


Configuring the Script: Update Associated Incidents to Resolved when Problem is Resolved

This script ensures consistency by automatically updating the status of all incidents linked to a problem to Resolved once the problem itself is marked as Resolved.


1. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Problem.

  2. Click Import Sample Script.

  3. From the list, select Update Associated Incidents to Resolved when Problem is Resolved.

  4. Save the function.


2. Configure with Custom Triggers

To run the script when specific conditions are met:

  1. Go to Admin → Automation → Custom Triggers.

  2. Select the Problem module 

  3. Click New Trigger and define the actions (On Problem Creation or On Problem Update).

  4. Define the trigger condition, (e.g., Status = Resolved).

  5. Under Actions, select Execute Custom Function → Update Associated Incidents to Resolved when Problem is Resolved.

  6. Save the trigger.

  7. Refer to the screenshot

      


Example Use Cases

  • Keep incident and problem statuses aligned automatically.

  • Avoid manual effort to close multiple associated incidents.

  • Ensure users impacted by incidents see their requests resolved as soon as the underlying problem is fixed.


Configuring the Script: Notify Assigned Technician on Task Completion

This script automatically sends a notification to the assigned technician once all tasks linked to a request are marked as Completed.


1. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Task.

  2. Click Import Sample Script.

  3. From the list, select Notify Assigned Technician on Task Completion.

  4. Save the function.


2. Configure with Custom Triggers

To run the script when specific conditions are met:

  1. Go to Admin → Automation → Custom Triggers .

  2. Select the Task module.

  3. Click New Trigger.

  4. Define the trigger condition, (e.g., Status = Closed).

  5. Under Actions, select Execute Custom Function → Notify Assigned Technician on Task Completion.

  6. Save the trigger.

  7. Refer to the screenshot

      


Example Use Cases

  • Notify the request owner’s technician that all related tasks are done.

  • Ensure technicians stay updated without manually checking task statuses.

  • Improve workflow visibility when request tasks drive resolution progress.



Configuring the Script: Append Request Details to Task Title

This script automatically appends key request details (like request ID, subject, or category) to the task title, helping technicians quickly identify the request context.


1. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Task.

  2. Click Import Sample Script.

  3. From the list, select Append Request Details to Task Title.

  4. Save the function.


2. Configure with Custom Triggers

To run the script when specific conditions are met:

  1. Go to Admin → Automation → Custom Triggers.

  2. Select the Task module.

  3. Click New Trigger.

  4. Define the trigger condition, (e.g., Status = Closed).

  5. Under Actions, select Execute Custom Function → Append Request Details to Task Title..

  6. Save the trigger.

  7. Refer to the screenshot

      


Example Use Cases

  • Add Request ID at the end of the task title → e.g., “Reset VPN Access (REQ12345)”.

  • Append the Request Subject so the technician sees context instantly.

  • Maintain consistent task naming conventions for easier tracking and reporting.



Configuring the Script: Send Notification to Project Owner When Task is Closed

This script automatically sends a notification to the project owner whenever a project task is marked as Closed, ensuring project stakeholders stay informed of task progress.


1. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Task

  2. Click Import Sample Script.

  3. From the list, select Send Notification to Project Owner When Task is Closed.

  4. Save the function.


2. Configure with Custom Triggers

To run the script when specific conditions are met:

  1. Go to Admin → Automation → Custom Triggers .

  2. Select the Task module.

  3. Click New Trigger.

  4. Define the trigger condition, (e.g., Status = Closed).

  5. Under Actions, select Execute Custom Function → Send Notification to Project Owner When Task is Closed.

  6. Save the trigger.

  7. Refer to the screenshot

      


Example Use Cases

  • Keep the project owner informed whenever team members close tasks.

  • Provide better project visibility by notifying stakeholders about progress.

  • Reduce the need for manual status reporting from technicians to project owners.



Configuring the Script: Auto-Close Requests Linked to Change

This script automatically updates and closes all requests associated with a change once the change itself is marked as Closed, ensuring consistency across related records.


1. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Change.

  2. Click Import Sample Script.

  3. From the list, select Auto-Close Requests Linked to Change.

  4. Save the function.


2. Configure with Custom Triggers

To run the script when specific conditions are met:

  1. Go to Admin → Automation → Custom Triggers.

  2. Select the Change module.

  3. Click New Trigger.

  4. Define the trigger condition,(e.g., Change Status = Closed).

  5. Under Actions, select Execute Custom Function → Auto-Close Requests Linked to Change.

  6. Save the trigger.

  7. Refer to the screenshot

      


Example Use Cases

  • Ensure all dependent requests are resolved once the related change is finished.

  • Eliminate manual follow-up work to close linked requests.

  • Maintain data consistency across Requests and Changes for reporting and SLA compliance.


Configuring the Script: Create Release on Change Approval

This script automatically creates a release record when a change request is approved, streamlining the transition from change planning to deployment.


1. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Change.

  2. Click Import Sample Script.

  3. From the list, select Create Release on Change Approval.

  4. Save the function.


2. Configure with Custom Triggers

To run the script when specific conditions are met:

  1. Go to Admin → Automation → Custom Triggers.

  2. Select the Change module.

  3. Click New Trigger.

  4. Define the trigger condition, (e.g., Change Status = Approved).

  5. Under Actions, select Execute Custom Function → Create Release on Change Approval.

  6. Save the trigger.

  7. Refer to the screenshot

      


Example Use Cases

  • Seamless transition: Move from change approval to release creation automatically.

  • Ensure approved changes are always deployed without manual effort.

  • Improve release governance by tracking which changes trigger releases.


Configuring the Script: Update Change Request Properties

This script automatically updates specific fields or properties of a change request based on defined conditions, helping maintain data consistency and streamline workflows.


1. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Change.

  2. Click Import Sample Script.

  3. From the list, select Update Change Request Properties..

  4. Save the function.


2. Configure with Custom Triggers

To run the script when specific conditions are met:

  1. Go to Admin → Automation → Custom Triggers.

  2. Select the Change module.

  3. Click New Trigger.

  4. Define the trigger condition, (e.g., Change Type = Standard or Change Status = In Progress).

  5. Under Actions, select Execute Custom Function → Update Change Request Properties.

  6. Save the trigger.

  7. Refer to the screenshot

      


Example Use Cases

  • Automatically set Assignment Group or Technician based on Change Type.

  • Update Scheduled Start/End Dates when certain conditions are met.

  • Ensure standardization of change request fields for reporting and SLA compliance.


Configuring the Script: Add Predefined Rollout Plan

This script automatically attaches a predefined rollout plan to a change request when it enters the Planning stage, ensuring consistent and standardized implementation procedures.


1. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Change.

  2. Click Import Sample Script.

  3. From the list, select Add Predefined Rollout Plan.

  4. Save the function.


2. Configure with Custom Triggers

To run the script when specific conditions are met:

  1. Go to Admin → Automation → Custom Triggers.

  2. Select the Change module.

  3. Click New Trigger.

  4. Define the trigger condition,(e.g., Change Stage = Planning).

  5. Under Actions, select Execute Custom Function → Add Predefined Rollout Plan..

  6. Save the trigger.

  7. Refer to the screenshot

      


Example Use Cases

  • Automatically attach a standard rollout checklist for recurring change types.

  • Ensure compliance and consistency across all change implementations.

  • Reduce manual effort in planning repetitive or standard changes.


Configuring the Script: Add Predefined Tasks to Release

This script automatically adds a predefined set of tasks to a release, ensuring consistency in release execution and reducing manual effort.


1. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Release.

  2. Click Import Sample Script.

  3. From the list, select Add Predefined Tasks to Release.

  4. Save the function.


2. Configure with Custom Triggers

To run the script when specific conditions are met:

  1. Go to Admin → Automation → Custom Triggers.

  2. Select the Release module.

  3. Click New Trigger.

  4. Define the trigger condition,(e.g., Template >>is  >>  General Template).

  5. Under Actions, select Execute Custom Function → Add Predefined Tasks to Release.

  6. Save the trigger.

  7. Refer to the screenshot

      


Example Use Cases

  • Attach a standard release checklist for routine deployments.

  • Ensure all required tasks are included for compliance and auditing.

  • Reduce manual effort and maintain uniform release execution.


Configuring the Script: Close Changes Associated with Release

This script automatically updates and closes all changes linked to a release once the release itself is marked as Closed, ensuring consistency and reducing manual follow-ups.


1. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Release.

  2. Click Import Sample Script.

  3. From the list, select Close Changes Associated with Release.

  4. Save the function.


2. Configure with Custom Triggers

To run the script when specific conditions are met:

  1. Go to Admin → Automation → Custom Triggers.

  2. Select the Release module.

  3. Click New Trigger.

  4. Define the trigger condition,(e.g., Status = Closed).

  5. Under Actions, select Execute Custom Function → Close Changes Associated with Release.

  6. Save the trigger.

  7. Refer to the screenshot

      


Example Use Cases

  • Ensure all changes tied to a release are closed when the release completes.

  • Maintain status consistency between releases and their dependent changes.

  • Reduce manual effort and avoid leaving pending changes after release closure.



Configuring the Script: Close Projects Associated with Release

This script automatically closes all projects linked to a release when the release itself is marked as Closed, ensuring consistency and reducing manual follow-up tasks.


1. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Release.

  2. Click Import Sample Script.

  3. From the list, select Close Projects Associated with Release.

  4. Save the function.


2. Configure with Custom Triggers

To run the script when specific conditions are met:

  1. Go to Admin → Automation → Custom Triggers.

  2. Select the Release module.

  3. Click New Trigger.

  4. Define the trigger condition(e.g., Status = Closed).

  5. Under Actions, select Execute Custom Function → Close Projects Associated with Release.

  6. Save the trigger.

  7. Refer to the screenshot

     


Example Use Cases

  • Ensure all projects tied to a release are closed when the release is completed.

  • Maintain status consistency between releases and dependent projects.

  • Reduce manual follow-ups and avoid leaving projects in progress after release closure.


Configuring the Script: Notify Project Members on Milestone Creation

This script automatically sends notifications to all project members whenever a new milestone is created, keeping the team informed and aligned.


1. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Project.

  2. Click Import Sample Script.

  3. From the list, select Notify Project Members on Milestone Creation.

  4. Save the function.


2. Configure with Custom Triggers

To run the script when specific conditions are met:

  1. Go to Admin → Automation → Custom Triggers.

  2. Select the Project module.

  3. Click New Trigger.

  4. Define the trigger condition,(e.g., Priority >> is >> High).

  5. Under Actions, select Execute Custom Function → Notify Project Members on Milestone Creation.

  6. Save the trigger.

  7. Refer to the screenshot

      


Example Use Cases

  • Keep all project team members informed of newly created milestones.

  • Ensure timely awareness for task planning and resource allocation.

  • Improve project transparency by automatically notifying stakeholders of key progress points.


 
Configuring the Script: Create and Associate Release with Project


1. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Project.

  2. Click Import Sample Script.

  3. From the list, select Create and Associate Release with Project.

  4. Save the function.


2. Configure with Custom Triggers

To run the script when specific conditions are met:

  1. Go to Admin → Automation → Custom Triggers.

  2. Select the Project module.

  3. Click New Trigger.

  4. Define the trigger condition,(e.g., Project Status = Approved or Project Phase = Planning).

  5. Under Actions, select Execute Custom Function → Create and Associate Release with Project.

  6. Save the trigger.

  7. Refer to the screenshot

      


Example Use Cases

  • Automatically create a release linked to a new project for planning purposes.

  • Ensure that all projects have associated releases for tracking deployments.

  • Reduce manual effort and maintain consistency in project-release associations.


Configuring the Script: Update Project Code with Project ID

This script automatically sets the project code to match the project ID, ensuring unique and consistent identification for all projects.


1. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Project.

  2. Click Import Sample Script.

  3. From the list, select Update Project Code with Project ID.

  4. Save the function.


2. Configure with Custom Triggers

To run the script when specific conditions are met:

  1. Go to Admin → Automation → Custom Triggers.

  2. Select the Project module.

  3. Click New Trigger.

  4. Define the trigger condition,(e.g., Project Type >>  is  >> Business ).

  5. Under Actions, select Execute Custom Function → Update Project Code with Project ID.

  6. Save the trigger.

  7. Refer to the screenshot

     


Example Use Cases

  • Ensure unique project codes by aligning them with project IDs.

  • Simplify tracking and reporting by using consistent identifiers.

  • Reduce manual errors when entering project codes.


Configuring the Script: Update Request Status on Requester Note

This script automatically updates the status of a request whenever the requester adds a note, helping ensure requests reflect the latest user input.


1. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Note.

  2. Click Import Sample Script.

  3. From the list, select Update Request Status on Requester Note.

  4. Save the function.


2. Configure with Custom Triggers

To run the script when specific conditions are met:

  1. Go to Admin → Automation → Custom Triggers.

  2. Select the Note module.

  3. Click New Trigger >> Applies for Request Note.

  4. Define the trigger condition,(e.g., Created By  >> is >> $Logged in user).

  5. Under Actions, select Execute Custom Function → Update Request Status on Requester Note.

  6. Save the trigger.

  7. Refer to the screenshot

      


Example Use Cases

  • Change a request status from Pending to In Progress when the requester adds additional information.

  • Ensure technicians are aware of new requester notes by automatically updating the request status.

  • Maintain accurate request lifecycle tracking without manual intervention.



Configuring the Script: Send Email to Requester on Public Note

 This script automatically sends an email notification to the requester whenever a public note is added to their request, keeping them informed in real time.


1. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Note.

  2. Click Import Sample Script.

  3. From the list, select Send Email to Requester on Public Note.

  4. Save the function.


2. Configure with Custom Triggers

To run the script when specific conditions are met:

  1. Go to Admin → Automation → Custom Triggers.

  2. Select the Note module.

  3. Click New Trigger >> Applies for Request Note.

  4. Define the trigger condition,(e.g., Note Type = Public).

  5. Under Actions, select Execute Custom Function → Send Email to Requester on Public Note.

  6. Save the trigger.

  7. Refer to the screenshot


Example Use Cases

  • Notify the requester when a technician updates progress on their request via a public note.

  • Keep requesters informed of important updates without them logging into the portal.

  • Improve communication transparency and reduce follow-up inquiries.


Configuring the Script: Assign to Logged-in User When Technician Adds Note to Unassigned Request

This script automatically assigns an unassigned request to the technician who adds a note, ensuring accountability and reducing unassigned work.


1. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Note.

  2. Click Import Sample Script.

  3. From the list, select Assign to Logged-in User When Technician Adds Note to Unassigned Request.

  4. Save the function.


2. Configure with Custom Triggers

To run the script when specific conditions are met:

  1. Go to Admin → Automation → Custom Triggers.

  2. Select the Note module.

  3. Click New Trigger >> Applies for Request Note.

  4. Define the trigger condition   ( Request Assignment = Unassigned   and Created By = Technician )

  5. Under Actions, select Execute Custom Function → Assign to Logged-in User When Technician Adds Note to Unassigned Request.

  6. Save the trigger.

  7. Refer to the screenshot

    


Example Use Cases

  • Automatically assign unassigned requests to the technician who starts working on them.

  • Ensure no request remains unassigned once a technician engages with it.

  • Improve accountability and tracking of technician actions.



Configuring the Script: Update Request Status on Technician Reply

This script automatically updates the status of a request whenever a technician adds a reply, keeping the request lifecycle accurate and up-to-date.


1. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Notification.

  2. Click Import Sample Script.

  3. From the list, select Update Request Status on Technician Reply.

  4. Save the function.


2. Configure with Custom Triggers

To run the script when specific conditions are met:

  1. Go to Admin → Automation → Custom Triggers.

  2. Select the Notification module.

  3. Click New Trigger >> Applies for Request Notification.

  4. Define the trigger condition,(e.g., Is Public >> is >> True).

  5. Under Actions, select Execute Custom Function → Update Request Status on Technician Reply.

  6. Save the trigger.

  7. Refer to the screenshot

      


Example Use Cases

  • Automatically move requests from Pending to In Progress when a technician replies via a notification.

  • Keep request status accurate in real time without manual intervention.

  • Improve tracking, reporting, and SLA compliance for technician responses.



Configuring the Script: Add Note on Request Approval or Rejection

This script automatically attaches a predefined rollout plan to a change request when it enters the Planning stage, ensuring consistent and standardized implementation procedures.


1. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Approval.

  2. Click Import Sample Script.

  3. From the list, select Add Note on Request Approval or Rejection.

  4. Save the function.


2. Configure with Custom Triggers

To run the script when specific conditions are met:

  1. Go to Admin → Automation → Custom Triggers.

  2. Select the Approval module.

  3. Click New Trigger >> Applies for  >> Request Approval.

  4. Define the trigger condition  , (Approval Status = Approved or Approval Status = Rejected )  ,   Level is 1

  5. Under Actions, select Execute Custom Function → Add Note on Request Approval or Rejection.

  6. Save the trigger.

  7. Refer to the screenshot.

      


Example Use Cases

  • Automatically document approval or rejection actions on requests.

  • Maintain a clear audit trail for compliance purposes.

  • Reduce manual effort of adding notes for each approval action.


Configuring the Script: Bulk Close Pending Change Tasks

This script automatically closes all pending change tasks based on a specified query report, helping maintain up-to-date task statuses and reducing manual effort.


1. Create a Query Report

  1. Navigate to Reports → New Query Report.

  2. Execute the query that identifies the pending change tasks you want to close.

  3. Save the report with a meaningful name (e.g., closerequest).

Note: You can modify the query as per your requirements.


2. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Scheduled Functions.

  2. Click Import Sample Script.

  3. From the list, select Bulk Close Pending Change Tasks.

  4. Save the function.


3. Configure with Custom Schedules.

  1. Go to Admin → Automation → Custom Schedules.

  2. Click New Schedule

  3. Set the query report name (closerequest) as a parameter for the function.

  4. Under Executor, select Execute Custom Function → Bulk Close Pending Change Tasks.

  5. Define the schedule frequency (e.g., daily, weekly).

  6. Refer to the screenshot



Example Use Cases

  • Automatically close stale or pending change tasks from reports to maintain clean task lists.

  • Reduce manual follow-ups on tasks that are no longer relevant.

  • Improve reporting accuracy by ensuring only active tasks remain open.


Configuring the Script: Bulk Close Pending Request Tasks

This script automatically closes all pending request tasks based on a specified query report, helping maintain up-to-date task statuses and reducing manual effort.


1. Create a Query Report

Note: You can modify the query as per your requirements.


2. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Scheduled Functions.

  2. Click Import Sample Script.

  3. From the list, select Bulk Close Pending Request Tasks.

  4. Save the function.


3. Configure with Custom Schedules.

  1. Go to Admin → Automation → Custom Schedules.

  2. Click New Schedule

  3. Set the query report name (closerequesttasks) as a parameter for the function.

  4. Under Executor, select Execute Custom Function → Bulk Close Pending Request Tasks.

  5. Define the schedule frequency (e.g., daily, weekly).

  6. Optionally, enable Repeat Mode if the request count is large.

  7. Refer to the screenshot



Example Use Cases

  • Automatically close stale or pending request tasks to maintain clean task lists.

  • Reduce manual follow-ups on tasks that are no longer relevant.

  • Improve reporting accuracy by ensuring only active tasks remain open.


Configuring the Script: Cancel Unapproved Requests Based on Query Report

This script automatically cancels requests that remain unapproved for a specified number of days, as determined by a query report, helping maintain workflow efficiency and reduce stale requests.


1. Create a Query Report

  1. Navigate to Reports → New Query Report.

  2. Execute the query that identifies the pending change tasks you want to close.

  3. Save the report with a meaningful name (e.g., unapproved_requests).

Note: You can modify the query as per your requirements.


2. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Scheduled Functions.

  2. Click Import Sample Script.

  3. From the list, select Cancel Unapproved Requests Based on Query Report.

  4. Save the function.


3. Configure with Custom Schedules.

  1. Go to Admin → Automation → Custom Schedules.

  2. Click New Schedule

  3. Set the query report name (unapproved_requests) as a parameter for the function.

  4. Under Executor, select Execute Custom Function → Cancel Unapproved Requests Based on Query Report.

  5. Define the schedule frequency (e.g., daily, weekly).

  6. Refer to the screenshot



Example Use Cases

  • Automatically cancel requests that remain unapproved beyond a defined number of days.

  • Maintain a clean request list and reduce manual monitoring.

  • Improve workflow efficiency and ensure timely approval actions.   



Configuring the Script: Create Requests for Asset Expiry

This script automatically creates requests for assets that are nearing expiry, based on a specified query report, helping ensure timely action and compliance.


1. Create a Query Report

Note: You can modify the query as per your requirements.


2. Import the Script

  1. Navigate to Admin → Developer Space → Custom Functions → Scheduled Functions.

  2. Click Import Sample Script.

  3. From the list, select Create Requests for Asset Expiry.

  4. Save the function.


3. Configure with Custom Schedules.

  1. Go to Admin → Automation → Custom Schedules.

  2. Click New Schedule

  3. Set the query report name (asset_expiry) as a parameter for the function.

  4. Under Executor, select Execute Custom Function → Create Requests for Asset Expiry.

  5. Define the schedule frequency (e.g., daily, weekly).

  6. Refer to the screenshot



Example Use Cases

  • Automatically create requests for assets nearing expiry to initiate renewals or replacements.

  • Ensure timely notifications and actions for asset management teams.

  • Reduce manual tracking of asset expiry dates and improve compliance.   




                  New to ADSelfService Plus?