
Here is a high-quality, SEO-optimized blog post tailored for a technical audience.
How to Track Salesforce Send Conversation Messages: A Deep Dive into ConvMessageSendRequest
Managing high-volume messaging in Salesforce requires more than just successful execution; it requires visibility. When your system invokes the “Send Conversation Messages” action, understanding the lifecycle of those requests is critical for auditing, troubleshooting, and performance tuning.
In this guide, we’ll explore how to use the ConvMessageSendRequest entity to track message status, identify failures, and monitor real-time processing.
Why Track Conversation Message Requests?
For Developers and Architects, visibility into asynchronous messaging is the difference between a “black box” system and a resilient one. By querying the tracking entity, you can:
- Audit Delivery: Know exactly how many messages succeeded versus failed.
- Debug Failures: Access specific error reasons without digging through raw logs.
- Monitor Latency: Compare
CreatedDateandCompletedDateto calculate processing time.
The Core Entity: ConvMessageSendRequest
Every time the “Send Conversation Messages” action is triggered—whether via Flow, Apex, or API—Salesforce logs the transaction in the ConvMessageSendRequest object. This object acts as a header for the batch of messages being sent.
Key Fields to Monitor
| Field Name | Description |
| RequestStatus | The current state of the batch (e.g., Pending, InProgress, Completed). |
| SuccessMessageCount | Total number of messages successfully delivered. |
| FailedMessageErrorReasons | A detailed breakdown of why messages failed. |
| TotalMessageCount | The aggregate number of messages in the request. |
Querying the Data: Sample SOQL
To extract insights from your messaging data, use the following SOQL query. This is particularly useful for building custom monitoring dashboards or health-check scripts.
SOQL:
SELECT Id, CreatedDate, CompletedDate, RequestStatus, TotalMessageCount,
SuccessMessageCount, SuccessMessageIdentifiers,
FailedMessageCount, FailedMessageErrorReasons, FailedMessageIdentifiers,
InProgressMessageCount, InProgressMessageIdentifiers,
PendingMessageCount, PendingMessageIdentifiers
FROM ConvMessageSendRequest
Analysis of the Query Results
- Identifiers: Fields like
SuccessMessageIdentifiersandFailedMessageIdentifiersprovide the specific record IDs of the messages, allowing you to cross-reference them with specific Contacts or Leads. - Error Handling: The
FailedMessageErrorReasonsfield is your primary tool for identifying common patterns, such as invalid phone numbers or opt-out constraints.