Sunbird UCI
  • Overview of Sunbird UCI
  • 📙Learn
    • UCI use cases
    • UCI for Education(Case study)
    • Tech Overview
      • Glossary
      • High-level Architecture Design
      • Design Principles
      • Standards
  • 🚀Use
    • Choose your Persona
    • Adopter - Install and use UCI
      • Pre-requisites, Installation Setup, Post Setup
      • Setting up your very first conversation
      • API Documentation
      • Data Exhaust and Analytics
      • Posthog Event
      • Whatsapp (Netcore)
      • Environment Variables
    • Developer - Contribute to UCI
      • UCI Basics
        • XMessage Specification
        • Transformers
          • ODK Transformer
            • Interactive-Messages
            • Media Messages
            • Location
          • Broadcast Transformer
        • Adapters
          • Firebase Notification Adapter
        • User Segment
        • Schema Overview
          • UCI Core Schema
            • XMessage Schema
            • Assessment DB Schema
          • UCI API Schema
      • Development environment
        • Backend Setup
        • Setting up IDE
        • Environment variable setup
        • Debug services
        • Build and Execute UCI
        • Frontend Setup (Admin Console)
        • Frontend Setup (PWA)
        • Transport Socket
      • API Documentation
        • Bot Setup APIs
        • History APIs
        • Direct Message APIs
        • Vault APIs
      • Database Schema
        • Cassandra Xmessage Database
        • Postgres Forms Database
        • Postgres User Analytics Database
        • Postgres Comms Database
      • Contribution Guide
        • Your first PR
        • Contribute an Adapter
        • Adapter Implementation
        • Create a Transformer
    • Contact the administrator
  • ✅Releases
    • Release V2
  • 🤝Engage
    • Software License
    • Acceptable Use Policy
    • Terms of Service
    • Source Code
    • Discussion Forum
Powered by GitBook
On this page
  • Schema
  • Adapter
  • Transformer
  • Service
  • User Segment
  • Conversation Logic
  • Bot

Was this helpful?

Edit on GitHub
  1. Use
  2. Developer - Contribute to UCI
  3. UCI Basics
  4. Schema Overview

UCI API Schema

PreviousAssessment DB SchemaNextDevelopment environment

Last updated 2 years ago

Was this helpful?

UCI API schema is keeps the information regarding the bot and its configuration. When a new bot is created via its data will be stored in this Database.

Schema

Adapter

This table keeps the adapter information. These adapter will be associated to the to determine the adapter to be used while having the conversation. API to add a new adapter is given .

Field
Type
Description

id

uuid

channel

text

Eg. whatsapp/sms

provider

text

Eg. netcore/gupshup

config

jsonb

json configuration for adapter, Eg. its credentials

name

text

adapter name

created_at

timestamp

updated_at

timestamp

Transformer

This table store the transformers info and configuration, which are already implemented and working in UCI. to know what are transformers & how they work.

Field
Type
Description

id

uuid

name

text

tags

text[]

config

jsonb

json configuration

service_id

uuid

foreign key of service table

created_at

timestamp

updated_at

timestamp

Service

Field
Type
Description

id

uuid

type

text

type of service Eg. gql/get

config

jsonb

json configuration for fetching data from, Eg. get url/gql query configuration

name

text

created_at

timestamp

updated_at

timestamp

User Segment

This table store the details to fetch the users data for different conditions like all, by id or by phone number.

Field
Type
Description

id

uuid

name

text

all

uuid

service table id to be used when fetching the all users data

byId

uuid

service table id to be used when fetching the users data for a specific id

byPhone

uuid

service table id to be used when fetching the users data for a specific phone number

created_at

timestamp

updated_at

timestamp

Conversation Logic

Field
Type
Description

id

uuid

name

text

transformers

jsondb

json array of transformers config

adapter

uuid

id of adapter table

description

text

created_at

timestamp

updated_at

timestamp

Bot

Field
Type
Description

id

uuid

name

text

bot name for identification

starting message

text

a message to start a conversation on a channel

users

text[]

array of user segment ids

logicIDs

text[]

array of conversation logic ids

status

text

Eg. enabled/draft

start_date

date

conversation activation date

end_date

date

conversation de-activation date

ownerId

text

id of owner of this bot

ownerOrgId

text

org id of owner of this bot

purpose

text

purpose of the bot creation

This table store the info to use when fetching the users data. The service will be added with user segment, which later will be added in the bot table when creating .

This table stores the bot related logic like form id or message body. to see the API to add conversation logic.

This table keeps the details of bot name, starting message, to use, to use etc. API to add a bot can be found .

🚀
APIs
Click here
logic
user segment
conversation logic
here
one
Click here
here