← Build log · Part 4 of 8

Three ticket types from one pipeline

We wanted different forms to create different kinds of tickets. A field beat a second pipeline.

HubSpotDesign

The request: several forms, each creating a different type of ticket. The obvious idea is one pipeline per type. We tested it, and the API did accept a second ticket pipeline even on Free. Then we hit the real limit: the Forms API has no setting for which pipeline a form's tickets land in.

The workable design

Keep one pipeline and add a custom ticket property, ticket_type. Each form sets it through a hidden field with a defaultValue, so the visitor never sees it.

  • Learning Support Request sets ticket_type to support.
  • Bug Report sets it to bug.
  • Access Request sets it to access.

Views and reports can then filter by type, which is most of what separate pipelines would have given us. We deleted the experimental pipeline afterwards.

On the website

The three forms are embedded on one page behind a request-type picker. Each embed is a single call to hbspt.forms.create with a form ID, so the page code stays tiny and the form definitions stay in the repository.

Kulkarni Inc.
Notes from building the Kulkarni Inc. stack. See all