[Beta] FormUpdated Event Schema

[Beta] FormUpdated Webhook Payload

Example

{
    "eventId": "017db07f-6e95-470e-8cc0-a371f9deed2b",
    "eventTime": "1970-01-20T06:39:05.683Z",
    "eventType": "FormUpdated",
    "orgId": 20936,
    "webhookId": "1411751028848270",
    "data": {
        "form": {
            "approvalDetails": {
                "comment": "Requesting some changes to the submission."
            },
            "asset": {
                "entryType": "tracked",
                "externalIds": {
                    "maintenanceId": "250020"
                },
                "id": "281474982859091",
                "name": "trailer 123"
            },
            "assignedAtTime": "2019-06-13T19:08:25Z",
            "assignedTo": {
                "id": "938172",
                "type": "driver"
            },
            "createdAtTime": "2019-06-13T19:08:25Z",
            "dueAtTime": "2019-06-13T19:08:25Z",
            "durationMs": 105000,
            "externalIds": {
                "maintenanceId": "250020"
            },
            "fields": [
                {
                    "assetValue": {
                        "asset": {
                            "entryType": "tracked",
                            "externalIds": {
                                "maintenanceId": "250020"
                            },
                            "id": "281474982859091",
                            "name": "trailer 123"
                        }
                    },
                    "barcodeValue": {
                        "barcodes": [
                            {
                                "value": "1A2B3C4D5E"
                            }
                        ]
                    },
                    "checkBoxesValue": {
                        "value": [
                            "Option A",
                            "Option B"
                        ],
                        "valueIds": [
                            "0cbbddb3-2541-4889-b4eb-92171cbfc142",
                            "d33198cb-369f-4278-8120-d92d3ebf74bf"
                        ]
                    },
                    "dateTimeValue": {
                        "dateValue": "2024-08-08",
                        "type": "datetime",
                        "value": "2024-08-08T18:53:23Z"
                    },
                    "geofenceValue": {
                        "geofence": {
                            "address": "123 Main St, Anytown, USA 12345",
                            "entryType": "tracked",
                            "externalIds": {
                                "siteId": "54"
                            },
                            "id": "1234567890",
                            "name": "Geofence Name"
                        }
                    },
                    "id": "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7",
                    "issue": {
                        "externalIds": {
                            "maintenanceId": "250020"
                        },
                        "id": "12345"
                    },
                    "label": "Engine Hours",
                    "mediaList": [
                        {
                            "id": "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7",
                            "processingStatus": "processing",
                            "url": "https://samsara-forms-submission-media-uploads.s3.us-west-2.amazonaws.com/123456",
                            "urlExpiresAt": "2019-06-13T19:08:25Z"
                        }
                    ],
                    "mediaValue": {
                        "mediaList": [
                            {
                                "id": "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7",
                                "processingStatus": "processing",
                                "url": "https://samsara-forms-submission-media-uploads.s3.us-west-2.amazonaws.com/123456",
                                "urlExpiresAt": "2019-06-13T19:08:25Z"
                            }
                        ]
                    },
                    "multipleChoiceValue": {
                        "value": "Yes",
                        "valueId": "94096370-7228-4d83-ae5d-b20f3e45c0fc"
                    },
                    "note": "Fire and oil can lead to an accident.",
                    "numberValue": {
                        "value": 123.456
                    },
                    "personValue": {
                        "person": {
                            "entryType": "tracked",
                            "name": "Jake",
                            "polymorphicUserId": {
                                "id": "938172",
                                "type": "driver"
                            }
                        }
                    },
                    "signatureValue": {
                        "media": {
                            "id": "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7",
                            "processingStatus": "processing",
                            "url": "https://samsara-forms-submission-media-uploads.s3.us-west-2.amazonaws.com/123456",
                            "urlExpiresAt": "2019-06-13T19:08:25Z"
                        }
                    },
                    "tableValue": {
                        "columns": [
                            {
                                "id": "field-uuid-store-number",
                                "label": "Store Number",
                                "type": "number"
                            }
                        ],
                        "rows": [
                            {
                                "cells": [
                                    {
                                        "barcodeValue": {
                                            "barcodes": [
                                                {
                                                    "value": "1A2B3C4D5E"
                                                }
                                            ]
                                        },
                                        "checkBoxesValue": {
                                            "value": [
                                                "Option A",
                                                "Option B"
                                            ],
                                            "valueIds": [
                                                "0cbbddb3-2541-4889-b4eb-92171cbfc142",
                                                "d33198cb-369f-4278-8120-d92d3ebf74bf"
                                            ]
                                        },
                                        "dateTimeValue": {
                                            "dateValue": "2024-08-08",
                                            "type": "datetime",
                                            "value": "2024-08-08T18:53:23Z"
                                        },
                                        "id": "field-uuid-store-number",
                                        "mediaValue": {
                                            "mediaList": [
                                                {
                                                    "id": "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7",
                                                    "processingStatus": "processing",
                                                    "url": "https://samsara-forms-submission-media-uploads.s3.us-west-2.amazonaws.com/123456",
                                                    "urlExpiresAt": "2019-06-13T19:08:25Z"
                                                }
                                            ]
                                        },
                                        "multipleChoiceValue": {
                                            "value": "Yes",
                                            "valueId": "94096370-7228-4d83-ae5d-b20f3e45c0fc"
                                        },
                                        "numberValue": {
                                            "value": 123.456
                                        },
                                        "personValue": {
                                            "person": {
                                                "entryType": "tracked",
                                                "name": "Jake",
                                                "polymorphicUserId": {
                                                    "id": "938172",
                                                    "type": "driver"
                                                }
                                            }
                                        },
                                        "signatureValue": {
                                            "media": {
                                                "id": "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7",
                                                "processingStatus": "processing",
                                                "url": "https://samsara-forms-submission-media-uploads.s3.us-west-2.amazonaws.com/123456",
                                                "urlExpiresAt": "2019-06-13T19:08:25Z"
                                            }
                                        },
                                        "textValue": {
                                            "value": "Exposed wires"
                                        },
                                        "type": "number"
                                    }
                                ],
                                "id": "submission-uuid-of-row"
                            }
                        ]
                    },
                    "textValue": {
                        "value": "Exposed wires"
                    },
                    "type": "number"
                }
            ],
            "formTemplate": {
                "id": "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7",
                "revisionId": "1214a1fa-f0c6-408b-bf85-51dc3bc71ac7"
            },
            "geofence": {
                "address": "123 Main St, Anytown, USA 12345",
                "entryType": "tracked",
                "externalIds": {
                    "siteId": "54"
                },
                "id": "1234567890",
                "name": "Geofence Name"
            },
            "id": "9814a1fa-f0c6-408b-bf85-51dc3bc71ac7",
            "isRequired": true,
            "location": {
                "latitude": 12333122.3,
                "longitude": 1233331.4
            },
            "routeId": "123456789",
            "routeStopId": "987654321",
            "score": {
                "maxPoints": 80,
                "scorePercent": 75,
                "scorePoints": 60
            },
            "status": "notStarted",
            "submittedAtTime": "2019-06-13T19:08:25Z",
            "submittedBy": {
                "id": "938172",
                "type": "driver"
            },
            "title": "Form Submission Title",
            "updatedAtTime": "2019-06-13T19:08:25Z",
            "workOrderId": "123456789"
        }
    }
}

