Custom Columns

Custom columns are supported in the importer and validation webhooks.

Custom Columns

A custom column is denoted in the columns array with the field is_custom: true. The values of a custom column are included as a JSON object in a key called $custom. The keys of the object are indexes into the columns array.

For instance, an importer webhook response may look something like this:

{
  "event_id": "123e4567-e89b-12d3-a456-426614174000",
  ...
  "columns": [
    {
      "sheet_column_name": "First Name",
      "template_column_name": "First Name",
      "template_column_key": "first_name"
    },
    {
      "sheet_column_name": "Last Name",
      "template_column_name": "Last Name",
      "template_column_key": "last_name"
    },
    {
      "sheet_column_name": "Email",
      "template_column_name": "Email",
      "template_column_key": "email"
    },
    {
      "sheet_column_name": "Priority",
      "template_column_name": "Priority",
      "template_column_key": "priority",
      "is_custom": true
    }
  ],
  "data": {
    "count": 262,
    "records": [
      {
        "first_name": "Aditi",
        "last_name": "Goel",
        "email": "[email protected]",
        "$custom": {
          "3": "HIGH"
        }
      },
      ...
    ],
    "error_records": [
      ...
    ]
  }
}

In this example, "priority" is a custom column. It is the fourth column in the columns Array, so its index is 3.