Adding Ticket Email Service processing rules
When an alert email is received at addticket@autotask.net, the Add Ticket Email Service (ATES) uses the service information in the alert, along with the information in the appended XML token, to create a Ticket. The Service uses the Customer name and Email values to retrieve Autotask Organization information.
When an organization is matched, but no matching contact is found for the organization, if the XML token includes the Contact Name tag (<Contact name="firstname lastname"/>), ATES attempts to create the contact in Autotask. This is especially useful if your Autotask instance uses a workflow rule to notify the contact when a ticket is created. Refer toAdding a contact in Autotask from ATES.
NOTE ATES uses the email Subject as the Title for the new ticket in Autotask, and the email Body above the XML token for the ticket Description. Because Autotask tickets require a title, if the Subject line for the incoming ticket is empty, the ticket title will be "New Ticket - <Date / Time>", with the time zone and date/time format honoring the default internal location settings.
Matching customer name and email name values
If the XML token contains a Customer name value without an Email name value, the Service searches Autotask Organization Names for an exact match to the Customer name element value.
- If an exact match is found, the service assigns the ticket to that organization.
- If no match is found, the Service assigns the ticket to organization ID: 0 (assigned to your local organization). A message is added to the ticket Description indicating failure to find a match for the submitted Customer name.
If the XML contains an Email name value without a Customer name value, the Service searches all Autotask Contact Email Addresses for an exact match to the Email name element value. If no primary email address match is found, the Service searches all Email Address 2, and if there is still no match, Address 3.
NOTE If there is more than one match, as with parent-sub-organizations with the same email address, the Service assigns the ticket to organization ID: 0 and a message is added to the ticket Description indicating that the email address belongs to multiple customers.
- If an exact match is found, the service determines the Autotask organization associated with the Contact Email Address and then assigns that organization ID and ticket Contact to the ticket.
- If no match is found and there is no Customer name value, the Service parses the email address to determine the domain name and attempts to match the domain name to the Organization Web address.
If a match is found for the domain name, the Service assigns the corresponding organization ID to the ticket and includes a message indicating that the organization was determined by the domain name of the submitted email, but no contact was found.
If no match is found for the domain name, the Service assigns the ticket to organization ID: 0 (assigned to your local organization). A message is added to the ticket Description indicating failure to find a match for the submitted email address.
If the XML contains a Customer name value and an Email name value, the Service first searches Autotask Organization Names for an exact match to the Customer name value.
- If no match is found for the Customer name value, the Service assigns the ticket to organization ID: 0 (assigned to your local organization) and the Service ignores the Email value. A message is added to the ticket Description indicating that no match for the Customer value was found.
- If a match is found for the Customer value, the Service assigns that organization ID to the ticket.
- The Service then attempts to match the email value with an email address for a contact for the organization.
If a match is found, that Contact is assigned to the ticket.
If no match is found, and the email does not include a Contact name value, the Service does not assign a Contact to the ticket. A message is added to the ticket indicating that no match was found for the contact email address.
If no match is found but the XML includes a Contact Name value, the service attempts to create a contact in Autotask and that contact is assigned to the organization. Refer to details underAdding a contact in Autotask from ATES.
If the XML contains the optional Sub-issue Type value, the following occurs:
The Service searches for exact match for the SubIssue element value in the Autotask Sub-issue Types list.
- If an exact match is found, the Service assigns that Sub-issue Type to the ticket.
- If a match is not found, no Sub-issue Type is assigned to the ticket and a message is added to the ticket Description indicating that no match was found for the submitted Sub-issue Type value.
If the XML contains a Device ID value that maps to a device but the Customer name value does not map to the organization that the device is associated with, the following occurs:
- If the Customer name value does not map to any Autotask organization, the ticket is created for the organization that the device is associated with.
- If the Customer name value maps to an organization that is different from the Device's associated organization, then the ticket is created for the organization that matches the Customer name value and a note is added to the description indicating that a Device ID was specified, but could not be mapped.