Hi,
I noticed that when identifying a customer in my backend like this:
await trackClient.identify(userId, {
...data,
created_at: Math.floor(Date.now() / 1000),
})
I notice that immediately calling:
const response = await apiClient.getAttributes(userId, IdentifierType.Id)
returns stale data without my new attributes. This is expected since the identify call is asynchronous.
Here is my question:
Rather than polling the API (which feels unreliable), what's the recommended pattern to ensure my UI updates only after customer.io has processed the identify call and the new attributes are available? I'm using the JS sdk in an Express app.