Skip to content

dbo.makesafeSMSMessage ​

Info Generated by scripts/Generate-DataDictionary.ps1 - do not edit by hand. Edit descriptions in schemas/tables/dbo.makesafeSMSMessage.json and regenerate.

Columns ​

#ColumnTypeNullableFlagsDescription
1IDintnoidentityPrimary key, identity.
2SentdatetimeyesTimestamp the SMS was sent/received via ClickSend.
3FromMobilenvarchar(50)yesMobile number the SMS was sent from.
4ToMobilenvarchar(50)noMobile number the SMS was sent to.
5FromUserIDintyesFK to makesafeUser.ID identifying the staff sender, if the message was sent by a user.
6ToUserIDintyesFK to makesafeUser.ID identifying the staff recipient, if the message was sent to a user.
7OriginalMessageIDuniqueidentifieryesID of the message this one is a reply to, linking a reply thread.
8MessageIDuniqueidentifieryesUnique identifier for this SMS, e.g. as assigned by the ClickSend gateway.
9Bodynvarchar(MAX)yesText content of the SMS.
10CustomStringnvarchar(255)yesCustom reference string passed to/from ClickSend to correlate the message with internal records.
11ResponseCodeintyesResponse/status code returned by the ClickSend API for this message.
12PhoneCallIDintyesFK to makesafePhoneCall.ID this SMS relates to, if any.
13OutboundbitnoTrue if the SMS was sent by Ethos to the recipient, false if received inbound (e.g. an SMS reply).
14StatustinyintnoDelivery/processing status code of the SMS.
15TypetinyintnoCategory code of the SMS (e.g. notification, reply, escalation alert).
16createdAtdatetimenoTimestamp the record was created.
17FromContactIDuniqueidentifieryesFK to primeContacts identifying the Prime Ecosystem contact who sent the message, if applicable.
18ToContactIDuniqueidentifieryesFK to primeContacts identifying the Prime Ecosystem contact who received the message, if applicable.

Indexes ​

NameTypeUniquePKKey columnsIncludedFilter
IX_makesafeSMSMessage_Sent_OutboundNONCLUSTEREDOutbound, Sent

Relationships (inferred) ​

FromToConfidence
dbo.makesafeSMSMessage.FromUserIDdbo.makesafeUser.IDhigh
dbo.makesafeSMSMessage.ToUserIDdbo.makesafeUser.IDhigh

Referenced by ​

Procedures: dbo.spClickSendInsertSMSReply, dbo.spMakesafeGetAllMessages, dbo.spMakesafeGetAllSMSMessages, dbo.spMakesafeGetMessagesPaged, dbo.spMakesafeGetQueuedSMSMessages, dbo.spMakesafeGetQueuedSMSMessagesCount, dbo.spMakesafeGetSMSMessageByID, dbo.spMakesafeGetSMSMessagesbyID, dbo.spMakesafeInsertSMSMessage, dbo.spMakesafeInsertSMSReply, dbo.spMakesafeQueueEscalationSMSMessagesNoSchedules, dbo.spMakesafeQueueEscalationSMSMessagesUnassigned, dbo.spMakesafeQueueOnCallSMSAssignedNotClosed, dbo.spMakesafeQueueOnCallSMSMessagesUnassigned, dbo.spMakesafeQueueSMSMessage, dbo.spMakesafeQueueSMSMessageSMSMessages, dbo.spMakesafeUpdateQueuedSMSMessage, dbo.spMakesafeUpdateSMSStatus, dbo.spN8nQueueEscalationFailedExecutions, dbo.spN8nQueueEscalationPrimeRateLimit