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

Populate Ticket Details From a Ticket Number

Build a form where the visitor enters a ticket number and the form fills in the ticket's title, company, and contact. The visitor confirms they are updating the right ticket before they add their note, and your actions receive the ticket details without a second lookup.


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 now 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​

Select the Actions tab and add the action that posts the update, such as API: Create an Object for a TicketNote. Reference the values you already have:

  • {{input.ticket_number}}
  • {{input.note}}
  • {{input.company_name}}

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.