Reference

Property NameDescription
form
object
Form submission details in standard FormSubmitted and FormUpdated events.
 approvalDetails
 object
The value of the approval details for a forms product submission.
  comment
  string
Comment from the approver when requesting changes or approving the submission.
 asset
 object
Tracked or untracked (i.e. manually entered) asset object.
  entryType
  string
The type of entry for the asset. Valid values: tracked, untracked.
  externalIds
  object
A map of external ids
  id
  string
ID of a tracked asset. Included if 'entryType' is tracked.
  name
  string
Name of an untracked (i.e. manually entered) asset.
 assignedAtTime
 string
Assignment time of the form submission. Sometimes returned if the submission was assigned to a user or driver. UTC timestamp in RFC 3339 format.
 assignedTo
 object
User or driver object.
  id
  string
ID of the polymorphic user.
  type
  string
The type of the polymorphic user. Valid values: driver, user.
 createdAtTime
 string
Creation time of the form submission. UTC timestamp in RFC 3339 format.
 dueAtTime
 string
Time of when the submission is due. Sometimes returned, if the submission has a due date. UTC timestamp in RFC 3339 format.
 durationMs
 integer
Duration between when the form submission was started on the client and submitted, in milliseconds. Omitted until the form is actually submitted or when the client start timestamp was not recorded.
 externalIds
 object
