Welcome to Portal

?Unknown\pull-down

Welcome to Zoho Cares

Bienvenido a Soporte de Zoho

Search our knowledge base, ask the community or submit a request.

Workflow Rules and Actions Using Notes

In Zoho FSM, workflow rules using notes help automate actions based on information added to records. By leveraging notes in workflow automation, teams can streamline communication, escalate issues, and automate service processes. The following are some of the examples that illustrate this:
  1. Create a ticket in Zoho Desk from a note in Zoho FSM. Refer to this section for the implementation details.
  2. Escalate a request when a critical note (e.g., mentioning "urgent" or "escalate") is added. Refer to this section for the implementation details.
  3. Automatically update the asset status and notify the admin when a note containing specific keywords (e.g., "urgent repair," "requires maintenance") is added to an asset record.
  4. The customer's request for additional service or concern about an ongoing problem can be documented as a note, which can be used to trigger a follow up work order.
Info
- Permission Required: Manage Automation
- Find out the Edition-specific limits for Workflow Rules.

List of Supported Modules

You can create workflow rules using notes for the following modules:
  1. Assets
  2. Companies
  3. Contacts
  4. Estimates
  5. Requests
  6. Service Appointments
  7. Services And Parts
  8. Work Orders

Creating the workflow rule 

Refer to this page for details of the components of a workflow rule.
 
A sample workflow rule has been used to explain the steps involved in creating one. This workflow will create a ticket in Zoho Desk from a note in Zoho FSM. Here, we are assuming that Zoho FSM and Zoho Desk are integrated.
  1. Go to Setup > Automation > Workflow Rules and click Create Workflow.
  2. Enter the following details, then click Next:
    1. The Module for which the rule has to be triggered.
      The module used here is Service Appointments.
    2. A Rule Name
    3. A Description of the rule



  3. Select the rule trigger as On a Notes Action - Created and click Next.



  4. Select the rule criteria as To all Service Appointments and To all notes and click Next.



  5. Click +Action and select Webhook.



  6. Select Create your own Webhook and click Next.



  7. Enter the following details and click Save and Associate.
    Name: CreateTicket
    Method: POST
    URL to Notify: https://desk.zoho.com/api/v1/tickets
    Authorization Type: Connection
    Choose Connection: Create a connection for Zoho Desk.
    Body: Choose Type as Raw and Format as JSON and enter the following JSON.

    {
      "departmentId" : "1077597XXXXX6907",
      "contactId" : "${!Service_Appointments.Contact.ZDesk_Id}",
      "subject" : "${!Notes.Note_Title}",
      "description" : "${!Notes.Note_Content}",
      "status" : "Open"
    }

    To add a placeholder, type #. From the dropdown, select a module whose field value you want to use. Search the field you want to use and select it. The placeholders will be replaced with actual values when the webhook is executed. To find the departmentId navigate to Zoho Desk > Organization > Departments and click on the desired department name. You can find the departmentId at the end of the application url.



    You can also add the webhook if it has already been defined. Select Existing webhooks.



    Select the required webhook and click Next.



  8. Click Save.


Create a Connection for Zoho Desk

To create a connection for Zoho Desk:
  1. Go to Zoho FSM > Setup > Developer Space > Connections and click Create Connection.
  2. Under Default Services, select Zoho Desk.
  3. Enter the following and click Create And Connect.
    1. A Connection Name.
      The Connection Link Name will be automatically populated.
    2. Scopes as Desk.tickets.CREATE
  4. Provide the necessary access and permissions.

More Examples

Example 1: Escalate a request when a critical note is added.

This workflow is used to notify the admin whenever a critical note (e.g., mentioning "urgent" or "escalate") is added to a request.
  1. Go to Setup > Automation > Workflow Rules and click Create Workflow.
  2. Enter the following details, then click Next:
    1. Module: Requests
    2. Rule Name: EscalateCriticalRequest
    3. Description: Escalate a request when a critical note is added.



  3. Select the rule trigger as Created and click Next.



  4. Select the rule criteria as Only to the Service Appointment matching certain conditions and add a condition as shown below. Click Next.



  5. Click +Function.



  6. Select Create your own Function and click Next.



  7. Enter a Function Name and add the function in the ‌Deluge Script Editor. 

    Enter the following code. You need to create a connection for FSM named zfsm.

    adminEmail = organization.get("primary_email");
    attachmentsResp = notes.get("$attachments");
    file_attachment_list = List();
    reqName = request.get("Name");
    if(attachmentsResp.isNull())
    {
    info "No attachment present in the Note !!!";
    }
    else
    {
    attachments_list = attachmentsResp.toList();
    }
    for each  attachment in attachments_list
    {
    file_id = attachment.get("$file_id");
    fileResp = invokeurl
    [
    url :"https://fsm.zoho.com/fsm/v1/files?file_id=" + file_id
    type :GET
    connection:"zfsm"
    ];
    file_attachment_list.add(fileResp);
    }
    sendmail
    [
    from :zoho.adminuserid
    to :adminEmail
    subject :"Request " + reqName + " Escalated !!!"
    message :"This request has been escalated. PFA the supporting attachments."
    Attachments :file:file_attachment_list
    ]



  8. Click Save and Associate to add the function.
  9. Click Save.


Create a Connection for Zoho FSM

To create a connection for Zoho FSM:
  1. Navigate to Setup > Developer Space > Connections and under Custom Services, click Create Service.



  2. Enter the following details and click Create Service.
    1. Service Name: ZFSM
      The Service Link Name will be automatically populated.
    2. Authentication Type: OAuth2
    3. Parameter Type: Header
    4. Grant Type: Authorization Code
    5. Generated Client IDClient Secret
    6. Authorize URL: https://accounts.zoho.com/oauth/v2/auth?access_type=offline&prompt=consent
    7. Access Token URL: https://accounts.zoho.com/oauth/v2/token
    8. Refresh Token URL: https://accounts.zoho.com/oauth/v2/token
    9. Scope: ZohoFSM.files.READ
    10. Provide a Scope Display Name.



  3. Click Create Connection.



  4. Perform the following and click Create And Connect:
    1. Connection Name: ZFSM
      The Connection Link Name will be populated automatically.
    2. Select the Scopes ZohoFSM.files.READ



  5. Click Connect.



  6. Click Accept.

Helpful?00
Updated: 12 days ago
Share :