Configuring Actions for Email


Updating Tickets:

Actions define how and when to create or update a ticket based on the content of an incoming email message. When defining actions, you can use data points from the incoming email message, information in JIRA, and information in lookup tables to determine which actions to take and what values to use.


Configuring Actions

  1. In JIRA, click the gear icon, and then click Applications.
  2. Under Integrations, click SmartHandler, and then click the handler in the list.
  3. Click the Actions tab, and then do one of the following:
    • To create a new action, click New Action.
    • To edit an existing action, click the row in the list.
  4. In the Name your action section, enter a name that indicates what the action will do.
    For example, update-priority.

  5. OPTIONAL Click the Create Action Criteria section, and configure the rules that determine whether to take this particular action for an email.
    • Define criteria with the following information. Optionally, click Add Expression to add more than one term to a condition. The email must match all expression terms to match an action criteria.
      • Information to check—a data point that was extracted from the message, an email field, or a value in JIRA.
      • Operator—a comparison (compares the information to a specific value) or a search (looks for the information in a lookup table or in JIRA).
      • Value—for a comparison operator, enter a data point that was extracted from the message, an email field, or a value in JIRA. Or, select Other and enter a static value. For a search operator, select Lookup Table or JIRA Ticket, and configure the search parameters.
    • To remove a condition, click the trash icon beside it. 
    • If you define conditions, an incoming email must match at least one of the action criteria for this action to be applied.
    • If you do not define any conditions, this action will be applied to every incoming email that matches the handler.

      The action criteria are evaluated in order. If the email does not match a condition, the add-on stops evaluating the criteria and does not perform the action. You can reorder the conditions by dragging the terms.

  1. Click the Select Action Type section, and configure whether the action will create a new ticket or update an existing ticket.
    If score ranges are enabled for this handler, you also have the option to select a score range calculation, which assigns a weighting to emails that match the action criteria but does not create or update a ticket.
  2. If score ranges are enabled for this handler, enter a Score for this action.
    The score assigns a weighting to this action. When an incoming email matches the criteria in step 5, the score is added to the total score for the email. You can then use the cumulative score to take additional actions. See Configuring Score Range Actions.
  3. If the action will update an existing ticket, enter search criteria to find the ticket.

    Search FieldJIRA field to look in when searching for the ticket.
    Search Match TypeWhether the value in the search field Equals or Contains the search value.
    Search ValueValue to look for in the JIRA field. Enter a static value, or type { to select from the list of data points for this handler.
    SearcherUser account to use when performing the search.
  4. Click the Map Data Points to JIRA Fields section, and define how you want to populate the JIRA ticket with this action.
    1. Add the fields that you want to define by clicking Add Issue Field and then selecting the field name.

      If this action creates a new ticket, you must specify values for every field that JIRA requires for new tickets. To get you started, the add-on automatically adds the required fields and you cannot delete them.

    2. For each field, define the values you want to use in the ticket.
      1. Click Add Field Criteria.
      2. OPTIONAL To specify when to return a certain value, click Add Expression and then define the conditions when you want to use the value.
        For example, you may want to specify a High priority when the email is from a VIP but a Medium priority when the email is from someone else.
      3. In the Return field, select the value you want to use in the field.
        You can select a data point, a value in JIRA, or a value in a lookup table. You can also select Other and enter a static value.
      4. If this action updates a ticket, select whether you want to overwrite or append to the existing value.
        This option is available only for fields where it's possible to append to the existing field value. For example, you can append to the description, but you cannot append to the priority of a ticket.
      5. OPTIONAL Repeat steps i – v for every possible return value.
    3. OPTIONAL To reorder the criteria, drag them to the desired order.
      Criteria are evaluated in the order they are listed.
  5. Click Save.
  6. Repeat steps 2 – 11 for each action that you want to take when an incoming email matches this handler.
  7. OPTIONAL To reorder the actions, drag the actions to the desired order.
  1. Actions are applied in the order they are listed. For example, suppose you have two actions—one that creates a new ticket if it doesn't exist and one that updates a ticket if it does. In this case, you would list the update action first to avoid creating a new ticket and then immediately updating it with the next action.

Configuring Score Range Actions

Score Ranges:

If score ranges are enabled for this handler, you can configure actions based on how many of the other actions are performed for an email and how important those actions are. For example, suppose this handler evaluates web form submissions for users who want to launch new applications. You may want to create a ticket for an additional review step based on how many special requests the user makes.

To enable score ranges, configure the Mail Handler settings.

  1. Configure all the actions you want to take based on the email content.
  2. For each action, enter a Score, which assigns a weight to the action.
    See step 7 in Configuring Actions.
  3. Create a new action and enter a name.
  4. In the Create Action Criteria section, define criteria that are based on the ScoreRange value.
    For example, ScoreRange Greater Than 10.
  5. Configure the action type and define how you want to populate JIRA tickets as you would for a standard action.

    The add-on always evaluates score range actions after all other actions are evaluated.

Next Steps