Import, Export and Publishing
Publishing
Webhook Publishing

Webhook

Publishing your tracking plan to a Webhook

Webhook

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.

Configure the Webhook integration

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.

Payload Format

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 (opens in a new tab) value via the "Vendor" input in the publishing integration config.

AttributeTypeDescription
eventSchemasarray(Snowplow Event Schema)Schema for every event in your tracking plan, following the Snowplow Schema (opens in a new tab) format
contextSchemasarray(Snowplow Context Schema)Schema for every Snowplow context in your tracking plan, following the Snowplow Schema (opens in a new tab) 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.

AttributeTypeDescription
modelAvo ModelJson 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 (opens in a new tab) standard. Example payload can be found here

AttributeTypeDescription
namestringThe name of your Avo workspace
eventsarray(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
AttributeTypeDescription
idstringEvent id
namestringEvent name
eventTypeenum: ["event", "variant"]Indicates if this event is based on an event or an event variant
descriptionstringEvent description and the list of triggers
rulesRulesEvent JSON rules
tagsarray(string)Array of all tags attached to event
categoriesarray(string)Array of category ids this event is attached to
triggersarray({id, description, sourceIds, link, imageUrl})Details about all triggers attached to event
sourcesarray({id, name, implementWithCodegen, destinations})Details about all sources sending event
variantNameoptional stringIf the event is generated from an event variant, this field is provided, contains the event variant name
💡

Each event variant is represented by a standalone event in the JSON payload. It will have the same name, as the base event. Additionally, it will have the variantName field included, with the event variant name defined in the Avo Tracking Plan. You can distinguish an event, that is generated from a variant, from a base/standalone event, by checking the eventType field. The eventType of events that are generated from variants is variant, while regular events have it as event.

Rules Model
AttributeTypeDescription
propertiesPropertiesRuleProperties JSON rules
nameMappingsarray(NameMapping)Name mappings defined for given event

PropertiesRule Model

AttributeTypeDescription
propertiesarray(PropertyRule)Property JSON rules
PropertyRule Model
AttributeTypeDescription
descriptionstringProperty description
typestringProperty type
nameMappingsarray(NameMapping)Name mappings defined for given property
?constDepends on the property typePinned property value
?enumarray(string)Allowed enum values
?operationsarray(string)Array of property ops, e.g. "SnowplowContext"
NameMapping Model for regular workspaces
AttributeTypeDescription
namestringNew mapped name
destinationIdstringEither a destination id for which this event/property mapping applies, or "all", meaning that this event/property mapping applies to all destinations
NameMapping Model for global workspaces in an Organization
AttributeTypeDescription
namestringNew mapped name
workspaceIdstringEither a workspace id for which this event/property mapping applies, or "all", meaning that this event/property mapping applies to all local workspace in the Organization
Metric Model
AttributeTypeDescription
idstringMetric id
namestringMetric name
descriptionstringMetric description
categoriesarray(string)Category ids where this metric is included
typestringOne of Proportion / EventSegmentation / Funnel / Retention
itemsarray of Nested EventEvent descriptions
Nested Event Model
AttributeTypeDescription
eventIdstringEvent id
wherearray(whereFilter)Array of where filters
groupByarray(groupByFilter)array of objects containing property ids to group by
groupByFilter
AttributeTypeDescription
propertyIdstringproperty Id being used in group filter
Where filter
AttributeTypeDescription
propertyIdstringproperty id
operationstringbinary operation as string
valuesarray(t)array of values of the same type
Source Model
AttributeTypeDescription
idstringSource id
namestringSource name
programmingLanguagestringName of programming language (e.g. "JavaScript", "Python")
developmentPlatformstringName of development platform (e.g. "Web", "Android")
destinationsarray(string)Destination ids where this source sends data to
Destination Model
AttributeTypeDescription
idstringDestination id
namestringDestination name
typestringName of the provider (e.g. "Segment", "Mixpanel") where the data is sent to if managed by Avo, "Custom" otherwise.
Category Model
AttributeTypeDescription
idstringCategory id
namestringCategory name
descriptionstringCategory description
metricsarray(string)Metric ids belonging this category
eventsarray(string)Event ids belonging this category
PublishInfo Model
AttributeTypeDescription
branchIdstringBranch id
branchNamestringBranch name
integrationIdstringId of the publish integration (consistently the same for this integration)
integrationNamestringName of the publish integration (seen in Tracking Plan -> publishing -> 'IntegrationName')
publishDateDate stringTimestamp when the webhook was triggered
publishMethod{ "type": type }Description of the publish method, type can be "Manual" and "BranchMerge"
lastUpdateIdidUnique identifier of the last modification made to the tracking plan before the generation of this schema
lastUpdateDateDate stringTime of the last modification made to the tracking plan before the generation of this schema
organizationOrganization ModelProvided if the workspace being published belongs to an organization
Organization Model
AttributeTypeDescription
organizationIdstringOrganization id
globalWorkspaceIdsarray(string)List of all global workspaces in Organization
localWorkspaceIdsarray(string)List of all local workspaces in Organization
workspaceTypestringDescribes the type of the workspace being published, "local" or "global"