Skip to main content

Stitch v1.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 respondents will see the last scenario.
  • Respondent: Information about the visitor
  • Response: A response is a chain of question+answers. A respondent sometimes has many responses to a single survey.
  • Question
  • Answer: An answer is part of a response. Each answer is associated to a 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 respondent.

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 into 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 question answer.
<integration>.data__response__hidden_fieldsA table with your hidden fields 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...)
respondent__idtextMain respondent identifier
respondent__aliastextScreeb identifier for the respondent
respondent__nametextRespondent name (when available in identity properties)
respondent__emailtextRespondent email (when available in identity properties)
respondent__group_names[]textRespondent 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 respondent
response__tags[]textTags of the response
response__question__idtextUnique identifier for the question
response__question__correlation_idtextCorrelation identifier for the question (shared over many survey scenario versions)
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
response__answer__field__idtextUnique identifier for the field (a button, a score, an input...)
response__answer__field__correlation_idtextCorrelation identifier for the field (shared over many survey scenario versions)
response__answer__field__typetextValue type: "string", "number", "time", "boolean"...
response__answer__field__value__bibigintValue of the answer (numeric)
response__answer__field__value__bobooleanValue of the answer (boolean)
response__answer__field__value__sttextValue of the answer (string)

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__correlation_idtextCorrelation identifier for the question (shared over many survey scenario versions)
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
answer__field__idtextUnique identifier for the field (a button, a score, an input...)
answer__field__correlation_idtextCorrelation identifier for the field (shared over many survey scenario versions)
answer__field__typetextValue type: "string", "number", "time", "boolean"...
answer__field__value__bibigintValue of the answer (numeric)
answer__field__value__bobooleanValue of the answer (boolean)
answer__field__value__sttextValue of the answer (string)

data__response__hidden_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
nametextHidden field key
typetextHidden field value type: "string", "number", "time", "boolean"
value__bibigintValue 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].