Closer
  • Closer guides and FAQ
  • Back to Closer
  • Guide
    • Onboarding
      • Configure your widget
      • Install the widget on your website
      • Invite your team
      • Get the mobile app
      • Advanced Closer widget integration
    • Zacznij używać Closer
      • Przewodnik po platformie
      • Rozmowy
        • Inbox
    • Zarządzaj doradcami
      • Zaproś doradców firmy
      • Ustawienia doradcy
      • Grupuj doradców
    • Skonfiguruj routing
      • Wprowadzenie
      • Dodaj tagi
      • Reguły tagowania
      • Dodaj reguły tagowania
      • Grupuj tagi
      • Ustawienia grupy tagów
    • Getting deeper in dashboard
      • Conversations
        • Inbox
        • Conversation data
    • Getting deeper in widget
      • Widget guides
    • Notifications
    • How to
      • Schedule online meetings
      • Click to call
      • Tagging
      • Proactive messages
      • Set up skill-based routing
      • Manage your team’s workload
      • Force new user everytime in widget
      • User authorization callbacks
      • On deinit callback
      • Identify leads
      • Reports
      • SLA
      • Customer typing preview
      • Push out data with Webhooks
      • Routing
      • Widget OAuth configuration
      • Forms configuration
      • Org configuration API
      • Org configuration fields
      • Configure OMNI integration
      • Elasticsearch business logs
      • Elasticsearch security logs
      • Manage widget button
    • Contact us
    • Supported browsers
    • Upcoming features drafts
      • Business events structure (JSON) - Draft
  • FAQ
    • General
    • Bots
    • Calendar
    • Random
Powered by GitBook
On this page
  • Set up the contact bot
  • Identify a customer via our JS SDK
  • Push customer contact data to Closer
  • Send custom data about the customer
  • Use widget in sidebar mode

Was this helpful?

  1. Guide
  2. How to

Identify leads

PreviousOn deinit callbackNextReports

Last updated 5 years ago

Was this helpful?

Set up the contact bot

While you are away, Closer’s bot can help you to gather contact information from the clients who reached out to you. To be able to do that, it needs to be set for the job correctly. In the Profile & Settings>widget configuration, you should add three mandatory fields:

1. Bot's welcome message

Customer leaving their contact data may depend on the tone of this message. You can learn more about this subject

2. GDPR agreement

3. Default prefix number

Identify a customer via our JS SDK

The data structure being sent contains the apiKey parameter. Store it and use it in the closer.init method every time the user is logged in with the same credentials.

closer.init({
  orgId: "00000000-0000-0000-0000-000000000000",
  apiKey: "00000000-0000-0000-0000-000000000000",
})

Push customer contact data to Closer

Your website or app usually has customer’s contact information at some point. You can use the closer.identify method to send this data to Closer. It will be automatically displayed on the dashboard and in the mobile app. You can call this method multiple times, every time some piece of information is added.

closer.identify({
  firstName: "Jon",
  lastName: "Snow",
  email: "jon.snow@winterfell.com",
  phone: {
    region: "PL",
    number: "+48123456789",
  },
});

To remove data that is no longer valid for the current customer, just use the closer.identify with an empty string:

closer.identify({
  email: "",
});

Send custom data about the customer

Closer also allows you to send custom data in the key: value format - you should use the additionalData parameter for that purpose. You can use it to send insights that will be visible to your team. You can also define the customer’s language via the languageLocale parameter, so that your team know in which language the customer was reading the website.

closer.identify({
  languageLocale: "en",
  additionalData: {
    internalId: "value",
    customerGroup: "premium",
  },
});

Use widget in sidebar mode

Closer widget can also be displayed in a sidebar instead of floating on top of the page. In order to do that, you need to prepare a container that will hold the widget’s body after opening, and provide this container’s selector via the container parameter of the closer.init method.

closer.init({
  orgId: "00000000-0000-0000-0000-000000000000",
  container: "#widget-sidebar",
});

The apiKey parameter allows you to identify customers logged in to your website or app, so that their conversation history is stored and synced. To get it, to listen for the conversation.created webhook:

enter your endpoint’s URL
here
Bot's welcome message
Closer GDPR settings
Phone default setting for faster entering data