Webhook
4 minute read

Introduction
The Webhook integration is a way to get your updated Tracking Plan distributed to an endpoint of your choice. This happens when a branch is merged or when the publish button is clicked in the integration interface.
Webhook URL
To enable the Webhook integration you need to configure it with a URL where you want the updated tracking plan to be delivered.
The Tracking Plan will be delivered with a POST
request containing the Tracking Plan on a JSON format. The only requirement for this endpoint is to return a 200
response status code when it has successfully received the tracking plan.
Currently there are three different payload formats you can choose from for the webhook: Snowplow Schemas, Avo Json, and Json Schema (default).
💡 To see a preview of the exact Webhook payload in your Avo workspace choose Publishing
in the sidebar, then pick your Webhook from the menu and expand the Payload preview
section
Snowplow Schemas
Json containing a Snowplow Schema for every event included in the Publishing integration. These schemas can for example be used to integrate Avo with Snowplow Iglu.
You can provide your own vendor value via the "Vendor" input in the publishing integration config.
Attribute | Type | Description |
---|
eventSchemas | array(Snowplow Event Schema) | Schema for every event in your tracking plan, following the Snowplow Schema format |
contextSchemas | array(Snowplow Context Schema) | Schema for every Snowplow context in your tracking plan, following the Snowplow Schema format |
context | { publishInfo: PublishInfo } | Metadata about the webhook call |
Avo Json
Json representation of the state of your entire Avo workspace. Currently behind a feature flag. Contact us to enable.
Attribute | Type | Description |
---|
model | Avo Model | Json representation of your entire Avo workspace |
context | { publishInfo: PublishInfo } | Metadata about the webhook call |
Json Schema (default)
Json representation of your tracking plan, following the Json Schema standard. Example payload can be found here
Attribute | Type | Description |
---|
name | string | The name of your Avo workspace |
events | array(Event) | Array of Tracking Plan events |
metrics | { metricId: Metric ... } | Objet where each Tracking Plan metric is a field, keys are metric ids |
sources | { sourceId: Source ... } | Objet where each Tracking Plan source is a field, keys are source ids |
destinations | { destinationId: Destination ... } | Objet where each Tracking Plan destination is a field, keys are destination ids |
categories | { categoryId: Category ... } | Objet where each Tracking Plan metric is a field, keys are category ids |
context | { publishInfo: PublishInfo } | Metadata about the webhook call |
Event Model
Attribute | Type | Description |
---|
name | string | Event name |
description | string | Event description and the list of triggers |
rules | Rules | Event JSON rules |
tags | array(string) | Array of all tags attached to event |
categories | array(string) | Array of category ids this event is attached to |
triggers | array({id, description, sourceIds, link, imageUrl}) | Details about all triggers attached to event |
sources | array({id, name, implementWithCodegen, destinations}) | Details about all sources sending event |
Rules Model
Attribute | Type | Description |
---|
properties | PropertiesRule | Properties JSON rules |
nameMappings | array(NameMapping) | Name mappings defined for given event |
PropertiesRule Model
Attribute | Type | Description |
---|
properties | array(PropertyRule) | Property JSON rules |
PropertyRule Model
Attribute | Type | Description |
---|
description | string | Property description |
type | string | Property type |
nameMappings | array(NameMapping) | Name mappings defined for given property |
?const | Depends on the property type | Pinned property value |
?enum | array(string) | Allowed enum values |
?operations | array(string) | Array of property ops, e.g. "SnowplowContext" |
NameMapping Model
Attribute | Type | Description |
---|
name | string | New mapped name |
destinationId | string | Either a destination id for which this property mapping applies, or "all", meaning that this property mapping applies to all destinations |
Metric Model
Attribute | Type | Description |
---|
id | string | Metric id |
name | string | Metric name |
description | string | Metric description |
categories | array(string) | Category ids where this metric is included |
type | string | One of Proportion / EventSegmentation / Funnel / Retention |
items | array of Nested Event | Event descriptions |
Nested Event Model
Attribute | Type | Description |
---|
eventId | string | Event id |
where | array(whereFilter) | Array of where filters |
groupBy | array(groupByFilter) | array of objects containing property ids to group by |
groupByFilter
Attribute | Type | Description |
---|
propertyId | string | property Id being used in group filter |
Where filter
Attribute | Type | Description |
---|
propertyId | string | property id |
operation | string | binary operation as string |
values | array(t) | array of values of the same type |
Source Model
Attribute | Type | Description |
---|
id | string | Source id |
name | string | Source name |
programmingLanguage | string | Name of programming language (e.g. "JavaScript", "Python") |
developmentPlatform | string | Name of development platform (e.g. "Web", "Android") |
destinations | array(string) | Destination ids where this source sends data to |
Destination Model
Attribute | Type | Description |
---|
id | string | Destination id |
name | string | Destination name |
type | string | Name of the provider (e.g. "Segment", "Mixpanel") where the data is sent to if managed by Avo, "Custom" otherwise. |
Category Model
Attribute | Type | Description |
---|
id | string | Category id |
name | string | Category name |
description | string | Category description |
metrics | array(string) | Metric ids belonging this category |
events | array(string) | Event ids belonging this category |
PublishInfo Model
Attribute | Type | Description |
---|
branchId | id | Branch id |
branchName | string | Branch name |
integrationId | string | Id of the publish integration (consistently the same for this integration) |
integrationName | string | Name of the publish integration (seen in Tracking Plan -> publishing -> 'IntegrationName' |
publishDate | Date string | Timestamp when the webhook was triggered |
publishMethod | { "type": type } | Description of the publish method, type can be "Manual" and "BranchMerge" |