Customer Metadata

Learn how customer metadata helps you build scalable customer engagement applications on the Elarian Framework.

Customer metadata allows you to store information specific to a customer that would help your application make decisions at a later time. You could store a customers language preference for instance and adjust your message to the customer the next time you reach out to them.

Update customer metadata

...

const customer = new client.Customer(...);

const resp = await customer.updateMetadata({
  language: 'FR'
});

console.log(resp);

Get customer metadata

...

const customerState = await customer.getState();

console.log(customerState.identityState.metadata);

Delete customer metadata

...

const resp = await customer.deleteMetadata(['language']);

console.log(resp);