A map of external ids
 fields
 object array
List of field inputs in a form submission.
  assetValue
  object
The value of an asset form input field.
   asset
   object
Tracked or untracked (i.e. manually entered) asset object.
    entryType
    string
The type of entry for the asset. Valid values: tracked, untracked.
    externalIds
    object
A map of external ids
    id
    string
ID of a tracked asset. Included if 'entryType' is tracked.
    name
    string
Name of an untracked (i.e. manually entered) asset.
  barcodeValue
  object
The value of a barcode form input field.
   barcodes
   object array
List of barcode entries.
    value
    string
The captured barcode value.
  checkBoxesValue
  object
The value of a check boxes form input field.
   value
   string array
List of selected options.
   valueIds
   string array
List of selected option IDs.
  dateTimeValue
  object
The value of a datetime form input field.
   dateValue
   string
Calendar date in YYYY-MM-DD format in the stored field timezone. Present when type is date (date-only fields).
   type
   string
The type of datetime format. Valid values: datetime, date, time.
   value
   string
UTC timestamp in RFC 3339 format.
  geofenceValue
  object
The value of a geofence form input field.
   geofence
   object
Tracked or untracked (i.e. manually entered) geofence object.
    address
    string
Address of the geofence. Included if 'entryType' is tracked.
    entryType
    string
The type of entry for the geofence. Valid values: tracked, untracked.
    externalIds
    object
A map of external ids
    id
    string
ID of the tracked geofence. Included if 'entryType' is tracked.
    name
    string
Name of an untracked (i.e. manually entered) geofence.
  id
  string
ID of the forms input field object.
  issue
  object
Issue created from this form input field input object.
   externalIds
   object
A map of external ids
   id
   string
ID of the issue created from this form input field input object.
  label
  string
Forms input field label.
  mediaList
  object array
List of forms media record objects.
   id
   string
ID of the media record.
   processingStatus
   string
Status of the media record. Valid values: unknown, processing, finished.
   url
   string
URL containing a link to associated media content. Included if 'processingStatus' is 'finished'.
   urlExpiresAt
   string
Expiration time of the media record 'url'. UTC timestamp in RFC 3339 format.
  mediaValue
  object
The value of a media form input field.
   mediaList
   object array
List of forms media record objects.
    id
    string
ID of the media record.
    processingStatus
    string
Status of the media record. Valid values: unknown, processing, finished.
    url
    string
URL containing a link to associated media content. Included if 'processingStatus' is 'finished'.
    urlExpiresAt
    string
Expiration time of the media record 'url'. UTC timestamp in RFC 3339 format.
  multipleChoiceValue
  object
The value of a multiple choice form input field.
   value
   string
Selected option.
   valueId
   string
ID of the selected option.
  note
  string
A note attached to the field input.
  numberValue
  object
The value of a number form input field.
   value
   number
Number value.
  personValue
  object
The value of a person form input field.
   person
   object
Tracked or untracked (i.e. manually entered) person object.
    entryType
    string
The type of entry for the person. Valid values: tracked, untracked.
    name
    string
Name of an untracked (i.e. manually entered) person.
    polymorphicUserId
    object
User or driver object.
     id
     string
ID of the polymorphic user.
     type
     string
The type of the polymorphic user. Valid values: driver, user.
  signatureValue
  object
The value of a signature form input field.
   media
   object
Forms media record object.
    id
    string
ID of the media record.
    processingStatus
    string
Status of the media record. Valid values: unknown, processing, finished.
    url
    string
URL containing a link to associated media content. Included if 'processingStatus' is 'finished'.
    urlExpiresAt
    string
Expiration time of the media record 'url'. UTC timestamp in RFC 3339 format.
  tableValue
  object
The value of a table form input field.
   columns
   object array
List of table columns.
    id
    string
Unique identifier for the column.
    label
    string
Label of the column.
    type
    string
Type of the column field. Valid values: text, number, datetime, check_boxes, multiple_choice, signature, media, person, barcode.
   rows
   object array
List of table rows.
    cells
    object array
List of cells in the row.
     barcodeValue
     object
The value of a barcode form input field.
      barcodes
      object array
List of barcode entries.
       value
       string
The captured barcode value.
     checkBoxesValue
     object
The value of a check boxes form input field.
      value
      string array
