Skip to main content

Stitch v2.0.0

On visitor action (such as click on a button, scoring, input...) Screeb can send a request to an external platform, containing the response data.

Entities

  • Organization: A Screeb account, shared by many Screeb users of your company
  • Channel: A distribution channel for your survey (Javascript SDK, Android SDK, iOS SDK...)
  • Survey
  • Survey scenario: A versioned survey: on survey update, your flow is saved in a new scenario. New users will see the last scenario.
  • User: Information about the visitor
  • Response: A response is a chain of question+answers. A user sometimes has many responses to a single survey.
  • Question
  • Answer: An answer is part of a response. Each answer is associated with a question.
  • Field: An answer may have many fields (eg: multiple choices question)

Hook types

You can send 3 different event types into your datawarehouse:

  • On survey display: a survey is shown to visitors, but no question is replied. You will get notified even if no response is given.
  • On question answered: a question has been replied. This webhook will be triggered for each question of a single survey.
  • On response end: a survey has been closed or fully replied to by the user.

Migrate from v1.3.0

  • Each correlation_id has been renamed id, and the previous id property is not available anymore.
  • payload.respondent has been renamed payload.user
  • payload.response.answer.field has been converted into a array: payload.response.answer.fields

Warehouse schema

Stitch delivers the responses to your surveys using the following database schema. In case of schema change, Stitch is in charge of updating columns in your datawarehouse.

Stitch requires an immutable primary key for identifying rows. Screeb uses event_id as primary key.

Tables

Table nameDescription
<integration>.dataA table with response metadata (organization, channel, survey...).
<integration>.data__response__itemsA table with pairs of questions and answers.
<integration>.data__response__answer_fields or <integration>.data__response__items_answer_fieldsA table with question answer.
<integration>.data__response__hidden_fieldsA table with hidden fields linked to the response.
<integration>.data__response__contextA table with context data linked to the response.
<integration>.data__user__propertiesA table user properties snapshot linked to the response.

data table

ColumnTypeDescription
_sdc_batched_attimestamp with time zoneStitch internal
_sdc_received_attimestamp with time zoneStitch internal
_sdc_sequencebigintStitch internal
_sdc_table_versionbigintStitch internal
event_idtextUnique id for this event (same id in retry request)
event_typetextType of event sent over webhook
event_timetextDate of event
event_time_msbigintDate of event in millisecond
retry_countbigintNth request for this event
versiontextSemver version of the webhook payload
organization__idtextUnique identifier for the organization
organization__nametextName of the Screeb account
channel__idtextUnique identifier for the channel
channel__typetextChannel type (widget, android, ios, hosted-page...)
user__anonymous_idtextMain user identifier
user__user_idtextScreeb identifier for the user
user__nametextUser name (when available in identity properties)
user__emailtextUser email (when available in identity properties)
user__group_names[]textUser groups
survey__idtextUnique identifier for the survey
survey__nametextName of the survey
survey__scenario_idtextUnique identifier for the survey scenario
survey__scenario_timetextDate of the scenario edition
survey__scenario_time_msbigintTimestamp of the scenario edition
survey__scenario_versionbigintVersion number of the survey scenario
response__idtextUnique identifier for the response
response__timetextDate of response start
response__time_msbigintTimestamp of response start in millisecond
response__time_to_complete_secondbigintSeconds between survey display and response end (when event_type == response.ended)
response__localetextLocale of the user
response__tags[]textTags of the response
response__question__idtextUnique identifier for the question
response__question__typetextType of question
response__question__titletextLabel of the question
response__answer__replied_attextDate of the answer
response__answer__replied_at_msbigintTimestamp of the answer (millisecond)
response__answer__tags[]textTags of the answer

data__response__items table

ColumnTypeDescription
_sdc_batched_attimestamp with time zoneStitch internal
_sdc_level_0_idbigintStitch internal
_sdc_received_attimestamp with time zoneStitch internal
_sdc_sequencebigintStitch internal
_sdc_source_key_event_idtextStitch internal
_sdc_table_versionbigintStitch internal
question__idtextUnique identifier for the question
question__typetextType of question
question__titletextLabel of the question
answer__replied_attextDate of the answer
answer__replied_at_msbigintTimestamp of the answer (millisecond)
answer__tags[]textTags of the answer

data__response__answer_fields table

ColumnTypeDescription
_sdc_batched_attimestamp with time zoneStitch internal
_sdc_level_0_idbigintStitch internal
_sdc_received_attimestamp with time zoneStitch internal
_sdc_sequencebigintStitch internal
_sdc_source_key_event_idtextStitch internal
_sdc_table_versionbigintStitch internal
idtextUnique identifier for the field (a button, a score, an input...)
typetextValue type: "string", "number", "time", "boolean"...
numberbigintValue of the field (numeric)
boolbooleanValue of the field (boolean)
stringtextValue of the field (string)
timetextValue of the field (string)

data__response__hidden_fields + data__response__context + data__user__properties table

ColumnTypeDescription
_sdc_batched_attimestamp with time zoneStitch internal
_sdc_level_0_idbigintStitch internal
_sdc_received_attimestamp with time zoneStitch internal
_sdc_sequencebigintStitch internal
_sdc_source_key_event_idtextStitch internal
_sdc_table_versionbigintStitch internal
nametextHidden field key
typetextHidden field value type: "string", "number", "time", "boolean"
value__numberbigintValue of the hidden field (numeric)
value__bobooleanValue of the hidden field (boolean)
value__sttextValue of the hidden field (string)

Support

If you have any questions or additional requirements, feel free to open an issue or contact [email protected].