Integration

User Identification

First you have to link the account with the Push channel to obtain a customerId.

import { Customer, Channel } from 'indigitall-capacitor-plugin';

Customer.link({ externalId : "YOUR_EXTERNAL_ID", channel: Channel.Push }, () => {
    // Do domething
}, (error) => {
    // Log error
})

On the other hand, if you want to unlink the Customer's account, you have to do the following:

Customer.unlink({ externalId : "YOUR_EXTERNAL_ID", channel: Channel.Push }, () => {
    // Do domething
}, (error) => {
    // Log error
})