Exporting Data to the BigQuery Tables

Set up data export to tables to regularly update information about the audience, contacts' activity, and campaign results in BigQuery. Available datasets for export:

  • broadcasts;
  • contactActivities;
  • contacts;
  • conversions;
  • devices;
  • events;
  • messages;
  • orderItems;
  • orders;
  • revenue;
  • workflows.

This information will update the data in the BigQuery tables up to twice a day after setting up.

šŸ“˜

Note

After you set up the export, the first sync happens on the next sync cycle — it isn't instant. If no data has appeared in your BigQuery tables well after that window, double-check that the selected datasets actually have data to export for your account (for example, no data of that type has been generated yet) before assuming the export is stuck. If the issue persists, contact support.

šŸ“˜

Note

You don’t need to pre-create BigQuery tables. They will be generated automatically at the first export, and since then all the incoming data will be updated. All the table names will correspond to the data sets.

Along with the main tables, temporary patch_<table name>_<UUID> tables appear during a sync. The export updates data through them: changes are first uploaded to a temporary table, then BigQuery merges them into the main table and deletes the temporary one automatically. Table names — both main and temporary — can't be customized. If leftover patch_ tables remain in the dataset after a sync, contact our support team.

šŸ“˜

Note

The first export is not limited to the previous day — it includes the history your account already holds, and nothing has to be triggered manually for that. What it can't add is data that was never collected. See Integrating with Google BigQuery for the depth each data set covers.

The contacts dataset exports all contacts in the account. The contactActivities dataset covers activity up to 90 days back, and only from the moment activity collection was enabled for the account — if collection was enabled later, the available history is shorter.

For an account with a very large contact base, the first export can take several days. Later runs carry only what has changed and finish much faster.

šŸ“˜

Note

The daily queue starts at 00:00 UTC, and accounts are exported one after another, so the run for your account can begin at any point during the day. The run itself takes from a few seconds to about two hours, depending on how much data has changed, and BigQuery adds its own time to merge the temporary tables. Don't tie a job on your side to a fixed clock time — check the tables for new data instead.


Creating Data Export

  1. Go to Settings → Data Export → BigQuery.
Settings menu open with Data Export highlighted, and the New data export dropdown showing Webhook and BigQuery options.
  1. Upload the key file and check the boxes for the data sets you want to upload. Click Save.
Export data from Reteno to Google BigQuery dialog with the contactActivities and contacts checkboxes selected and the Save button visible.
šŸ“˜

Note

The depth limit applies only to the ContactActivities table, which holds up to 90 days of activity. All other data sets — contacts, broadcasts, and the rest — are synchronized for the whole lifetime of your account, with no depth limit.

šŸ“˜

Note

You choose the data sets and the columns to export. The export can't be filtered by a value: every row of a selected data set is exported. A selection such as contacts with emailStatus = UNSUBSCRIBED has to be made on your side, in a query over the exported table.

The connection will be displayed in the Data export section, here you can edit its settings.

Data export page listing a BigQuery export named BQ export alongside an existing webhook export.

List of Data Export Parameters

Broadcasts

ParameterTypeDescription
createdDatetimestampDay and time of message creation (format: '2021-10-08 11:11:02')
groupIdintSegment IDs participating in the broadcast
idintBroadcast ID
mediaTypestringMedia type (Sms, Email, WebPush, MobilePush, AppInbox, Widget)
messageIdintMessage ID
namestringBroadcast name
startedDatetimestampDay and time of broadcast sending (format: '2021-10-08 11:11:02')
statusstringBroadcast statuses: • IDLE - completed; • RUNNING - started; • PAUSED - paused (if the mailing was not stopped manually by you, contact support for more details); • SCHEDULED - planned; • UNCONFIRMED - in queue for moderation; • CONSIDERATION - under moderation; • BLOCKED - blocked by moderator.
updatedDatetimestampDay and time of broadcast updating (format: '2021-10-08 11:11:02')

ContactActivities

ParameterTypeDescription
activity (activityStatus) *stringActivity status:
  • DELIVERED – the message was delivered.
  • UNDELIVERED – the message was undelivered (statusDescription contains the reason).
  • READ – the message was opened.
  • UNSUBSCRIBED – a contact unsubscribed from the broadcasting list.
  • CLICKED – a contact clicked links in the message. • SPAM – a contact reported spam.
  • SUBSCRIPTION_CHANGED – a contact changed the subscription category.
  • PUSH_SUBSCRIBED – a contact subscribed to push notifications.
broadcastIdintBroadcast ID
campaignTypestringCampaign type:
  • IM — triggered message,
  • Group — broadcast.
