Scenario Usage

Guest User

Example chat for guest user

import { ClientSDK } from '@csm-sdk/client';
const csm = new ClientSDK({
  clientKey: "YOUR_CLIENT_KEY"
})
csm.buildChat({
  user: null,
  config: {
    type: "floating",
  }
})

Authenticate User

Example chat for authenticate user

import { ClientSDK } from '@csm-sdk/client';
const csm = new ClientSDK({
  clientKey: "YOUR_CLIENT_KEY"
})
csm.buildChat({
  user: {
    accountId: '123456789', // required
    name: 'Jhon Doe', // required
    email: 'jhon.doe@mail.com', // optional
    phone: '+12345678', // optional
    photo: 'https://jhon.doe.com/profile.png', // optional
  },
  config: {
    type: "floating",
  }
})

Last updated