Message Data

This data set contains all SMS & MMS messages associated with lists of the company's account.

How much data is retained?

This data set will contain 7 days’ worth of data starting from the most recent data refresh. Data is refreshed once per day. For example, if you are looking at the data set on 7/18, it will contain data from 7/11 to present.

What data can be pulled?

Column NameTypeNullableDefaultDescription
ACTIVITY_NAMEVARCHAR(4000)TRUENULLThe campaign name that is correlated to the message
ACTIVITY_TYPEVARCHAR(16777216)TRUENULLType of campaign the message data is associated with. See here for a list of activity types.
ACTIVITY_IDVARCHAR(255)TRUENULLVibes UID for the campaign that associated with the message
CARRIER_CODENUMBER(38,0)TRUENULLThe carrier code indicating specific carrier of the recipient's/sender's mobile phone number. See Appendix - Carrier Codes for all valid carriers.
CARRIER_NAMEVARCHAR(50)TRUENULLThe name of the carrier that is associated with the recipient's/sender's mobile phone number
CLIENT_MESSAGE_IDVARCHAR(16777216)TRUENULLMessage ID that id defined by the company
COMPANY_KEYVARCHAR(50)TRUENULLVibes ID used to identify a company that is associated with the message
DW_CREATED_ATTIMESTAMP_TZ(9)TRUENULLThe date timestamp that indicates when the row was created in Vibes data warehouse. The time zone is central time for North America customers and UTC for European Customers
EXTERNAL_PERSON_IDVARCHAR(16777216)TRUENULLA subscriber specific identifier that is set by the company
FAILURE_REASONVARCHAR(16777216)TRUENULLA smpp_error_code indicating whether the message was successfully sent to the carrier or not. Value of 0 is success, all other codes are failure.
MESSAGEVARCHAR(16777216)TRUENULLThe text of the message
MESSAGE_STATUSVARCHAR(16777216)TRUENULLIndicates whether the message was successfully received by the intended recipient or not. SUCCESS means the message was successfully received. FAILURE means the message failed to reach the recipient.
MESSAGE_TYPEVARCHAR(16777216)TRUENULLIndicates whether the message was sent from or received by the short code. Mobile Originated (MO) is sent from the device to the short code. Mobile Terminated (MT) is sent from the short code to the device.
MESSAGE_IDVARCHAR(16777216)TRUENULLUUID of the message
PERSON_KEYVARCHAR(40)TRUENULLVibes UID for the subscriber
PHONE_NUMBERVARCHAR(255)TRUENULLThe mobile phone number of the recipient/sender
PHONE_NUMBER_E164_FORMATVARCHAR(255)TRUENULLThe mobile phone number of the recipient/sender that also includes country code
RECEIPT_AT_TTZTIMESTAMP_TZ(9)TRUENULLThe date timestamp when a message was generated on our platform or received from the carrier. This timestamp will be in the time zone of the company.
SHORTCODEVARCHAR(16777216)TRUENULLThe short code that the message was sent on
MESSAGE_FORMATVARCHAR(10)TRUENULLThe format type of the message (MMS or SMS)
ACTIVITY_UIDVARCHAR(255)TRUENULLLEGACY: For use with legacy Data Sharing integrations
PERSON_UID\INTTRUENULLLEGACY: for use with legacy Public APIs
MESSAGE_UIDVARCHAR(16777216)TRUENULLLEGACY: For use with legacy Data Sharing integrations
COMPANY_UIDNUMBER(38,0)TRUENULLLEGACY: For use with legacy Data Sharing integrations

Sample Query

–- A query that will pull all sms messages from yesterday
SELECT
PERSON_KEY
, EXTERNAL_PERSON_ID
, PHONE_NUMBER
, MESSAGE
, MESSAGE_ID
,CARRIER_NAME
,MESSAGE_STATUS
,MESSAGE_TYPE
,FAILURE_REASON
,ACTIVITY_TYPE
,SHORTCODE
,DW_CREATED_AT

FROM MESSAGES
WHERE CAST(DW_CREATED_AT AS DATE) >= CAST(DATEADD(day,-1,CURRENT_DATE())AS DATE)
AND CAST(DW_CREATED_AT AS DATE) < CAST(CURRENT_DATE() AS DATE)