clickEventLinkstringContains the link clicked by a contact (when the status is CLICKED)
contactIdintContact ID in Reteno (Internal)
errorCode (statusDescription) *stringDelivery error and description. For UNDELIVERED email activities, this can contain a raw SMTP bounce reason, or a non-SMTP code such as UNSUBSCRIBED, BLACKLISTED, MEDIA_LOCATOR_FORBIDDEN, or GENERAL_EMAIL_ERROR.
eventKeystringEvent key
eventTypeKeystringEvent type key
eventIdstringID of an event that had started a workflow
externalCustomerIdstringContact ID in your system (External)
iidstringSender name for Email and SMS
mediaTypestringMedia type (Sms, Email, WebPush, MobilePush, AppInbox, Widget, In-App)
messageInstanceIdintService field
messageLanguageCodestringMessage language code
messageNamestringMessage name in Reteno account
messageIdintMessage ID
imIdintIndividual message ID. Use this to associate contact activities with a specific message.
messageTagsstringMessage tags
messageURLstringContains the link to the email web version
osNamestringDevice operating system
osTypestringDevice type
started (activityDateTime) *timestampDay and time of message sending (format: '2021-10-08 11:11:02')
utmCampaignstringCampaign UTM. Read from the link the contact clicked, so the value is there only in rows with the CLICKED status. Rows with DELIVERED or READ carry no UTM, and there is no setting that changes this.
workflowIdstringWorkflow ID
workflowInstanceIdstringThe identifier of a particular workflow launch. Use it to group mailings within the launch of a workflow.
workflowBlockIdstringWorkflow block ID
smsPartsintNumber of SMS parts

*The field will be removed as overdated; use the field indicated in brackets

Contacts

ParameterTypeDescription
contactIdintContact ID in Reteno (Internal)
contactSource stringstringContact source: • SITE_AUTOMATED - binding an email to a push subscriber (webPush collection script), • I_MESSAGE - sending a single message, • CAMPAIGN - workflow (block Create contact or Add to segment), • IMPORT - file import or Add contacts method, • MANUAL - manually created, • SUBSCRIPTION - subscription form (Subscribe a contact API method), • Add contact API method, • ORDER - order on the site (Add orders API method).
createdDatetimestampContact creation date and time (format: '2021-10-08 11:11:02')
emailstringContact email
emailDomainstringEmail domain
emailStatusstringEmail status
externalCustomerIdstringContact ID in your system (External)
firstNamestringContact first name
languageCodestringContact language code
lastClickedDatetimestampDay and time of the last click (format: '2021-10-08 11:11:02')
lastNamestringContact last name
lastReceivedDatetimestampDay and time of the last delivery (format: '2021-10-08 11:11:02')
lastSentDatetimestampDay and time of the last sending (format: '2021-10-08 11:11:02')
lastViewedDatetimestampDay and time of the last opening (format: '2021-10-08 11:11:02')
smsstringPhone number
marketIdvarchar (100)The market or branch identifier to which the contact belongs
totalClickedintTotal clicks amount
totalReceivedintTotal received messages amount
totalSentintTotal sent messages amount
totalViewedintTotal viewed messages amount

Conversions

ParameterTypeDescription
activityTypeintActivity type ID
calloutIdintBroadcast ID
contactIdintContact ID in Reteno (Internal)
conversionDateTimetimestampDay and time of conversion (format: '2021-10-08 11:11:02')
currencystringCurrency
eventIdstringID of an event that had started a workflow
eventTimestamptimestampTime when the activity occurred according to the Attribution touch point (for example, CLICK)
eventTotalCostfloatTotal conversion value attributed to the campaign
eventTypeIdintEvent type ID
iidstringSender name for Email and SMS
imidintIndividual message ID. Use this to associate conversion with a specific message.
mediaTypestringMedia type (Sms, Email, WebPush, MobilePush, AppInbox, Widget, In-App)
messageIdintMessage ID
triggerCalloutIdintTrigger campaign ID
workflowIdintWorkflow ID

Devices

ParameterTypeDescription
appVersionstringApp version
applicationIdintApp ID
categorystringCategory
contactIdintContact ID
deviceIdstringDevice ID
deviceModelstringDevice model
externalCustomerIdstringExternal customer ID
languageCodestringLanguage code
osTypestringOS type
osVersionstringOS version
pushTokenstringPush token
timeZonestringTime zone

Events

