Creation of BigQuery Tables when Integration is Enabled

The goal is to create the customer-specific BigQuery tables when the integration is enabled.

Integration Lifecycle Events URI can be configured in EMS Admin for an integration, e.g. CRM Ads integration on staging:

{ "after_install": "https://audience-exchange-staging.gservice.emarsys.com/api/customers" }

I.e. when the push-notification integration is enabled for a customer an endpoint gets called by Suite.

That endpoint publishes a message to Pub/Sub. The dataflow and the cloud function can subscribe to the topic and create the tables for a customer, e.g. client_state.state_$customerId. Other options for the tables created by dataflow is to publish an init message to each dataflow so that all tables are created.

The tables should only be created if they do not exist because the integration could be enabled, disabled and re-enabled again.

Comparison with Approach of Embedded Messaging Service

A custom approach was used because they did not know about the integration lifecycle events.