List of selected options.
      valueIds
      string array
List of selected option IDs.
     dateTimeValue
     object
The value of a datetime form input field.
      dateValue
      string
Calendar date in YYYY-MM-DD format in the stored field timezone. Present when type is date (date-only fields).
      type
      string
The type of datetime format. Valid values: datetime, date, time.
      value
      string
UTC timestamp in RFC 3339 format.
     id
     string
Unique identifier for the cell.
     mediaValue
     object
The value of a media form input field.
      mediaList
      object array
List of forms media record objects.
       id
       string
ID of the media record.
       processingStatus
       string
Status of the media record. Valid values: unknown, processing, finished.
       url
       string
URL containing a link to associated media content. Included if 'processingStatus' is 'finished'.
       urlExpiresAt
       string
Expiration time of the media record 'url'. UTC timestamp in RFC 3339 format.
     multipleChoiceValue
     object
The value of a multiple choice form input field.
      value
      string
Selected option.
      valueId
      string
ID of the selected option.
     numberValue
     object
The value of a number form input field.
      value
      number
Number value.
     personValue
     object
The value of a person form input field.
      person
      object
Tracked or untracked (i.e. manually entered) person object.
       entryType
       string
The type of entry for the person. Valid values: tracked, untracked.
       name
       string
Name of an untracked (i.e. manually entered) person.
       polymorphicUserId
       object
User or driver object.
        id
        string
ID of the polymorphic user.
        type
        string
The type of the polymorphic user. Valid values: driver, user.
     signatureValue
     object
The value of a signature form input field.
      media
      object
Forms media record object.
       id
       string
ID of the media record.
       processingStatus
       string
Status of the media record. Valid values: unknown, processing, finished.
       url
       string
URL containing a link to associated media content. Included if 'processingStatus' is 'finished'.
       urlExpiresAt
       string
Expiration time of the media record 'url'. UTC timestamp in RFC 3339 format.
     textValue
     object
The value of a text form input field.
      value
      string
Text value.
     type
     string
Type of the cell field. Valid values: number, text, multiple_choice, check_boxes, datetime, signature, media, person, barcode.
    id
    string
Unique identifier for the row.
  textValue
  object
The value of a text form input field.
   value
   string
Text value.
  type
  string
Type of the field. Valid values: number, text, multiple_choice, check_boxes, datetime, signature, media, asset, table, person, geofence, barcode.
 formTemplate
 object
Form template reference object.
  id
  string
ID of the form template.
  revisionId
  string
ID of the form template revision.
 geofence
 object
Tracked or untracked (i.e. manually entered) geofence object.
  address
  string
Address of the geofence. Included if 'entryType' is tracked.
  entryType
  string
The type of entry for the geofence. Valid values: tracked, untracked.
  externalIds
  object
A map of external ids
  id
  string
ID of the tracked geofence. Included if 'entryType' is tracked.
  name
  string
Name of an untracked (i.e. manually entered) geofence.
 id
 string
ID of the form submission.
 isRequired
 boolean
Indicates whether the worker is required to complete this form or not. Always returned.
 location
 object
Form template location object.
  latitude
  number
Latitude of a location.
  longitude
  number
Longitude of a location.
 routeId
 string
ID of the route. Sometimes returned if the submission was assigned to a route stop.
 routeStopId
 string
ID of the route stop. Sometimes returned if the submission was assigned to a route stop.
 score
 object
Forms score object.
  maxPoints
  number
Total possible points of the form submission.
  scorePercent
  number
Percentage score of the form submission, calculated as scorePoints / maxPoints.
  scorePoints
  number
Score, in points, of the form submission.
 status
 string
State for the Form Submission. Always returned. Valid values: notStarted, completed, archived, inProgress, needsReview, changesRequested, approved, denied.
 submittedAtTime
 string
Submission time of the form submission. UTC timestamp in RFC 3339 format.
 submittedBy
 object
User or driver object.
  id
  string
ID of the polymorphic user.
  type
  string
The type of the polymorphic user. Valid values: driver, user.
 title
 string
Title of the form submission. Sometimes returned if the submission has a title.
 updatedAtTime
 string
Update time of the form submission. UTC timestamp in RFC 3339 format.
 workOrderId
 string
ID of a work order linked to this form. Included for work-order-level form attachments; service-task form references are not included.

Did this page help you?