> ## Documentation Index
> Fetch the complete documentation index at: https://docs.morf.health/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Routing Form Submission

> Event payload details and trigger documentation for Routing Form Submission data from Calendly

<img src="https://mintcdn.com/morfhealth/EU2WCxuXGIUQcziR/images/calendly.svg?fit=max&auto=format&n=EU2WCxuXGIUQcziR&q=85&s=331bbecf9811bc90d9a595cea1b71b16" alt="images/calendly.svg" width="40" height="40" data-path="images/calendly.svg" />

# Events

## Triggering Webhook Types

The following event types are associated with the Routing Form Submission event payload from Calendly.

* `Calendly Routing Form Submission Created`

<RequestExample>
  ```json Example theme={null}
  {
    "created_at": "2024-01-01T09:00:00Z",
    "questions_and_answers": [
      {
        "answer": "Project planning and timelines",
        "position": 1,
        "question": "What topics would you like to discuss?"
      }
    ],
    "routing_form": "https://api.calendly.com/routing_forms/AAAAAAAAAAAAAAAA",
    "submitter": "https://api.calendly.com/users/AAAAAAAAAAAAAAAA",
    "submitter_type": "Invitee",
    "tracking": {
      "salesforce_uuid": "00Q1a000004WHchEAG",
      "utm_campaign": "spring_sale",
      "utm_content": "textad",
      "utm_medium": "cpc",
      "utm_source": "google",
      "utm_term": "scheduling+software"
    },
    "updated_at": "2024-01-01T09:00:00Z",
    "uri": "https://api.calendly.com/routing_form_submissions/AAAAAAAAAAAAAAAA"
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Description theme={null}
  {
    "created_at": "The moment the routing form was submitted.",
    "questions_and_answers": {
      "answer": "The answer provided by the invitee",
      "position": "The order position of this question",
      "question": "The question text"
    },
    "routing_form": "The URI of the routing form that's associated with the submission.",
    "submitter": "URI reference to the form submitter",
    "submitter_type": "Type of the respondent resource that submitted the form and scheduled a meeting.",
    "tracking": {
      "salesforce_uuid": "Salesforce UUID for tracking",
      "utm_campaign": "UTM campaign tracking parameter",
      "utm_content": "UTM content tracking parameter",
      "utm_medium": "UTM medium tracking parameter",
      "utm_source": "UTM source tracking parameter",
      "utm_term": "UTM term tracking parameter"
    },
    "updated_at": "The moment when the routing form submission was last updated.",
    "uri": "Canonical reference (unique identifier) for the routing form submission."
  }
  ```
</ResponseExample>

### Payload Field Details

