> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# sms table

> This table will hold outgoing sms messages when transmitted with WebServices

## sms Table (388)

This table will hold outgoing sms messages when transmitted with WebServices

## Fields

| Name                        | Description                                                                                | Type                                           | Nullable |
| --------------------------- | ------------------------------------------------------------------------------------------ | ---------------------------------------------- | :------: |
| id                          | Primary key                                                                                | PK                                             |    No    |
| sms\_text                   | The actual text to be sent                                                                 | Clob                                           |    Yes   |
| outbox\_id                  | The outbox entry which holds the information about the sms to be sent                      | FK [outbox](./outbox.mdx)                      |    No    |
| reference\_key              | The reference used for delivery report                                                     | String(255)                                    |    No    |
| session\_key                | The reference used for identifying a session, like in-reply-to and message-id              | String(255)                                    |    Yes   |
| delivery\_status            | Indicates a delivery status for the sms                                                    | String(255)                                    |    Yes   |
| delivery\_status\_desc      | Indicates a delivery status description for the sms                                        | String(255)                                    |    Yes   |
| delivery\_ext\_status       | Indicates extended delivery status for the sms                                             | String(255)                                    |    Yes   |
| delivery\_ext\_status\_desc | Indicates extended delivery status description for the sms                                 | String(255)                                    |    Yes   |
| delivered\_at               | The date and time when the sms was delivered                                               | DateTime                                       |    Yes   |
| shipment\_id                | Reference to the shipment id, used for eMarketeer                                          | FK [s\_shipment](./s-shipment.mdx)             |    No    |
| customer\_id                | Reference to the customer id, used for eMarketeer                                          | FK [person](./person.mdx)                      |    No    |
| message\_id                 | Reference to the message id this SMS was sent from                                         | FK [ej\_message](./ej-message.mdx)             |    No    |
| outgoing\_message\_id       | Reference to the outgoing message entry created by netserver for sending and status update | FK [outgoing\_message](./outgoing-message.mdx) |    Yes   |

<img src="https://mintcdn.com/superofficeas/8-OIGQQJR0VGDXy_/media/loc/en/database/tables/sms.png?fit=max&auto=format&n=8-OIGQQJR0VGDXy_&q=85&s=04281f395a730d9bda782f02001f8335" alt="sms table relationship diagram" width="779" height="712" data-path="media/loc/en/database/tables/sms.png" />

## Indexes

| Fields                | Types       | Description |
| --------------------- | ----------- | ----------- |
| outbox\_id            | FK          | Index       |
| reference\_key        | String(255) | Index       |
| session\_key          | String(255) | Index       |
| shipment\_id          | FK          | Index       |
| customer\_id          | FK          | Index       |
| message\_id           | FK          | Index       |
| outgoing\_message\_id | FK          | Index       |

## Relationships

| Table                                   | Description                                                                          |
| --------------------------------------- | ------------------------------------------------------------------------------------ |
| [ej\_message](./ej-message)             | This table contains the messages listed under tickets.                               |
| [outbox](./outbox)                      | Outgoing emails with sending status and other info                                   |
| [outgoing\_message](./outgoing-message) | Delivery of outgoing messages to messageplugins, updated with status asynchroneously |
| [person](./person)                      | Persons                                                                              |
| [s\_shipment](./s-shipment)             | Contains info about one shipment. The addresses are stored in s\_shipment\_addr      |

## Replication Flags

* None

## Security Flags

* No access control via user's Role.


## Related topics

- [sms_hysteria table](/en/database/tables/sms-hysteria.md)
- [Get Sms Config](/en/api/reference/restful/agent/customerservice_agent/get-sms-config.md)
- [outbox table](/en/database/tables/outbox.md)
- [ticket_alert table](/en/database/tables/ticket-alert.md)
- [SMS connectors](/en/marketing/sms/it/index.md)
- [outgoing_message table](/en/database/tables/outgoing-message.md)
