Skip to main content

Autotask Create New Ticket

The Autotask Create New Ticket action automates the creation of an Autotask ticket from an email. It uses business logic to associate the ticket with the correct Autotask Contact and Account.

This action can be used for most scenarios when you need to create a new Autotask ticket, and will save you managing approximately 10 Actions versus if you solely used Autotask API calls. Autotask Create New Ticket should be used when you need to associate the ticket to a Contact and/or Account based on an email address.

In general, Autotask Create New Ticket will locate an existing Autotask Account and Contact based on the email sender's email address, and will then create a new Autotask ticket for that Account and Contact. If there is no matching Contact, MSPIntegrations can optionally create a new Contact for you.

How does MSPIntegrations determine the correct Account and Contact for new Tickets?

MSPIntegrations will perform the following steps to identify and/or create the Contact and Account that will be associated to the new ticket:

autotask-create-ticket-flow autotask-create-ticket-flow

  1. MSPIntegrations will search for a Contact associated with the sender of the incoming email and use this to find the Account. MSPIntegrations will also apply any Account Filters you have specified.
  2. If there is no associated Contact, MSPIntegrations will search for an Account with the same web domain name as the email. MSPIntegrations will also apply any Account Filters you have specified.
  3. If no Contact or Account is found, MSPIntegrations can either create the ticket on a default Autotask Account or create a new Account.
  4. Optionally, if no Contact was found, MSPIntegrations can create a new Contact.

1. Search for an existing Autotask Contact

First, MSPIntegrations will search for an existing, active Contact with an email address that matches the email sender's address.

When comparing the email address, MSPIntegrations searches across all email fields on the Contact: (Email Address, Email Address 2, Email Address 3) and Email2AT Addresses.

If you have specified Account Filters then MSPIntegrations will apply the filters and only search for Contacts that are associated with Accounts that meet the filter.

If MSPIntegrations finds a matching Contact, MSPIntegrations will create the ticket for the Contact and the Contact's Account.

2. If there is no existing Contact, then locate an existing Autotask Account

If MSPIntegrations is unable to locate a Contact, MSPIntegrations will then attempt to find an Autotask Account that matches the sender's domain name. If you have specified Account Filters then MSPIntegrations will apply the filters when searching for an Account match.

When searching for a matching domain name, MSPIntegrations searches all active Autotask Accounts that have the sender's domain name in the Account Web field. MSPIntegrations will include partial matches. For example, if the domain name is example.com, the following would all match: http://www.example.com/, www.example.com, and example.com.

MSPIntegrations will also search Email2AT Domains for a match. When searching the Email2AT Domains field, MSPIntegrations searches for the domain including the @ sign. You must list the domain(s) in that field like this: @domain1.com @domain2.com @domain3.com (separated by spaces or commas and spaces).

If MSPIntegrations finds a matching Account, MSPIntegrations will create the ticket for the Account.

3. If there is no existing Account, either create a ticket on a default Account or create a new Account

You can choose what should happen if MSPIntegrations is unable to find a matching Account for the new Autotask ticket by specifying the action Action if no existing Account exists in Autotask with a matching web domain:

  • Assign Ticket to Default Account: MSPIntegrations will use the Account selected in the Default Account if no match option. If that Account is inactive or doesn't exist (for instance, if it was merged or deleted after the MSPIntegrations rule was configured), MSPIntegrations will fall back to using your internal Autotask zero Account. A popular practice is to create a new Account called "Unknown Account" as a catch-all for all tickets that did not have a matching Contact or Account.

  • Create a New Account: MSPIntegrations will create a new Account using the fields you specify.

4. Optionally if no Contact was located, create a new Contact

You can choose whether MSPIntegrations should create a new Contact if no matching Contact was found by enabling If no existing Contact exists in Autotask with a matching email address, create a new Contact for the email sender. If this is enabled, MSPIntegrations will create the Contact on the Account that was linked to the ticket. This means the Contact will be created on one of the following Accounts:

  • The Account that matched the domain name of the sender

  • The new Account created if Create a New Account was chosen in step (3)

  • The Account selected in Assign Ticket to Default Account in step (3)

  • Your internal Autotask zero Account if no other options were specified

Optional Filters

Account Filter

By default in the steps (1) and (2) above, MSPIntegrations will search through any Contact or Account to find a match. You can optionally limit this search to particular Accounts or Account types – this means the new Autotask ticket will only be created on these accounts.

The filter is flexible so we have outlined some examples below:

  • Filter by Account Type: For example, you may be in the situation where you have two Autotask Accounts with the same business, where one is a lead and the other is a customer. If you are using the Autotask Create New Ticket step in a rule for a specific inbox that only deals with leads, you could filter Account Type to be Lead to ensure that any new tickets are created on the correct Account.

  • Filter by Account Id: Alternatively, you might have a priority inbox that is only available to a small subset of customers and you want all emails to that inbox to be associated with one of the Accounts in that group. In this case you can use the Autotask Account Id of each of the customers.

Once the filter is applied, if there is no match for a Contact or Account, the behaviour will be as defined in the action Action if no existing Account exists in Autotask with a matching web domain.

There is a limit of 100 results for the filter, meaning you need to choose a filter that is granular enough to produce fewer than 100 results.

