Integration / Member sync

Integration  /  Member sync

Member sync

Connect logged-in customers to their conversations. Once a member is linked, their name and email appear in the console, and with commerce integration it extends to order lookups.

If already logged in at init

Pass member info via subscriberInfo in the init config.

account_idstringRequired

Unique member ID — either this or email is required

emailstringOptional

Member email — either this or account_id is required

namestringOptional

Customer name

phone_numberstringOptional

Phone number

external_user_idstringOptional

Commerce order integration key — must match the shop's member ID

Login / logout after init

Since the SDK is a singleton, instead of re-initializing, pass the login state via the custom event lillo:userLoggedIn. For logout, call lilloSDK.logout().

Either email or account_id is required.

Member sync at init
window.lilloSDK = window.LilloSDK.init({
  host: 'https://api.lillo.cx',
  chatAppUrl: 'https://chat.lillo.cx',
  clientKey: 'YOUR_CLIENT_KEY',
  subscriberInfo: {
    account_id: 'user-123',       // 필수(또는 email)
    email: 'user@example.com',
    name: '홍길동',
    phone_number: '01012345678',
    external_user_id: '123'       // 커머스 주문 연동 키
  }
});
After init — login event / logout
// 로그인
window.dispatchEvent(new CustomEvent('lillo:userLoggedIn', {
  detail: { account_id: 'user-123', email: 'user@example.com', name: '홍길동' }
}));

// 로그아웃
window.lilloSDK.logout();
회원 연동 · 개발자 문서 | 릴로