Skip to main content
Limited Release
Forms are in limited release and are not generally available. Contact your account manager to request access.

Show Ticket Details From a Ticket Number

Customers who update a ticket through a form often mistype the ticket number, and the note lands on the wrong ticket or nowhere at all. Build a form where the visitor enters a ticket number and the form shows the ticket's title, company, and contact. The visitor confirms they are updating the right ticket before they add their note.


Overview​

PiecePurpose
ticket_number fieldThe number the visitor types.
Look up ticket workflowQueries Autotask for the ticket with that number.
ticket_title, company_name, contact_name fieldsCalculated. Confirm the matched ticket back to the visitor.
note fieldThe update the visitor wants to add.

Related pages:


Before You Start​

  1. Connect Autotask. See Autotask Connections.
  2. Create a form and give it a name. See Forms.

Step 1: Add the Visitor's Fields​

Select the Input tab and add two fields.

FieldValue
Nameticket_number
LabelTicket number
TypeString
RequiredChecked
DescriptionEnter the ticket number from your confirmation email, such as T20260101.0001.
FieldValue
Namenote
LabelWhat would you like to add?
TypeTextarea
RequiredChecked

Step 2: Create the Lookup Workflow​

Select the Pre-Submission Workflows tab, then select Add Workflow.

FieldValue
NameLook up ticket
Run this workflow onField change
Recalculate when these fields changeticket_number

Select Add Action and add API: Query for One Object.

SettingValue
Store the results in variableticket
Autotask Entity Type to QueryTicket
Query conditionTicketNumber equals {{input.ticket_number}}

Select Save Workflow.

The query returns the ticket together with its linked entities, so properties such as custom.ticket.Title, custom.ticket.Account.AccountName, and custom.ticket.Contact.FirstName become available.


Step 3: Add the Confirmation Fields​

Return to the Input tab and add three calculated fields. Each one uses Type String with Populate this field with a Pre-Submission Workflow output checked and Pre-Submission Workflow set to Look up ticket.

NameLabelProperty
ticket_titleTicketcustom.ticket.Title
company_nameCompanycustom.ticket.Account.AccountName
contact_nameContactcustom.ticket.Contact.FirstName

Use the field row arrows to place these fields directly under ticket_number, so the visitor sees the confirmation before they write their note.


Step 4: Require a Match Before Submitting​

Select the Advanced tab.

  1. Select Restrict submission with a condition.
  2. Set Submission behavior to Allow only if condition matches.
  3. Add a rule: Workflow: Look up ticket / custom.ticket.id is not empty.

A visitor who mistypes the ticket number sees "This form cannot be submitted with the current values." instead of creating an orphaned note. The empty confirmation fields show them why.


Step 5: Add the Note to the Ticket​

The form's Actions receive the visitor's fields, including the calculated ones such as {{input.ticket_title}} and {{input.company_name}}. Pre-Submission Workflow results that you did not map to a field do not carry over, so look the ticket up again to get its ID.

Select the Actions tab and add two actions:

  1. API: Query for One Object: store the results in ticket, query the Ticket entity where TicketNumber equals {{input.ticket_number}}, and check Generate an exception if no results.
  2. API: Create an Object: create a TicketNote with TicketID set to {{custom.ticket.id}}, Description set to {{input.note}}, and the note's other required fields, such as Title.

Save the form.


Step 6: Test It​

  1. Open the public URL and enter a real ticket number.
  2. Click out of the field. The confirmation fields show "Calculating…", then the ticket details.
  3. Enter a note and submit.
  4. Enter a ticket number that does not exist. The confirmation fields stay blank and the form refuses the submission.

Next Steps​

  • Restrict the form to open tickets by adding a second query condition on Status.
  • Verify the visitor's identity as well as the ticket number. See Verify a Ticket Secret Key.