<ResponseField name="Routing Form Submission" type="Event Payload">
  <Expandable title="fields" defaultOpen="true">
    <ResponseField name="uri" type="string" required>
      Canonical reference (unique identifier) for the routing form submission.

      ```json CEL theme={null}
      uri
      ```

      ```json Example theme={null}
      "https://api.calendly.com/routing_form_submissions/AAAAAAAAAAAAAAAA"
      ```
    </ResponseField>

    <ResponseField name="routing_form" type="string" required>
      The URI of the routing form that's associated with the submission.

      ```json CEL theme={null}
      routing_form
      ```

      ```json Example theme={null}
      "https://api.calendly.com/routing_forms/AAAAAAAAAAAAAAAA"
      ```
    </ResponseField>

    <ResponseField name="questions_and_answers" type="[]object" required>
      All Routing Form Submission questions with answers.

      ```json CEL theme={null}
      questions_and_answers
      ```

      ```json Example theme={null}
      [
      {
      "answer": "Project planning and timelines",
      "position": 1,
      "question": "What topics would you like to discuss?"
      }
      ]
      ```
    </ResponseField>

    <ResponseField name="questions_and_answers.map(x, x.question)" type="[]string" required>
      Mapped array of: The question text

      ```json CEL theme={null}
      questions_and_answers.map(x, x.question)
      ```

      ```json Example theme={null}
      [
      "What topics would you like to discuss?"
      ]
      ```
    </ResponseField>

    <ResponseField name="questions_and_answers.map(x, x.answer)" type="[]string" required>
      Mapped array of: The answer provided by the invitee

      ```json CEL theme={null}
      questions_and_answers.map(x, x.answer)
      ```

      ```json Example theme={null}
      [
      "Project planning and timelines"
      ]
      ```
    </ResponseField>

    <ResponseField name="questions_and_answers.map(x, x.position)" type="[]float64 (double)" required>
      Mapped array of: The order position of this question

      ```json CEL theme={null}
      questions_and_answers.map(x, x.position)
      ```

      ```json Example theme={null}
      [
      1
      ]
      ```
    </ResponseField>

    <ResponseField name="tracking" type="object" required>
      The UTM and Salesforce tracking parameters associated with a Routing Form Submission.

      ```json CEL theme={null}
      tracking
      ```

      ```json Example theme={null}
      {
      "salesforce_uuid": "00Q1a000004WHchEAG",
      "utm_campaign": "spring_sale",
      "utm_content": "textad",
      "utm_medium": "cpc",
      "utm_source": "google",
      "utm_term": "scheduling+software"
      }
      ```
    </ResponseField>

    <ResponseField name="tracking.utm_campaign" type="string">
      UTM campaign tracking parameter

      ```json CEL theme={null}
      tracking.utm_campaign
      ```

      ```json Example theme={null}
      "spring_sale"
      ```
    </ResponseField>

    <ResponseField name="tracking.utm_source" type="string">
      UTM source tracking parameter

      ```json CEL theme={null}
      tracking.utm_source
      ```

      ```json Example theme={null}
      "google"
      ```
    </ResponseField>

    <ResponseField name="tracking.utm_medium" type="string">
      UTM medium tracking parameter

      ```json CEL theme={null}
      tracking.utm_medium
      ```

      ```json Example theme={null}
      "cpc"
      ```
    </ResponseField>

    <ResponseField name="tracking.utm_content" type="string">
      UTM content tracking parameter

      ```json CEL theme={null}
      tracking.utm_content
      ```

      ```json Example theme={null}
      "textad"
      ```
    </ResponseField>

    <ResponseField name="tracking.utm_term" type="string">
      UTM term tracking parameter

      ```json CEL theme={null}
      tracking.utm_term
      ```

      ```json Example theme={null}
      "scheduling+software"
      ```
    </ResponseField>

    <ResponseField name="tracking.salesforce_uuid" type="string">
      Salesforce UUID for tracking

      ```json CEL theme={null}
      tracking.salesforce_uuid
      ```

      ```json Example theme={null}
      "00Q1a000004WHchEAG"
      ```
    </ResponseField>

    <ResponseField name="submitter" type="string">
      URI reference to the form submitter

      ```json CEL theme={null}
      submitter
      ```

      ```json Example theme={null}
      "https://api.calendly.com/users/AAAAAAAAAAAAAAAA"
      ```
    </ResponseField>

    <ResponseField name="submitter_type" type="string">
      Type of the respondent resource that submitted the form and scheduled a meeting.

      ```json CEL theme={null}
      submitter_type
      ```

      ```json Example theme={null}
      "Invitee"
      ```
    </ResponseField>

    <ResponseField name="created_at" type="timing.v1.Timestamp" required>
      The moment the routing form was submitted.

      ```json CEL theme={null}
      created_at
      ```

      ```json Example theme={null}
      "2024-01-01T09:00:00Z"
      ```
    </ResponseField>

    <ResponseField name="updated_at" type="timing.v1.Timestamp" required>
      The moment when the routing form submission was last updated.

      ```json CEL theme={null}
      updated_at
      ```

      ```json Example theme={null}
      "2024-01-01T09:00:00Z"
      ```
    </ResponseField>
  </Expandable>
</ResponseField>