ParameterTypeDescription
contactIdintContact ID
eventIdintEvent ID
eventTypeKeystringEvent type
keyValuestringEvent key
occuredtimestampDate and time of occurrence (format: '2021-10-08 11:11:02')
paramsJsonjson50 first event parameters and values ​​(name/value); up to 300 characters of values ​​are transferred.
šŸ“˜

Note

  • The number of rows in the events table is not the same as the number of contacts — each occurrence of an event is exported as a separate row. A single contact can trigger the same event multiple times (for example, reinstalling the app on a new device, or using multiple devices), and events remain in the table even if the related contact is later deleted. Don't use event row counts as a proxy for unique contact counts.
  • paramsJson includes only flat (top-level) event parameters. Nested parameters — where a parameter's value is itself an object (for example, a source field nested inside another parameter) — are not exported to BigQuery.

Messages

ParameterTypeDescription
annoyanceLevelintMessage annoyance level
languagestringLanguage of the main version of the message
mediaTypestringMedia type (Sms, Email, WebPush, MobilePush, AppInbox, Widget, In-App)
messageIdintMessage ID
namestringMessage name
replyTostringReply-to address
senderstringSender
subjectstringSubject
tagsstringTags
translationsstringLanguage versions of the message
updateDatetimestampDay and time of message updating (format: '2021-10-08 11:11:02')
šŸ“˜

Note

The messages table row is populated when the message is exported and is not retroactively updated afterward. If you edit an already-exported message later (for example, adding a tag), that change won't be reflected in the existing row in BigQuery.

OrderItems

ParameterTypeDescription
cost floatfloatProduct price
descriptionstringProduct description
externalProductIdstringExternal product ID
imageUrlstringProduct image link
namestringProduct name
orderDatetimestampOrder creation date (format: '2021-10-08 11:11:02')
orderIdintOrder ID in Reteno (Internal)
quantityintNumber of products
urlstringProduct URL

Orders

ParameterTypeDescription
contactIdintContact ID in Reteno (Internal)
marketIdvarchar (100)Market ID
deliveryAddressstringDelivery address
deliveryMethodstringDelivery method
discountfloatDiscount
emailstringEmail
externalOrderIdstringExternal order ID
firstNamestringContact first name
lastNamestringContact last name
orderCreatedDatetimestampDate of order creation in Reteno (format: '2021-10-08 11:11:02')
orderDatetimestampOrder creation date (format: '2021-10-08 11:11:02')
orderIdintOrder ID in Reteno (Internal)
paymentMethodstringPayment method
PhonestringPhone number
StatusstringOrder status: • INITIALIZED, • IN PROGRESS, • DELIVERED, • CANCELED.
totalCostfloatTotal order cost

Revenue

ParameterTypeDescription
activity (activityStatus)*stringActivity status: • DELIVERED – the message was delivered. • UNDELIVERED – the message was undelivered (statusDescription contains the reason). • RECEIVED – the message was opened. • UNSUBSCRIBED – a contact unsubscribed from the broadcasting list. • CLICKED – a contact clicked links in the message. • SPAM – a contact reported spam. • SUBSCRIPTION_CHANGED – a contact changed the subscription category. • PUSH_SUBSCRIBED — a contact subscribed to push notifications.
campaignTypestringCampaign type: • IM — triggered message, • Group — broadcast.
clickEventLinkstringContains the link clicked by a contact (when the status is CLICKED)
contactIdintContact ID in Reteno (Internal)
currencystringCurrency
externalCustomerIdstringContact ID in your system (External)
externalOrderIdstringExternal order ID
mediaTypestringMedia type (Sms, Email, WebPush, MobilePush, AppInbox, Widget)
messageInstanceIdintService field
messageNamestringMessage name in Reteno account
messageTagsstringMessage tags
messageUrlstringContains the link to the email web-version
orderDatetimestampOrder creation date (format: '2021-10-08 11:11:02')
started (activityDateTime)*timestampDay and time of message sending (format: '2021-10-08 11:11:02')
totalCostfloatTotal order cost
utmCampaignstringCampaign UTM
eventKeystringEvent key
eventTypeKeystringEvent type key
messageLanguageCodestringMessage language code
orderIdintOrder ID in Reteno (Internal)
workflowIdintWorkflow ID
broadcastIdintBroadcast ID

*The field will be removed as overdated; use the field indicated in brackets

šŸ“˜

Note

Existing entries in the Revenue table (for orders placed after 03.08.2024) can be updated along with the upload of new orders. Updating may be necessary, for example, if the total cost of the order has changed.

Workflows

Parameter
Type
Description
createdDatetimestampWorkflow creation date
statusvarchar (100)Workflow status (active/inactive)
updatedDatetimestampWorkflow update date
workflowIdintWorkflow ID
workflowNamevarchar (100)Workflow name

