Skip to content

Commit aacb90d

Browse files
committed
Add: UCI Schema Definition and Glossary
1 parent f081245 commit aacb90d

File tree

7 files changed

+249
-0
lines changed

7 files changed

+249
-0
lines changed

docs/UCI - Glossary.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
id: UCIGlossary
3+
title: Glossary
4+
sidebar_label: Glossary
5+
---
6+
7+
| S. No | Term | Definition |
8+
| ----- | ---- | -----------|
9+
| 1 | User | Any person or system that interacts with the bot. |
10+
| 2 | UCI | Unified Communication Interface |
11+
| 3 | Bot | A bot orchestrates a conversation with a specific conversation logic assigned to a set of users. A bot remembers the state of a conversation for a particular user. A bot object references user segment(s) and conversation logic(s). |
12+
| 4 | Conversation |Any exchange of recorded messages between two parties (users or systems) is called a conversation. |
13+
| 5 | Conversation Logic | Conversation logic defines the control flow for a specific conversation. A conversation logic object references a sequence of transformers that will be applied to arrive at the final response at a specific point in the conversation, and the associated adapter config for this conversation logic. (e.g. XForm logic, translation into Hindi - both associated with a Whatsapp-Gupshup adapter) |
14+
| 6 | Communication Channel | Any application or channel that allows users to connect with each other to exchange information. Examples of communication channels include (but not limited to), WhatsApp, SMS, Email, Slack, IVRS, Telegram. |
15+
| 7 | Conversation Data | All the data that is generated as a result of the communication on the bot. User input data as well as bot responses are called as conversation data. |
16+
| 8 | Service Provider | Any public or private organization that provides the service of gathering the response from the Communication Application and transmits the same over standard API’s to this Unified Communications Interface. Examples of service providers include (but not limited to) Gupshup, Twillo, Infobip, Netcore. |
17+
| 9 | User Registry (Local, Federated) | A place (index, directory or registry) where users profile data is stored, this can be a local storage as part of the Communication bot or a federated storage at different databases. |
18+
| 10 | Adapter | An adapter translates between messages received from communication channels on specific providers and the internal XMessage format. | A new adapter is created for every combination of communication channel and service provider (e.g. - WhatsApp + Gupshup; WhatsApp + NetCore; WhatsApp + Twilio). An adapter config references the communication channel, service provider and associated metadata such as specific business account phone number. |
19+
| 11 | Transformer | A transformer is a stateless processing object that takes inputs and converts the input into a processed response. Transformers may in turn call external services if needed. For example - Open Data Kit (ODK) |
20+
| 12 | Register a bot | An API that allows users to register for a new bot. |
21+
| 12 | Remote Data Repositories | Any remote repositories (e.g. user db, content db or others) required in a conversation logic can be to be accessed . |
22+
| 13 | Standards | These are set of standards that are defined in this Unified Communication Interfaces. These standards are the guardians and helpers to ensure basic functioning and to some extent modularity. |
23+
| 14 | Logs | All the inbound and outbound interactions that happen with the bot are captured and stored. |
24+
| 15 | Admin Console | An application that is built to consume UCI APIs, to enable bot configuration and visualizations on top of UCI configuration and conversation data. |
25+
| 16 | XMPP - XMessage | This is a standard defined for the UCI ecosystem. Key objective of this is to make the internal functioning UCI, independent of external factors viz. Communication channel and service provider. |
26+
| 17 | XForms | XForms is an XML markup for a new generation of forms and form-like applications on the Web. |
27+
| 18 | Role Based Access Control | Role-based access control or role-based security is an approach to restricting system access to authorized users. Amongst other functions this restricts bot usage only to a allowed group of users. |
28+
29+
30+
31+
32+

docs/UCI Schema - Adapter.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
id: SchemaAdapter
3+
title:
4+
sidebar_label: Adapter Schema
5+
---
6+
7+
```
8+
{
9+
"channel": "WhatsApp",
10+
"provider": "gupshup",
11+
"config": {
12+
"phone": 9876543210,
13+
"HSM_ID": "2000193031",
14+
"2WAY": "2000193033"
15+
},
16+
"credentialsHSM": {
17+
"vault": "Samagra",
18+
"variable": "gupshupCredentialsHSM" //API Key here
19+
},
20+
"credentials2WAY": {
21+
"vault": "Samagra",
22+
}
23+
```
24+
25+
26+

