Inbound email action example: requesting a change

This example shows you how to set up inbound email actions to create a change request record.

Before you begin

Role required: admin

About this task

Inbound Email Actions allow users to log or update incidents on an instance via email. The inbound email action parses the email and responds using a script.

Procedure

  1. Navigate to System Policy > Inbound Actions and click New.
  2. Populate the form as follows:
    Field Entry
    Name Request Change
    Type New
    Active True
    Target Table Change Request [change_request]
    Condition
    email.subject.indexOf("Change Request: ") == 0
    Script
    current.comments = email.body_text;
      current.short_description = email.subject;
     
      current.notify = 2;
     
      if (email.body_text.assign != undefined)
        current.assigned_to = email.body_text.assign;
     
      if (email.body_text.priority != undefined)
        current.priority = email.body_text.priority;
     
      if (email.body_text.category != undefined)
        current.category = email.body_text.category;
     
      current.insert();