Use Cases

Here are some key use cases for exporting data from Reteno to BigQuery:

1. Advanced Campaign Performance Analysis

  • Dataset Used: broadcasts, contactActivities, messages
  • Description: BigQuery allows teams to perform complex analyses on broadcast performance, message open rates, and click-through rates, helping refine campaign strategies. Exporting broadcasts data with metrics like media type, message status, and segmentation criteria enables a deep dive into which campaigns drive the best user engagement.
  • Use Case Benefit: By identifying high-performing campaigns, marketers can optimize message content, timing, and target audiences, improving future campaign effectiveness and ROI.

2. Customer Segmentation and Behavioral Analytics

  • Dataset Used: contacts, contactActivities, events
  • Description: BigQuery can process large volumes of customer activity and segmentation data to identify patterns in user behavior, such as engagement frequency or preferred communication channels. This enables mobile apps to identify highly engaged users and customize interactions accordingly.
  • Use Case Benefit: With detailed segmentation analysis, apps can create highly personalized, behavior-driven campaigns that lead to better user retention and increased lifetime value (LTV).

3. Personalization and Retargeting

  • Dataset Used: devices, contacts, contactActivities, events
  • Description: Exported data on user devices, activities, and engagement history allows for personalized retargeting efforts based on past behavior. For example, data on contacts’ last activity and device types enables personalized messaging for re-engagement.
  • Use Case Benefit: Personalizing messages based on user activity enhances user experience and increases the likelihood of conversion, creating a more dynamic engagement strategy.

4. Predictive Modeling for Churn and Retention

  • Dataset Used: contacts, orders, revenue, contactActivities
  • Description: With datasets that contain historical revenue, engagement, and order data, BigQuery can be used to create predictive models for user churn and retention. These models help identify at-risk users based on engagement history, purchasing patterns, and campaign response rates.
  • Use Case Benefit: By identifying users likely to churn, apps can trigger targeted campaigns or loyalty offers to retain them, ultimately reducing churn and increasing LTV.

5. Order and Revenue Analysis for Strategic Insights

  • Dataset Used: orders, orderItems, revenue
  • Description: Detailed order and revenue data exported to BigQuery allows teams to monitor average order values, purchasing frequency, and revenue trends. Analyzing these metrics helps identify opportunities for upselling, product bundling, and other revenue-boosting strategies.
  • Use Case Benefit: By understanding revenue patterns, mobile apps can make data-driven decisions on pricing, promotions, and customer incentives to maximize revenue and profitability.

6. Monitoring and Alerting on Key Metrics

  • Dataset Used: broadcasts, contactActivities, revenue
  • Description: With data exported to BigQuery, teams can set up dashboards to monitor key performance metrics like message delivery rates, engagement levels, and revenue. When abnormal trends are detected (e.g., a drop in delivery rates), teams can receive alerts.
  • Use Case Benefit: Monitoring allows for rapid response to performance issues, ensuring high campaign effectiveness and consistent user engagement.

7. Campaign ROI and Budget Allocation Analysis

  • Dataset Used: broadcasts, orders, revenue, contactActivities
  • Description: Exporting detailed broadcast and revenue data enables marketers to measure ROI by matching campaign efforts to revenue generated. This insight is valuable for calculating the cost-effectiveness of various campaigns and making informed budget allocation decisions.
  • Use Case Benefit: By analyzing campaign ROI, marketers can focus on high-performing campaigns and optimize spending, ultimately maximizing marketing effectiveness.

8. Customer Journey Mapping Across Channels

  • Dataset Used: contacts, contactActivities, events, orders
  • Description: BigQuery’s data processing allows the consolidation of user journeys, tracking users as they interact with different channels and messages throughout their lifecycle. This provides a cohesive view of how users progress from onboarding to conversion.
  • Use Case Benefit: Mapping the user journey offers insights into potential drop-off points and highlights areas for improvement, allowing apps to enhance the user experience and improve conversion rates.

Message status descriptions

The statusdescription field explains why a message was not sent or delivered:

ValueMeaning
UNSUBSCRIBEDThe contact unsubscribed from the relevant channel.
BLACKLISTEDThe contact or media locator is blacklisted.
MEDIA_LOCATOR_FORBIDDENSending to the media locator is blocked at the system level.
GENERAL_EMAIL_ERRORA general email sending error. Inspect the message activity or contact support for the case-specific cause.

A null value means that no status description was recorded. Do not treat every non-null value as a delivery failure without also checking the message status.


Did this page help you?