Parameters

Ticket Contact

  • Sender Address: choose the variable that contains the email sender's email address. MSPIntegrations renders the contents of this field and then searches Autotask for existing Contacts with an email address that matches the rendered text. This field should almost always be left with the default value email.from.address, but you may edit the field if you need to parse the sender's address from somewhere other than the email's from address (for example, if you are processing the contents of a website contact form).
  • Contact Name: If MSPIntegrations creates a new Autotask Contact, the contents of this field will be rendered and used as the First Name and Last Name for the new Autotask Contact.

Ticket Properties

The rendered values of these fields will be used to create the new Autotask ticket. If you would like to populate more fields of the Autotask ticket, you can select those fields (including User-Defined Fields) by clicking Additional Fields.

Advanced

  • Attach email attachments to ticket?: If enabled, MSPIntegrations will create a new Autotask attachment on the ticket for each attachment from the inbound email.
  • Attach original email message as an attachment?: If enabled, MSPIntegrations will create on the ticket a new Autotask attachment that contains an .eml file of the inbound email. You can later download this file from the Autotask ticket and open it in most email clients to see the message with the original formatting as sent by the original sender.
  • Add all email recipients to ticket as "Additional Contacts": MSPIntegrations will query the Autotask API to find any existing Autotask Contacts that are associated to the Account for this ticket and that have an email address that matches any of the other recipients of the inbound email message. This way, if the sender of the email copies other people on the email they send to your MSPIntegrations Account, those other people will be added to the Autotask ticket, as well. MSPIntegrations will never create a new Autotask Contact in order to associate it as an Autotask additional ticket Contact. MSPIntegrations will only use existing Autotask Contacts.

Action When Complete

If the action successfully created a new Autotask ticket, you may want to stop processing any further rules for this inbound message. Select one of the following in Action to take if we successfully create a new ticket:

  • Continue processing remaining actions will continue processing the inbound email message, triggering any remaining actions on the current rule as well as any other matching rules.
  • Stop processing the actions on this rule will stop processing the inbound email message in the current rule, but will trigger actions on any other matching rules.
  • Stop processing the actions on this rule and all other rules will stop processing this message completely.

Returned Variables

If you configure the Store the results in Variable option for this action, the following variables will be populated at the completion of this action:

VariableTypeDescription
LocatedExistedAutotaskContactboolTrue if the email sender's email address matched an existing Autotask Contact
CreatedNewAutotaskContactboolTrue if MSPIntegrations created a new Autotask Contact (will never be true if LocatedExistedAutotaskContact is true)
CreatedNewAutotaskContactCausedErrorboolTrue if MSPIntegrations attempted to create a new Contact but that creation caused an error
LocatedExistingAutotaskAccountboolTrue if LocatedExistedAutotaskContact is true; True if LocatedExistedAutotaskContact is false but MSPIntegrations located an Account with a Web address matching the email sender's domain name
AssignedTicketToDefaultAccountboolTrue if LocatedExistedAutotaskContact is false and LocatedExistingAutotaskAccount is false
CreatedNewAutotaskTicketboolTrue if MSPIntegrations successfully created a new Autotask ticket for the email
CreatedNewAutotaskTicketCausedErrorboolTrue if MSPIntegrations received an error from Autotask when MSPIntegrations attempted to create a new Autotask ticket for the email
AttachedEmlToTicketboolTrue if MSPIntegrations attached an .eml file to the ticket
AttachedEmlToTicketCausedErrorboolTrue if MSPIntegrations received an error when attempting to attach an .eml file to the ticket
TicketobjectThis object will represent the entire ticket object returned from Autotask after the ticket was created, including the properites id and TicketNumber
TicketAccountobjectAn object containing the Account associated to the ticket
TicketContactobjectAn object containing the Contact associated to the ticket, or null if no Contact was associated to the ticket
TicketAdditionalContactsCreatedarray objectsAn array of Autotask "TicketAdditionalContact" API objects

FAQs / Troubleshooting

What happens if MSPIntegrations finds multiple Autotask Contacts with email addresses that match the sender of the email?

In this case MSPIntegrations will pick the first Contact using the following algorithm:

  1. MSPIntegrations finds the Contact that has the oldest creation date and is not associated to your internal Autotask "zero" Account or Account you've selected as the Default Account if no match.
  2. If there is no match yet, MSPIntegrations will then use the Contact that has the oldest creation date that is assigned to your internal Autotask "zero" Account.
  3. If there is still has no match, MSPIntegrations uses the Contact that has the oldest creation date and is assigned to the Account you've selected as the Default Account if no match.

What happens if I enable the Account Filter feature and the filter returns more than 100 results?

The filter will still be used but MSPIntegrations will only take into account the first 100 Accounts (which are always loaded oldest to newest). For example, if the filter returns 1000 Accounts, MSPIntegrations will only apply the filter using the 100 oldest Accounts. You can view the results that were returned in the logs.

What should I do if I want all tickets to be created on a specific Account?

  1. In Account Filter, create a filter by Account Id and set this to the Account you want to use as default.
  2. In Contact & Account Association in the step Action if no existing Account exists in Autotask with a matching web domain choose Assign Ticket to Default Account and use the same Account as step (1).