Customer Tags

Learn how customer tags help you build scalable customer engagement applications on the Elarian Framework.

You can apply tags on customers and initiate bulk actions using tags

Update customer tags

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

const resp = await customer.updateTags([
  {
    key: 'userSentiment',
    value: 'happy',
    expiresAt: new Date(2030, 1, 1).getTime() / 1000 // optional
  }
]);

console.log(resp);

Get customer tags

...

const customerState = await customer.getState();

console.log(customerState.identityState.tags);

Delete customer tags

...

const resp = await customer.deleteTags(['userSentiment']);

console.log(resp);