10. CXPerium Settings and Usage
After the connection between the Chatbot and CXPerium is established as described in Section 2, there are parameters and settings to be used for CXPerium to detect and respond to messages written, buttons pressed or different interactions during the ChatBot process. Below, the parameters to be used in the first stage will be mentioned chronologically, and a detailed description of each parameter is available in the Documentation of CXPerium (Still in Preparation). This documentation can be consulted for detailed information.
10.1 Configuration and TeamsConfig Settings
10.1.1 Configuration Settings
After clicking on the Configuration tab under the Assistant tab in the menu located on the left side of the CXPerium web page, specialized settings are made for the tools to be integrated into the Chatbot conversation process. For example, settings related to the use of tools such as ChatGPT, Dialogflow, ZoziAutomate are made from this section.
10.1.1.1 GdprConfig Settings
In this section, whether to ask for the user’s permission to use their personal information under the scope of KVKK (Personal Data Protection Law) can be adjusted as a question directed to users who will interact with the Chatbot for the first time. After selecting “Boolean” for the “Type” field, whether the KVKK approval will be asked is written as “true” or “false” in the “Value” section and saved. By default, this value is set to “false”.
10.1.1.2 DialogFlowConfig Settings
If the DialogFlow tool is to be integrated into CXPerium during the Chatbot process, the information obtained from DialogFlow should be entered here in CXPerium and saved. If it will not be used, “Type” should be selected as “Boolean” on the “IsEnable” line, and the “Value” should be entered as “false”.
The path to the file provided by Dialogflow should be entered into the “Credentials File Path” key. The “Type” should be selected as “String”.
The Project ID information provided by Dialogflow should be entered into the “ProjectId” key. The “Type” should be selected as “String”.
10.1.1.3 CxperiumLiveConfig Settings
CxperiumLiveConfig is where the connection status to live support in the Chatbot process is controlled. In the Chatbot process, when a response is received that is not expected in the dialogs defined by the developer or in the surveys conducted, or when meaningless or incorrect responses are received from the user, CXPerium can transfer the related Chatbot process to live support. In these cases, if transfer to live support is desired, the value of the “IsActive” key should be entered as “true” and the type should be “Boolean”. Otherwise, if it is not intended to be used, the value should be entered as “false”.
The number of unwanted contents sent by the user at which the message for transferring to live support should be sent is determined by the value of the “Transfer Fault Count” key. In the example below, the message for transferring to live support is sent to the user after 3 incorrect inputs in the Chatbot process.
For example, in the ChatBot process, it sends a transfer message to live support in the scenario that the user responds to the button message sent to the user with a message instead of clicking the button (i.e. 3 incorrect entries).
10.1.1.4 CxperiumLiveConfig Settings
If ChatGPT is to be integrated into CXPerium during the Chatbot process, the information obtained from ChatGPT should be entered here in CXperium and saved. If it will not be used, “Type” should be selected as “Boolean” on the “IsEnable” line, and the “Value” should be entered as “false”.
10.1.1.5 AutomateConfig Settings
If Zozi Automate is to be integrated into CXPerium during the Chatbot process, the information obtained from Zozi Automate should be entered here in CXperium and saved.
10.1.1.6 EnterpriseChatGptConfig Settings
If ChatGPT is to be integrated into CXPerium during the Chatbot process, the information obtained from ChatGPT should be entered here in CXperium and saved. If it will not be used, “Type” should be selected as “Boolean” on the “IsEnable” line, and the “Value” should be entered as “false”.
10.1.2 TeamsConfig Settings
If the Chatbot will serve on the Teams platform, the information provided by Teams should be entered here.
10.2 Intent Settings
After clicking on the Intent tab under the Assistant tab in the menu located on the left side of the CXPerium web page, the page that opens is where the communication between the Chatbot and CXPerium is established during the Chatbot conversation process. For example, which message written by the user on WhatsApp or which button is clicked (which is defined as the Regex value in CXPerium), according to the defined scenario, which dialog file will be executed is determined here.
On this page, connections are established with the TypeScript files in the “dialogs” folder inside the “src” folder in the project.
10.2.1 Intent (File Path)
An intent specifies the path of a file in the project. When a message with a certain Regex value is written on WhatsApp or when a user clicks on a button message with a specific Regex value on WhatsApp, CXPerium directs this conversation to the page specified in the intent matched with the related Regex. The intent entered as follows.
“CXPerium.Dialogs.WhatsApp.The name of the TypeScript file located in the dialog folder.”
It is case-sensitive and should not have spaces.
10.2.1 Regex Value
The expression to be captured among the messages written in the Chatbot conversation process is expressed as a Regex. The Regex value triggers CXPerium to redirect the WhatsApp conversation to the page (file path) specified in the intent matched with the related Regex when an expression is written as a message on WhatsApp or when a user clicks on a button message on WhatsApp. If a file path has no Regex value, that file will remain passive. This is because the related file path is not triggered by any Regex expression by CXPerium, so any WhatsApp conversation or button click will trigger this file, meaning any WhatsApp conversation will be directed to this file.
10.2.2.1 Create a Regex Value
When the “ADD” button is clicked, expressions to be used as triggers can be added to the field that appears. Previously entered Regex values can be corrected or deleted. It is case-sensitive and allows spaces between characters in the Regex value. In this case, CXPerium will search for the Regex value with spaces. Multiple Regex values can be created for a file path. In this case, if any of the entered Regex values appear in the WhatsApp conversation or they are triggered as buttons, CXPerium will trigger the corresponding file path and redirect the WhatsApp conversation.
10.2.2.1.1 Capturing the Phrases in a WhatsApp Message
Depending on how the related expression is placed in the message, the following key usage is used to trigger the page specified in the intent.
hello: Indicates that the word “hello” should be present anywhere in the text. For example, it matches expressions like “hello”, “world hello”, “hello there”, “say hello”. However, it does not match expressions like “helloo”, “hhello”, “goodbye”.
^hello: Indicates that the word “hello” should be at the beginning of the text, but does not restrict it to the end. For example, it matches expressions like “hello world”, “hello there”, “hello!”. However, it does not match expressions like “world hello”, “there hello”, “say hello”, “goodbye hello”.
hello$: Indicates that the word “hello” should be at the end of the text, but does not restrict it to the beginning. For example, it matches expressions like “world hello”, “there hello”, “say hello”. However, it does not match expressions like “hello”, “hello world”, “hello there”, “hello!”.
^hello$: Checks if a text matches exactly with the word “hello”, meaning the text should only consist of the word “hello” from start to end. It only matches with “hello” exclusively. However, it does not match expressions like “hello world”, “hello there”, “say hello”.
10.2.2.1.2 Clicking the Button in Button and List Messages
As explained in Section 11.4 and Section 11.5, the id value assigned to buttons in button or list messages is written as the Regex value. In this case, CXPerium captures which button is clicked with the button’s id and redirects the WhatsApp conversation to the desired dialog page to be directed, triggering the related file.
10.2.3 Intent Creation and Regex Value Usage Example
10.2.3.1 Example of Capturing Regex Value as Message
If you want the “Hello.ts” file in the related dialogs folder to be executed when the “hello” Regex expression is written as a message on WhatsApp, it should be written and saved as follows:
Intent=CXPerium.Dialogs.WhatsApp.Helloand Regex Value=hello
10.2.3.1 Example of Capturing Regex Value in Button Messages
When the “id” of the clicked button is triggered, the dialog file that you want to be executed should be indicated here. In other words, the id information of the related buttons is entered as the Regex value. For example, let’s say the buttons in the button message are “YES” and “NO”. If you want the “Yes.ts” file in the dialog folder to be executed when the “YES” button is clicked, and the “No.ts” file to be executed when the “NO” button is clicked, then two new intent should be created and saved as follows:
For the “YES” button; Intent: CXPerium.Dialogs.WhatsApp.Yes, Regex Value: YES
For the “NO” button; Inent: CXPerium.Dialogs.WhatsApp.No, Regex Value: NO
If the button message is defined as follows (As detailed in Section 11.4.)
const buttons: TButton[] = [{id: ‘BtnYes’,title:’Yes’},{id: ‘BtnNo’,title:’No’}]
the IDs for the “Yes” and “No” buttons would be “BtnYes” and “BtnNo”, respectively. In this case, the intents should be as follows: