-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add com.delighted schemas #660
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"jsonpaths": [ | ||
"$.schema.vendor", | ||
"$.schema.name", | ||
"$.schema.format", | ||
"$.schema.version", | ||
"$.hierarchy.rootId", | ||
"$.hierarchy.rootTstamp", | ||
"$.hierarchy.refRoot", | ||
"$.hierarchy.refTree", | ||
"$.hierarchy.refParent", | ||
"$.data.event_data.comment", | ||
"$.data.event_data.created_at", | ||
"$.data.event_data.id", | ||
"$.data.event_data.notes", | ||
"$.data.event_data.permalink", | ||
"$.data.event_data.person.created_at", | ||
"$.data.event_data.person.email", | ||
"$.data.event_data.person.id", | ||
"$.data.event_data.person.name", | ||
"$.data.event_data.person.phone_number", | ||
"$.data.event_data.person_properties.Browser", | ||
"$.data.event_data.person_properties.Country", | ||
"$.data.event_data.person_properties.Device Type", | ||
"$.data.event_data.person_properties.IP Address", | ||
"$.data.event_data.person_properties.Operating System", | ||
"$.data.event_data.person_properties.Page", | ||
"$.data.event_data.person_properties.Page URL", | ||
"$.data.event_data.person_properties.Referrer URL", | ||
"$.data.event_data.person_properties.User Agent", | ||
"$.data.event_data.person_properties.delighted_source", | ||
"$.data.event_data.person_properties.user_id", | ||
"$.data.event_data.score", | ||
"$.data.event_data.survey_type", | ||
"$.data.event_data.tags", | ||
"$.data.event_data.updated_at", | ||
"$.data.event_id", | ||
"$.data.event_type" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"jsonpaths": [ | ||
"$.schema.vendor", | ||
"$.schema.name", | ||
"$.schema.format", | ||
"$.schema.version", | ||
"$.hierarchy.rootId", | ||
"$.hierarchy.rootTstamp", | ||
"$.hierarchy.refRoot", | ||
"$.hierarchy.refTree", | ||
"$.hierarchy.refParent", | ||
"$.data.event_data.comment", | ||
"$.data.event_data.created_at", | ||
"$.data.event_data.id", | ||
"$.data.event_data.notes", | ||
"$.data.event_data.permalink", | ||
"$.data.event_data.person.created_at", | ||
"$.data.event_data.person.email", | ||
"$.data.event_data.person.id", | ||
"$.data.event_data.person.name", | ||
"$.data.event_data.person.phone_number", | ||
"$.data.event_data.person_properties.Browser", | ||
"$.data.event_data.person_properties.Country", | ||
"$.data.event_data.person_properties.Device Type", | ||
"$.data.event_data.person_properties.IP Address", | ||
"$.data.event_data.person_properties.Operating System", | ||
"$.data.event_data.person_properties.Page", | ||
"$.data.event_data.person_properties.Page URL", | ||
"$.data.event_data.person_properties.Referrer URL", | ||
"$.data.event_data.person_properties.User Agent", | ||
"$.data.event_data.person_properties.delighted_source", | ||
"$.data.event_data.person_properties.user_id", | ||
"$.data.event_data.score", | ||
"$.data.event_data.survey_type", | ||
"$.data.event_data.tags", | ||
"$.data.event_data.updated_at", | ||
"$.data.event_id", | ||
"$.data.event_type" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,163 @@ | ||
{ | ||
"$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#", | ||
"description": "Schema for a Delighted survey response created", | ||
"self": { | ||
"vendor": "com.delighted", | ||
"name": "survey_response_created", | ||
"format": "jsonschema", | ||
"version": "1-0-0" | ||
}, | ||
"type": "object", | ||
"properties": { | ||
"event_type": { | ||
"type": "string", | ||
"enum": ["survey_response.created"], | ||
"description": "This describes what kind of event triggered this webhook. It is composed of an object type and an action, separated by a period" | ||
}, | ||
"event_id": { | ||
"type": "string", | ||
"maxLength": 64, | ||
"description": "The event_id can be used to deduplicate notifications that may be delivered more than once" | ||
}, | ||
"event_data": { | ||
"type": "object", | ||
"properties": { | ||
"id": { | ||
"type": "string", | ||
"maxLength": 20, | ||
"description": "Response id" | ||
}, | ||
"person": { | ||
"type": "object", | ||
"properties": { | ||
"id": { | ||
"type": "string", | ||
"description": "Responder id", | ||
"maxLength": 25 | ||
}, | ||
"email": { | ||
"type": ["string", "null"], | ||
"maxLength": 255, | ||
"description": "Responder email address" | ||
}, | ||
"name": { | ||
"type": ["string", "null"], | ||
"maxLength": 255, | ||
"description": "Responder name" | ||
}, | ||
"created_at": { | ||
"type": "integer", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using integers for all the timestamps is going to bleed complexity downstream into all consumers of these events. How difficult would it be to convert these in the adapter? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've thought about the best way to do this a bit. A large number of webhooks just give epoch timestamps rather than nicely formatted ISO datetimes. It's possible to do these quite easily in the adapter but it does mean that all webhooks with epochs require adapters. |
||
"minimum": 0, | ||
"maximum": 2147483647, | ||
"description": "Responder created at (in epoch seconds)" | ||
}, | ||
"phone_number": { | ||
"type": ["string", "null"], | ||
"description": "Responser mobile phone number", | ||
"maxLength": 25 | ||
} | ||
} | ||
}, | ||
"survey_type": { | ||
"type": "string", | ||
"enum": ["nps"] | ||
}, | ||
"score": { | ||
"type": ["integer", "null"], | ||
"description": "NPS score", | ||
"minimum": 0, | ||
"maximum": 10 | ||
}, | ||
"comment": { | ||
"type": ["string", "null"], | ||
"maxLength": 512, | ||
"description": "Survey comment" | ||
}, | ||
"permalink": { | ||
"type": "string", | ||
"maxLength": 255, | ||
"description": "Permalink to the response" | ||
}, | ||
"created_at": { | ||
"type": "integer", | ||
"minimum": 0, | ||
"maximum": 2147483647, | ||
"description": "Response created at (in epoch seconds)" | ||
}, | ||
"updated_at": { | ||
"type": "integer", | ||
"minimum": 0, | ||
"maximum": 2147483647, | ||
"description": "Response updated at (in epoch seconds)" | ||
}, | ||
"person_properties": { | ||
"type": ["object", "null"], | ||
"description": "Custom user properties", | ||
"properties": { | ||
"delighted_source": { | ||
"type": ["string", "null"], | ||
"description": "Visitor source e.g., Web", | ||
"maxLength": 50 | ||
}, | ||
"Page": { | ||
"type": ["string", "null"], | ||
"maxLength": 255 | ||
}, | ||
"Page URL": { | ||
"type": ["string", "null"], | ||
"maxLength": 512 | ||
}, | ||
"Referrer URL": { | ||
"type": ["string", "null"], | ||
"maxLength": 512 | ||
}, | ||
"User Agent": { | ||
"type": ["string", "null"], | ||
"maxLength": 256 | ||
}, | ||
"IP Address": { | ||
"type": ["string", "null"], | ||
"maxLength": 45 | ||
}, | ||
"Device Type": { | ||
"type": ["string", "null"], | ||
"maxLength": 100 | ||
}, | ||
"Operating System": { | ||
"type": ["string", "null"], | ||
"maxLength": 100 | ||
}, | ||
"Browser": { | ||
"type": ["string", "null"], | ||
"maxLength": 100 | ||
}, | ||
"Country": { | ||
"type": ["string", "null"], | ||
"maxLength": 100 | ||
}, | ||
"user_id": { | ||
"type": ["string", "null"], | ||
"maxLength": 100, | ||
"description": "Snowplow user id" | ||
} | ||
} | ||
}, | ||
"notes": { | ||
"type": ["array", "null"], | ||
"items": { | ||
"type": "string" | ||
}, | ||
"description": "Notes defined against a responder in the Delighted UI" | ||
}, | ||
"tags": { | ||
"type": ["array", "null"], | ||
"items": { | ||
"type": "string" | ||
}, | ||
"description": "Tags defined against a responder in the Delighted UI" | ||
} | ||
} | ||
} | ||
}, | ||
"additionalProperties": false | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am sure there's a good reason for going with these property names, but the spaces make me very nervous. How difficult would it be to conform them to the rest of the fields, like
device_type
oruser_agent
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the moment unfortunately the webhook sends these fields through with spaces so without an adapter we're stuck with the spaces.