Highlighted

Keep All Audiences In Sync With External Database

Bronze Contributor
Bronze Contributor

We have several audiences and want to use this data to display audience specific content on our website.  In order to do this we need to be able to do a query by customer ID and obtain a list of all audiences this customer is currently assigned to.  This API does what we want:

https://api.tealiumiq.com/v2/visitor/accounts/paulaschoice/profiles/main?attributeId=5208&attributeV...

However, it takes 1 to 3 seconds to respond, and we need this data available in 100ms or less so that we can use it for initial page load content, not asynchronous slow loading content.  This is why we also cannot use any JavaScript browser based solution, it needs to be a server-side thing.

Our thought is that if we can keep the data in our own SQL server in Azure, just a simple table containing customer ID and audience IDs, we can do a super fast lookup by customer ID and get the list of audience IDs.

What is the best way to keep this data in sync in this way?  We looked at AudienceStream Connectors, but there is no option for "All Audiences" so we would have to define new connectors for every audience setup, and we want business users to easily be able to add/maintain audiences without any technical/extra setup.  I don't know much about AudienceDB other than hearing it is "a pain to connect to" (from an Azure App Service), but maybe that is an option if we can just query the existing data in a super fast way (has the correct indexes)?

Since a business user could add an audience that contains 1 million customers, then decide to delete/change it, I'm not sure anything with real-time updates would work well.  So possibly the best solution would be a daily data export, which we are fine with our data only updating once a day.  It could be a few million records though, but we only need 2 attributes (customer ID and audience ID), so still under 100MB of data, or far less if optimized and/or compressed.