We can add the following fields are custom. If they are not added, the Chat will show the default values.
* externalKey is a string that identifies each device.
- titleChat It is a string with the title that you want to be shown in the chat.
- botName is a string with the name of the bot that will be displayed above the bubble on the left side.
- defaultUserName It is a string with the default name that the user will have and will be displayed above the user's bubble.
- messagePlaceholder It is a string with the message that is displayed in the text field where it must be written.
- openFileText It is a string with the text that will be displayed in the case a file has to be downloaded.
- backgroundChatColor is a string with the chat background color in hexadecimal or object color.
- backgroundBarColor is a string with the background color of the upper and lower bars in hexadecimal or object color.
- primaryColor is a string with the main color of the chat, buttons and floating icon in hexadecimal or object color.
* fullscreen is a boolean where you indicate if you want the chat to occupy the entire screen (true) or have a certain margin of the device (false).
- defaultChatIconResource is a reference with the icon resource taht show on the chat main icon.
- addContactTextButton is a string with the message text to add a contact.
- contactAddedMessage is a string with the message when you added a new contact.
- infoContactIconsColor is a string with the color of the icons of info contact view
- infoContactTopBarTitle is a string top bar title of info contact view.
- chatAutoOpenTime is an integer that indicates the seconds for the chat to open automatically. If no chatAutoOpenTime is specified, such as if you press the bubble before the specified time expires, the chat can be opened manually.
- clearMessages is a boolean that indicate if you want to delete or clear all messages from session storage every time you open the chat
- welcomeEvent is a string to define the welcome message one time you open the chat
You can check if the welcome event has been fired with this method:
let isEmitted = IndigitallChat.isWelcomeEmitted()
BOOL isEmitted = [IndigitallChat isWelcomeEmitted];
If you want to send a message custom you can use this method:
You can also control the action of deleting messages with this method: