Main variables

Here you will find the list of the platform’s default variables.
Estimated Reading Time: 10 minutes

Main variables:

The following is a list of the main variables available on the platform, with a brief explanation of each one.

  • isOpenNow: with true or false values, indicates if the bot will respond during opening hours or not.
  • operatorConnectedQty: number of operators connected.
  • chatPlatform: the platform where the conversation takes place can be “messenger,” “webchat,” “skype,” etc.
  • isWebChatMobile: if the user is chatting through a WebChat mobile.
  • isSubscribe: with true or false values, indicates if the user is subscribed to receive notifications.
  • lastSeen: last time the user saw a message.
  • lastUserSentence: last user message.
  • lastBotSentence: last message from the bot.
  • ruleCountInSession: how many times a rule has been activated in the session.
  • thisWasLastIntentToRun: this was the last rule to be executed.

Besides, you will find variables in bot and user tags (topics) (true/false).

Other default variables:

  • currentDay: current day.
  • currentMonth: current month.
  • currentYear: current year.
  • currentHour: current time.
  • dayForBusiness: day of the week for the company.
  • dayForUser: day of the week for the user (if the user is from a place with different Time zone).
  • agentSpoke: if the operator has spoken in the session or not.
  • agentSpokeLast: if the last speaker in the session was the operator.
  • ID de cola: service queue ID.
  • fullName: user’s full name.
  • lastName: user’s last name.
  • lastIntentID: ID of the last intent that was activated during the conversation.
  • random: a variable that can acquire a value between 0 and 1.
  • queuePriority: is used to prioritize a service queue.
  • channelDisplayName: name of the fanpage the chatbot is connected to on Messenger.
  • operatorQueueQty: number of operators in the attention queue.
  • operatorID: this variable contains data when the conversation has been assigned to an operator.
  • operatorName: name of the operator.
  • audioURL: URL of an audio file.
  • imageURL: URL of an image file.
  • videoURL: URL of a video file.
  • fileURL: URL of a file.
  • country: country.
  • messengerReFerral: referral URL.
  • ipAddress: IP address.
  • firstName: user’s first name (useful only for Facebook Messenger).
  • lastUserMessageID: Last user message ID.
  • gender: user’s gender (values: male or female).
  • customerId: User’s ID. It varies according to the channel.
  • chatChannelId: a variable that refers to the WhatsApp line number.
  • webChatHostPageTittle: title of the website where webchat is being viewed at (basically the name of the browser tab).
  • lastAgentToSpeak: used when the operator was the last one to write.
  • platformContactId: alphanumeric set that represents the client exclusively, in the context of a single bot. Except for WhatsApp, where it is a combination of ChatChannel (the WhatsApp line of the client) and this value (platformContactId)

Examples:

  • messenger: 2094465263950859
  • WhatsApp: 5491150545598
  • chat web: OX7TNDC421-5268763SJ7URRTV5R00WQV84MB0

Botmaker