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
  • Introduction
  • 1. Table Schema
  • 2. Table Schema
  • 3. Table Schema
  • 4. Table Schema
  • 5. Table Schema
  • 6. Table Schema
  • 7. Table Schema

Was this helpful?

Edit on GitHub
  1. Use
  2. Developer - Contribute to UCI
  3. Database Schema

Postgres Comms Database

Introduction

In this database, we utilize PostgreSQL to store all the pertinent information related to our chatbot. This includes details such as the adapter we are using, the type of transformer employed, and the number of users to whom we will send notifications or SMS messages. In essence, this database exclusively contains information about the chatbot.

1. Table Schema

  • Table Name - adapter

Column Name
Type
Description

id

UUID

Unique identifier for the record.

createdAt

Timestamp

Timestamp indicating when the record was created.

updatedAt

Timestamp

Timestamp indicating when the record was last updated.

channel

Text

This field identifies the communication channel utilized, such as SMS, WhatsApp, or web-based platforms, among others.

provider

Text

Name of the service provider, such as Netcore, Gupshup, Firebase, etc., responsible for delivering messages or services.

config

Jsonb

JSON data structure storing configuration information related to service providers. This field may include vault key credentials and other provider-specific settings.

name

Text

This field store name of adapter

---

2. Table Schema

  • Table Name - Service

Column Name
Type
Description

id

UUID

Unique identifier for the service record.

createdAt

Timestamp

Timestamp indicating when the service record was created.

updatedAt

Timestamp

Timestamp indicating when the service record was last updated.

type

Text

Type of the service like odk, gql, get. use for user segment.

config

JsonB

JSON data structure storing configuration information related to the service like user segment url, cadence, total records etc.

name

Text

Name or title of the service.

---

3. Table Schema

  • Table Name - Transformer

Column Name
Type
Description

id

UUID

Unique identifier for the transformer record.

createdAt

Timestamp

Timestamp indicating when the transformer record was created.

updatedAt

Timestamp

Timestamp indicating when the transformer record was last updated.

name

Text

Name or title associated with the transformer.

tags

Text

Tags or labels associated with the transformer like Odk, Generic, Broadcast.

config

Jsonb

JSON data structure storing configuration information related to the transformer.

serviceId

UUID

Foreign key referencing the service to which the transformer is related.

---

4. Table Schema

  • Table Name - TransformerConfig

Column Name
Type
Description

id

UUID

Unique identifier for the transformer configuration record.

createdAt

Timestamp

Timestamp indicating when the configuration record was created.

updatedAt

Timestamp

Timestamp indicating when the configuration record was last updated.

transformerId

UUID

Foreign key referencing the associated transformer.

meta

Jsonb

JSON data structure storing additional metadata related to the configuration like title, body, hiddenFields, formID, form, serviceClass, templateType etc.

conversationLogic

UUID

Foreign key referencing the conversation logic associated with the configuration.

---

5. Table Schema

  • Table Name - ConversationLogic

Column Name
Type
Description

id

UUID

Unique identifier for the conversation logic record.

createdAt

Timestamp

Timestamp indicating when the conversation logic record was created.

updatedAt

Timestamp

Timestamp indicating when the conversation logic record was last updated.

description

Text

Description providing details about the conversation logic.

adapterid

UUID

Foreign key referencing the associated adapter.

name

Text

Name or title associated with the conversation logic.

---

6. Table Schema

  • Table Name - bot

Column Name
Type
Description

id

UUID

Unique identifier for the bot record.

createdAt

Timestamp

Timestamp indicating when the bot record was created.

updatedAt

Timestamp

Timestamp indicating when the bot record was last updated.

name

Text

The name of the bot.

startingMessage

Text

The initial message or greeting used by the bot when interacting with users.

ownerID

Text

Identifier of the owner or creator of the bot.

ownerOrgID

Text

Identifier of the organization to which the bot owner belongs.

purpose

Text

A brief description of the purpose or function of the bot.

description

Text

A detailed description of the bot, including its capabilities and use cases.

startDate

Date

The date when the bot became active or started operating.

endDate

Date

The date when the bot's operation is scheduled to end or expire.

status

BotStatus

The current status of the bot, indicating whether it is enabled or disabled. (ENABLED, DISABLED)

tags

Text

Tags or labels associated with the bot for categorization or organization.

botImage

Text

Bot image icon.

---

7. Table Schema

  • Table Name - UserSegment

Column Name
Type
Description

id

UUID

Unique identifier for the user segment record.

createdAt

Timestamp

Timestamp indicating when the user segment record was created.

updatedAt

Timestamp

Timestamp indicating when the user segment record was last updated.

name

Text

Name or title associated with the user segment.

description

Text

Description providing details about the user segment.

count

Int

Count or number of users in the segment.

category

Text

Category or type of the user segment.

allServiceID

UUID

Unique identifier referencing the associated service for all users in the segment.

byPhoneServiceID

UUID

Unique identifier referencing the associated service for users in the segment by phone.

byIDServiceID

UUID

Unique identifier referencing the associated service for users in the segment by ID.

botId

UUID

Unique identifier referencing the associated bot for the user segment.

---

PreviousPostgres User Analytics DatabaseNextContribution Guide

Last updated 1 year ago

Was this helpful?

🚀