Skip to content

Identity skill

Provides dialogs around the user's identity, around privacy and notifications.

Overview

The identity skill combines three chatbot responsibilities: - Elicitation of personal data - Implementing privacy (GDPR) related intents - Enabling notification options

Intents

intent example
@my_name My name is
@my_email My email is
@my_phone My phone is
@privacy How do you handle my privacy?
@forget Forget my personal data
@privacy_data What personal data do you have of me?
@subscribe I want to subscribe to your notifications
@unsubscribe I want to unsubscribe to your notifications

Dialogs without intent

dialog purpose
ask_name To ask the name of the user
ask_email To ask the email address of the user
ask_phone To ask the phone number of the user
web_push_prompt To ask the user to allow and enable push notification
email_push_prompt To ask the user to allow email notifications

How to use

Eliciting user data

After installing this intent your chatbot will automatically respond to users telling their name, their email or their phone number by accepting and storing this information. You can also proactively ask your users for this information by invoking the dialogs ask_name, ask_email or ask_phone. The skill will remember the data in the user object:

user fields description
user.first_name Holds the captured name of the user
user.last_name Can be used to hold the last name, although this skill cannot distinguish first from last name yet
user.email Holds the email address of the user
user.phone Holds the phone number in normalized, international format

The bot will automatically set tags when an email or phone number is captured so you can easily see in the studio whether a user is reachable.

data provided tag set
email address email
phone number phone

Configure your privacy policy

In order for your chatbot to respond to questions about your privacy policy you need to provide the URL to your privacy policy in the settings of this skill: - Go to the Skills section - Click on the Identity skill - Go to Settings - Enter your URL - Click on Save

Notifying your users

The platform is able to automatically notify your users when a new message is sent by the system, but only if the user settings allow for it. The subscribe dialog can be invoked to ask the user for permission for notifications via web using the dialog web_push_prompt and email using the dialog email_push_prompt. These dialogs can also be used seperately.

The settings are stored in the following user fields. The platform will check these settings before sending notifications. Users can always enable or disable these settings simply by invoking the @subscribe or @unsubscibe intents.

user fields value description
user.web_push_status ok User allows and enabled push notifications via web
fail User allows push notifications, but failed to enable in browser
skip User skipped the question
no User doesn't allow push notification via web
user.mail_push_status ok User allows push notification via email
no User doesn't allow push notifictions via email

Removing personal data

The @forget intent will trigger the forget_me dialog. This dialog uses the task reset_user to go through all user information and simply clear and forget it. This gives your users the power to clear their personal data from the system. You don't need to extend this task or dialog when you added other fields to the user object than used in this skill because this task will simply traverse all elements stored in the user object and forget them. Please do remember to update the personal_details dialog however when fields are added. See below how to extend.

How to extend

You can easily add dialogs that ask other personal data yourself. Just make sure to store the data in the user object using the remember statement:

user.my_data = 'xyz'
remember user.my_data

When the data is part of personal data you should update your privacy policy with this fact and make sure to extend the personal_details by copying this dialogs and extend it with your data:

dialog personal_details do
  if user.first_name || user.last_name, do: say _"I know your name is #{user.first_name} #{user.last_name}"
  if user.email                       , do: say _"I know your email is #{user.email}"
  if user.phone                       , do: say _"I know your phone number is #{user.phone}"  
  if user.profile_picture do
    say _"I know your profile picture is"
    show image user.profile_picture
  end

  # add your fields here
  # 
  # if user.my_field, do: say _"Your field is #{my_field}"
  #

  say _"If you want me to forget about your personal details, just say 'forget my personal details' and I'll erase your details from my memory…"
end