-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAskBotAI-stagging.json
More file actions
587 lines (587 loc) · 17.8 KB
/
AskBotAI-stagging.json
File metadata and controls
587 lines (587 loc) · 17.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
{
"id": "com.rohitchouhan.sap.askbotai",
"version": "1.0.0",
"name": "AskBot AI",
"description": "Custom AI-Powered Chat Bot Widget for SAP Analytics Cloud",
"newInstancePrefix": "AskBotAI",
"vendor": "rohitchouhan.com",
"eula": "rohitchouhan.com",
"license": "MIT",
"icon": "https://cdn.jsdelivr.net/gh/SAP-Custom-Widget/AskBotAI@stagging/icon.png",
"imports": [
"datasource"
],
"webcomponents": [
{
"kind": "main",
"tag": "com-rohitchouhan-sap-askbotai",
"url": "https://cdn.jsdelivr.net/gh/SAP-Custom-Widget/AskBotAI@stagging/dist/AskBotAI.bundle.js",
"integrity": "sha512-jCsZCbwNsi9OGINakKk1hD1DxY4jyZkPZZjGuywwSH/1CnOGrGnsnVmXvBn1HTl7u4TsibYxprX77z862RF4Cw==",
"ignoreIntegrity": false
},
{
"kind": "builder",
"tag": "com-rohitchouhan-sap-askbotai-builder",
"url": "https://cdn.jsdelivr.net/gh/SAP-Custom-Widget/AskBotAI@stagging/dist/AskBotAI.bundle.js",
"integrity": "sha512-jCsZCbwNsi9OGINakKk1hD1DxY4jyZkPZZjGuywwSH/1CnOGrGnsnVmXvBn1HTl7u4TsibYxprX77z862RF4Cw==",
"ignoreIntegrity": false
}
],
"types": {
"Action": {
"description": "An action button for a Q&A item",
"properties": [
{
"name": "text",
"type": "string",
"description": "Text displayed on the button",
"mandatory": true
},
{
"name": "type",
"type": "string",
"description": "Type of action (link, reply, trigger, plain)",
"mandatory": true
},
{
"name": "value",
"type": "string",
"description": "URL for link, text for reply, keyword for trigger, or unique ID for plain",
"mandatory": true
}
]
},
"QAItem": {
"description": "A Question and Answer pair",
"properties": [
{
"name": "question",
"type": "string",
"description": "Question keyword(s)",
"mandatory": true
},
{
"name": "answer",
"type": "string",
"description": "Answer (markdown supported)",
"mandatory": true
},
{
"name": "actions",
"type": "Action[]",
"description": "Action buttons. Supported types: link, reply, trigger, plain.",
"mandatory": false
},
{
"name": "type",
"type": "string",
"description": "Type (e.g. Flow, Form)",
"mandatory": false
},
{
"name": "submitButtonText",
"type": "string",
"description": "Custom text for the submit button (for Form type)",
"mandatory": false
},
{
"name": "submitSuccessText",
"type": "string",
"description": "Custom success message after form submission",
"mandatory": false
},
{
"name": "fields",
"type": "FormField[]",
"description": "Form fields (for Form type)",
"mandatory": false
},
{
"name": "formId",
"type": "string",
"description": "Unique identifier for the form (optional)",
"mandatory": false
},
{
"name": "enabled",
"type": "boolean",
"description": "Enabled status",
"mandatory": false
}
]
},
"FormField": {
"description": "A field in an interactive form",
"properties": [
{
"name": "label",
"type": "string",
"description": "Field label displayed to the user",
"mandatory": true
},
{
"name": "type",
"type": "string",
"description": "Field type (text, number, date, password, textarea, dropdown, radio, checkbox)",
"mandatory": true
},
{
"name": "id",
"type": "string",
"description": "Unique ID for the field (used in collected data)",
"mandatory": true
},
{
"name": "options",
"type": "string",
"description": "Comma-separated options (for dropdown, radio, and multi-select checkbox)",
"mandatory": false
}
]
},
"FormItem": {
"description": "A Form item to be added programmatically",
"properties": [
{
"name": "question",
"type": "string",
"description": "Question keyword(s) or Flow ID",
"mandatory": true
},
{
"name": "answer",
"type": "string",
"description": "Answer (markdown supported)",
"mandatory": false
},
{
"name": "fields",
"type": "FormField[]",
"description": "Array of form fields",
"mandatory": true
},
{
"name": "submitButtonText",
"type": "string",
"description": "Custom text for the submit button",
"mandatory": false
},
{
"name": "submitSuccessText",
"type": "string",
"description": "Custom success message after submission",
"mandatory": false
},
{
"name": "actions",
"type": "Action[]",
"description": "Additional buttons to show with the form",
"mandatory": false
},
{
"name": "formId",
"type": "string",
"description": "Unique identifier for the form (optional)",
"mandatory": false
},
{
"name": "enabled",
"type": "boolean",
"description": "Whether the form is active",
"mandatory": false
}
]
}
},
"properties": {
"notificationToggle": {
"description": "Enable or disable notifications for new messages",
"type": "boolean",
"default": true
},
"designType": {
"description": "Widget UI Design",
"type": "string",
"default": "Widget"
},
"overlayPosition": {
"description": "Position for Overlay Widget",
"type": "string",
"default": "bottom-right"
},
"botName": {
"description": "Name of the Chat Bot",
"type": "string",
"default": "AskBot AI"
},
"botStatus": {
"description": "Bot Status Text",
"type": "string",
"default": "Online"
},
"defaultGreeting": {
"description": "Bot Default Greeting Message",
"type": "string",
"default": "Hi! How can I help you today?"
},
"enableSpeakerFeatures": {
"description": "Enable Speaker Features (TTS output)",
"type": "boolean",
"default": true
},
"enableMicFeatures": {
"description": "Enable Microphone Features (Voice input)",
"type": "boolean",
"default": true
},
"quickQuestions": {
"description": "Comma-separated list of quick questions to display initially",
"type": "string",
"default": "How to Install AskBot, What is AskBot, Who Developed AskBot, Contact Us"
},
"fallbackMessage": {
"description": "Bot Fallback Message",
"type": "string",
"default": "I'm sorry, I don't understand that."
},
"themeColor": {
"description": "Theme Color",
"type": "string",
"default": "#0078D4"
},
"widgetHeight": {
"description": "Widget Height (px)",
"type": "integer",
"default": 500
},
"qaData": {
"description": "Collection of Q&A pairs",
"type": "QAItem[]",
"default": [
{
"question": "How to Install AskBot, AskBot Installation, Install AskBot",
"answer": "\n\nTo get started with **AskBot**, first download the [AskBotAI.json](https://sap-custom-widget.rohitchouhan.com/?dl=AskBotAI) file.\n\n**Key Features**:-\n| Feature | Description | Status |\n| :--- | :--- | :--- |\n| **NLP Search** |Natural Language Processing AI | ✅ Supported |\n| **Markdown** | Tables, Lists, **Bold**, and Links | ✅ Supported |\n| **Voice Input** | Integrated Speech-to-Text (STT) | ✅ Supported |\n| **Speech Output** | Natural Text-to-Speech (TTS) | ✅ Supported |\n| **Interactive** | Buttons, Links, and Flow Triggers | ✅ Supported |\n",
"actions": [
{
"text": "✅ Yes, Next",
"type": "trigger",
"value": "step_2"
}
],
"enabled": true
},
{
"question": "step_2",
"answer": "Log in to your **SAC** tenet, navigate to **Stories** in the left panel, and click on **Custom Widget**.",
"actions": [
{
"text": "✅ Yes, Next",
"type": "trigger",
"value": "step_3"
}
],
"enabled": true,
"type": "Flow"
},
{
"question": "step_3",
"answer": "Next, click the **+** icon ➕ to upload your downloaded **AskBotAI.json** file. 📁 \n\n🎉 Congratulations, you are all set! 🚀",
"actions": [],
"enabled": true,
"type": "Flow"
},
{
"question": "Developer of AskBot, Creator, AskBot Owner",
"answer": "AskBot is an AI-powered custom chat box designed for SAP Analytics Cloud. It is developed by Rohit Chouhan.",
"actions": [
{
"text": "About Developer",
"type": "link",
"value": "https://linkedin.com/in/itsrohitchouhan"
}
]
},
{
"question": "What is AskBot, Working of AskBot, How AskBot Works, What is the Working of AskBot, AskBot Functionality, AskBot Capabilities, What Does AskBot Do, AskBot AI Features",
"answer": "AskBot helps you integrate a chatbot system into SAP Analytics Cloud. It is AI-powered and helps users get accurate responses by understanding the intent of the question, not just fixed keywords.",
"actions": [
{
"text": "Know More",
"type": "link",
"value": ""
},
{
"text": "About Developer",
"type": "reply",
"value": "Who Developed AskBot"
}
]
},
{
"question": "contact us, contacts, contacting, need support, support ticket",
"answer": "",
"enabled": true,
"type": "Form",
"submitButtonText": "Submit Form",
"submitSuccessText": "Your message has been sent successfully!",
"fields": [
{
"label": "Your Name",
"type": "text",
"id": "name"
},
{
"label": "Your Email",
"type": "text",
"id": "email"
},
{
"label": "Your Department",
"type": "dropdown",
"id": "dept",
"options": "IT, Consulting, Security"
},
{
"label": "SAP User?",
"type": "radio",
"id": "sap_user",
"options": "Yes,No"
},
{
"label": "Your Message",
"type": "textarea",
"id": "message"
}
]
}
]
},
"threshold": {
"description": "AI Accuracy Engine (Threshold percentage)",
"type": "integer",
"default": 75
},
"showBotIcon": {
"description": "Show or Hide Bot Icon in Header",
"type": "boolean",
"default": true
},
"customBotIcon": {
"description": "Custom Bot Icon Image Link (Direct URL)",
"type": "string",
"default": ""
},
"enableHistory": {
"description": "Enable Persistent Chat History per URL",
"type": "boolean",
"default": true
},
"overlayWidth": {
"description": "Width of the Floating Overlay (px)",
"type": "integer",
"default": 350
}
},
"methods": {
"enableUpdateNotification": {
"description": "Enable or disable update notifications",
"parameters": [
{
"name": "notificationToggle",
"type": "boolean",
"description": "Enable or disable update notifications"
}
],
"body": "this.notificationToggle = notificationToggle;"
},
"isUpdateNotificationEnable": {
"description": "Check if update notifications are enabled",
"returnType": "boolean",
"body": "return this.notificationToggle;"
},
"setQuickQuestions": {
"description": "Set the quick questions programmatically",
"parameters": [
{
"name": "questions",
"type": "string",
"description": "Comma-separated list of questions"
}
],
"returnType": "boolean"
},
"addQA": {
"description": "Add a new Question and Answer pair",
"parameters": [
{
"name": "question",
"type": "QAItem",
"description": "The question string"
}
],
"returnType": "boolean"
},
"deleteQA": {
"description": "Delete a specific Question and Answer pair",
"parameters": [
{
"name": "question",
"type": "string",
"description": "The question to delete (exact match)"
}
],
"returnType": "boolean"
},
"clearQA": {
"description": "Clear all Question and Answer pairs",
"returnType": "boolean"
},
"getAllQA": {
"description": "Get all Question and Answer pairs",
"returnType": "QAItem[]"
},
"getQA": {
"description": "Get a specific Question and Answer pair",
"parameters": [
{
"name": "question",
"type": "string",
"description": "The question to find (exact match)"
}
],
"returnType": "QAItem"
},
"openChat": {
"description": "Open chat in Overlay mode",
"returnType": "boolean"
},
"closeChat": {
"description": "Close chat in Overlay mode",
"returnType": "boolean"
},
"setThreshold": {
"description": "Set the AI Accuracy Engine threshold percentage",
"parameters": [
{
"name": "threshold",
"type": "integer",
"description": "The threshold percentage (0-100)"
}
],
"body": "this.threshold = threshold;"
},
"getThreshold": {
"description": "Get the current AI Accuracy Engine threshold percentage",
"returnType": "integer",
"body": "return this.threshold;"
},
"getClickedPlainActionButton": {
"description": "Get the ID of the last clicked plain action button",
"returnType": "string"
},
"getLastFormData": {
"description": "Get the data from the last submitted form as a JSON string",
"returnType": "Selection"
},
"getSubmittedFormId": {
"description": "Get the formId of the last submitted form",
"returnType": "string"
},
"addForm": {
"description": "Programmatically add a new Interactive Form",
"parameters": [
{
"name": "formItem",
"type": "FormItem",
"description": "The form item object"
}
],
"returnType": "boolean"
},
"deleteForm": {
"description": "Delete a form based on its question/ID",
"parameters": [
{
"name": "question",
"type": "string",
"description": "The question to delete"
}
],
"returnType": "boolean"
},
"getSentMessage": {
"description": "Get the last sent message",
"returnType": "string"
},
"getRecievedMessage": {
"description": "Get the last received message",
"returnType": "string"
},
"sendMessage": {
"description": "Send a message to the bot programmatically",
"parameters": [
{
"name": "text",
"type": "string",
"description": "The message text to send to the bot"
},
{
"name": "showInChatbox",
"type": "boolean",
"description": "Whether to display the user message in the chatbox"
}
],
"returnType": "boolean"
},
"checkMatch": {
"description": "Check if a user input matches the target keywords (fuzzy search)",
"parameters": [
{
"name": "targetKeywords",
"type": "string",
"description": "The expected keywords (e.g. 'date filter, filter on date')"
},
{
"name": "userInput",
"type": "string",
"description": "The user input string to test"
},
{
"name": "thresholdPercentage",
"type": "integer",
"description": "The match threshold percentage (0-100)"
}
],
"returnType": "boolean"
}
},
"events": {
"onMessageReceived": {
"description": "Event triggered when bot replies."
},
"onMessageSent": {
"description": "Event triggered when user sends a message."
},
"onActionClicked": {
"description": "Event triggered when an action button is clicked, use getClickedPlainActionButton() to get the ID of the clicked action button."
},
"onChatOpened": {
"description": "Event triggered when the chat window is opened."
},
"onChatClosed": {
"description": "Event triggered when the chat window is closed."
},
"onMicStarted": {
"description": "Event triggered when microphone listening starts."
},
"onMicEnded": {
"description": "Event triggered when microphone listening ends."
},
"onQuickQuestionClicked": {
"description": "Event triggered when a quick question chip is clicked."
},
"onFormSubmitted": {
"description": "Event triggered when an interactive form is submitted. Use getLastFormData() to retrieve the data."
}
}
}