docs/UCI Schema - Bot.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
id: SchemaBot
3+
title:
4+
sidebar_label: Bot Schema
5+
---
6+
7+
```
8+
{
9+
"name": "ConversationName",
10+
"users": ["82c95b41-22e5-445c-b5ff-1d383bc8a7df"],
11+
"logic": ["82c95b"],
12+
"startingMessage": "Hi SamagraBot"
13+
}
14+
15+
```
16+
17+
18+
19+
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
id: SchemaConversationLogic
3+
title:
4+
sidebar_label: Conversation Logic Schema
5+
---
6+
7+
```
8+
{
9+
"transformers": [
10+
{
11+
"id": "82c95b41-22e5-445c-b5ff" // Hindi Audio to text (Generic Transformer)
12+
},
13+
{
14+
"id": "82c95b41-22e5-445c-b5ff" // Hindi to English (Generic Transformer)
15+
},
16+
{
17+
"id": "82c95b41-22e5-445c-b5ff" // Intent from English (Generic Transformer)
18+
},
19+
{
20+
"id": "82c95b41-22e5-445c-b5ff",
21+
"meta": {
22+
"form": "https://hosted.my.form.here.com",
23+
"hiddenFields": [
24+
{
25+
"name": "head_report_link",
26+
"transformer": {
27+
"id": "82c95b41-22e5-445c-b5ff", // URL Shortner (Generic Transformer)
28+
"meta": {
29+
"dataObjName": "user",
30+
"template": "8dd04833-fe19-480a-b7e9-726d868866d8"
31+
}
32+
}
33+
},
34+
{
35+
"name": "user_id",
36+
"transformer": {
37+
"id": "82c95b41-22e5-445c-b5ff", // User Info Updater in Hidden Field (Generic Transformer)
38+
"meta": {
39+
"dataObjName": "user",
40+
"template": "8dd04833-fe19-480a-b7e9-726d868866d8"
41+
}
42+
}
43+
},
44+
{
45+
"name": "user_age",
46+
"transformer": {
47+
"id": "82c95b41-22e5-445c-b5ff", // User Info Updater in Hidden Field (Generic Transformer)
48+
"meta": {
49+
"dataObjName": "user",
50+
"template": "8dd04833-fe19-480a-b7e9-726d868866d8"
51+
}
52+
}
53+
}
54+
]
55+
}
56+
}
57+
],
58+
"adapter": "b5ff"
59+
}
60+
```
61+
62+
63+
64+

docs/UCI Schema - Transformer.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
id: SchemaTransformer
3+
title:
4+
sidebar_label: Transformer Schema
5+
---
6+
7+
```
8+
{
9+
"name": "Rasa",
10+
"tags": ["generic"],
11+
"type": "rest-service",
12+
"config": {
13+
"url": "https://callme.maybe.com", //POST request with param xMessage with xMessage XML will be sent to this URL; The response should be an xMessage XMl;
14+
"cadence": {
15+
"concurrent": true,
16+
"pagination": true,
17+
"perPage": 100,
18+
"retries": 0,
19+
"retries-interval": 10,
20+
"timeout": 60
21+
},
22+
"validation":{
23+
"in": "xMessage-XML-In",
24+
"out": "xMessage-XML-Out"
25+
},
26+
"credentials": {
27+
"variable": "tranformerHeadersRasa", // Authorization Header
28+
"vault": "diksha"
29+
}
30+
}
31+
}
32+
```
33+
34+
35+
36+

docs/UCI Schema - UserSegment.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
id: SchemaUserSegment
3+
title:
4+
sidebar_label: User Segment Schema
5+
---
6+
7+
```
8+
{
9+
"all": {
10+
"type": "gql",
11+
"config": {
12+
"gql": "query getUsers {users: getUsersByQuery(queryString: \"id: 2c5816ea-63ff-483b-812b-1f250ebf50f3\") {id full_name data: data_json {accountName phone roleData { block designation district }}}}",
13+
"cadence": {
14+
"concurrent": true,
15+
"pageParam": "page", // Additional variable name to get paginated results.
16+
"pagination": true,
17+
"perPage": 100,
18+
"retries": 0,
19+
"retries-interval": 10,
20+
"timeout": 60
21+
},
22+
"credentials": {
23+
"variable": "gqlServerOdisha",
24+
"vault": "diksha"
25+
}
26+
}
27+
},
28+
"byID": {
29+
"type": "fusionAuth",
30+
"config": {
31+
"cadence": {
32+
"concurrent": true,
33+
"pagination": true,
34+
"perPage": 100,
35+
"retries": 0,
36+
"retries-interval": 10,
37+
"timeout": 60
38+
},
39+
"credentials": {
40+
"variable": "gqlServerOdisha", // Authorization Header
41+
"vault": "diksha"
42+
}
43+
}
44+
},
45+
"byPhone": {
46+
"type": "oauth2",
47+
"config": {
48+
"claims": ["email", "name", "fullName"],
49+
"cadence": {
50+
"concurrent": true,
51+
"pagination": true,
52+
"perPage": 100,
53+
"retries": 0,
54+
"retries-interval": 10,
55+
"timeout": 60
56+
},
57+
"credentials": {
58+
"clientID": "vaultKey1",
59+
"clientSecret": "vaultKey2",
60+
"vault": "diksha"
61+
}
62+
}
63+
}
64+
}
65+
66+
```
67+
68+
69+
70+

sidebars.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99

1010
module.exports = {
1111
uciSidebar: {
12+
'Overview': ['UCIGlossary'],
1213
'UCI API': ['APIAdapter', 'APITransformer', 'APIBot', 'APIUserSegment', 'APIConversationLogic' ],
14+
'UCI Schema': ['SchemaAdapter','SchemaTransformer','SchemaBot','SchemaUserSegment','SchemaConversationLogic',]
1315
},
1416
someSidebar: {
1517
Products: [

0 commit comments

Comments
 (0)