The SMSMessageTracking data view in Salesforce Marketing Cloud (SFMC) is essential for gaining deep insights into SMS message activity. It provides detailed logs of message sends, deliveries, failures, opt-ins/outs, and more — making it one of the most comprehensive SMS analytics tools within MobileConnect.
This blog post outlines each field in this view, highlights use cases, and shares practical SQL queries to track and analyze your SMS campaigns.
What is the SMSMessageTracking Data View?
SMSMessageTracking
captures granular data about SMS messages sent and received via MobileConnect, including engagement actions (e.g., opt-outs, replies), delivery results, and message metadata.
Key Benefits
- Full Lifecycle Tracking: View send, delivery, bounce, and engagement events.
- Audience Insights: Monitor opt-ins, opt-outs, and reply behavior.
- Campaign Attribution: Tie messages to campaigns, keywords, and codes.
- Error Debugging: Identify invalid messages or delivery failures.
Fields in SMSMessageTracking Data View
Field | Type | Description |
---|---|---|
MobileMessageTrackingId | Number | Unique ID for the SMS message tracking event. |
EID | Number | Enterprise ID. Identifies the top-level account. |
MID | Number | Member ID (Business Unit) where the message was sent. |
Mobile | Text | The mobile number the message was sent to. |
MessageID | Number | Unique identifier of the SMS message. |
MessageTypeID | Number | ID indicating the type of message (e.g., standard, transactional). |
KeywordID | Text | Identifier of the keyword used. |
CodeID | Text | Code associated with the message (e.g., shortcode or long code). |
ConversationID | Number | ID of the conversation the message belongs to. |
CampaignID | Number | Campaign tied to the message. |
Sent | Number | Count of messages sent. |
Delivered | Number | Count of messages delivered. |
Undelivered | Number | Count of messages not delivered. |
Unsub | Number | Count of unsubscribe actions. |
OptIn | Number | Count of opt-in actions. |
OptOut | Number | Count of opt-out actions. |
Outbound | Number | Count of outbound messages. |
Inbound | Number | Count of inbound messages (replies). |
CreateDateTime | Date | Timestamp when the record was created. |
ModifiedDateTime | Date | Timestamp when the record was last modified. |
ActionDateTime | Date | Timestamp when the message action occurred. |
MessageText | Text | Content of the SMS message sent. |
IsTest | Text | Indicates if the message was a test (e.g., Yes/No). |
MobileMessageRecurrenceID | Number | ID for recurring messages. Useful for identifying batch sends. |
ResponseToMobileMessageTrackingID | Number | Reference to the message this was a response to. |
IsValid | Text | Indicates whether the message was valid. |
InvalidationCode | Number | Code explaining why the message was invalidated, if applicable. |
SendID | Number | Unique ID for the send event. |
SendSplitID | Number | ID for the A/B test split, if used. |
SendSegmentID | Number | ID for the segment in the send. |
SendJobID | Number | Job ID for the SMS send. |
SendGroupID | Number | Group ID associated with the send. |
SendPersonID | Number | Personalization ID tied to the send. |
SubscriberID | Number | SFMC subscriber ID associated with the message. |
When and Why to Use SMSMessageTracking
When to Use?
- When analyzing message delivery and performance.
- To measure campaign effectiveness by keyword or code.
- When tracking unsubscribe and opt-in behavior.
- To debug undelivered or invalid message issues.
Why Use It?
- Track Engagement: Monitor opt-in, opt-out, and reply metrics.
- Compliance & Consent: Verify SMS delivery and subscription activity.
- A/B Testing: Analyze split performance with
SendSplitID
. - Multi-Send Campaign Analysis: Filter by
SendJobID
,CampaignID
, orSegmentID
.
Sample SQL Queries
1. Count of Delivered vs. Undelivered Messages
SELECT
SUM(Delivered) AS TotalDelivered,
SUM(Undelivered) AS TotalUndelivered
FROM SMSMessageTracking
2. Opt-Outs by Keyword
SELECT KeywordID, COUNT(*) AS OptOuts
FROM SMSMessageTracking
WHERE OptOut = 1
GROUP BY KeywordID
3. Messages Sent This Week
SELECT Mobile, MessageText, ActionDateTime
FROM SMSMessageTracking
WHERE ActionDateTime >= DATEADD(day, -7, GETDATE())
4. Count of Inbound vs. Outbound Messages by Campaign
SELECT CampaignID,
SUM(Inbound) AS InboundMsgs,
SUM(Outbound) AS OutboundMsgs
FROM SMSMessageTracking
GROUP BY CampaignID
Conclusion
The SMSMessageTracking
data view is an indispensable tool for SMS campaign analysis in Salesforce Marketing Cloud. It allows you to track the lifecycle of every message and provides transparency into delivery, engagement, and system-level events.
Combine this view with SMSSubscriptionLog
, UndeliverableSms
, and SMSSendLog
to get a 360-degree view of your SMS channel performance.