Send Bulk MMS

Use sendBulkMMS() to send the same multimedia message to one or more Salesforce records.

What this API supports

This API supports both:

  • MMS with text and media
  • MMS with media only

To send an MMS, the subscriber must provide at least one valid public media URL.

When the request is accepted, the SDK creates outbound records on Message History and queues them for delivery.

Method signature

public static ConversiveAPI.MessageResponse sendBulkMMS(
List<Id> contactIds,
String message,
List<String> mediaUrls,
List<String> phoneList,
Id senderId
)

Inputs

ParameterTypeRequiredDescription
contactIdsList<Id>YesSalesforce record IDs that should receive the MMS
messageStringNoText body for the MMS. Can be blank for media-only MMS
mediaUrlsList<String>YesPublicly accessible media URLs to attach
phoneListList<String>YesOrdered phone field API names used to resolve recipient phone numbers
senderIdIdYesSalesforce ID of the Sender_Id__c record used for outbound messaging

Input examples

new List<Id>{ con1.Id, con2.Id }
'Hello, this is the invite for our new Product Launch Event.'
new List<String>{ 'https://images.unsplash.com/photo-1516387938699-a93567ec168e' }
new List<String>{ 'MobilePhone', 'Phone' }
senderRec.Id

Media URL requirements

The Confluence page documents the following rules:

  • at least one media URL is required
  • the URL must be public and reachable
  • the URL should point directly to the media asset
  • one or more media URLs may be provided
  • MMS can be sent with text or without text, but not without media

Response type

public class MessageResponse {
public String response; // SUCCESS / ERROR
public String responseMessage; // Human-readable message
}

Documented validation failures

ConditionDocumented result
contactIds is null or emptyresponse = 'ERROR', responseMessage = 'No contacts provided'
mediaUrls is null or emptyresponse = 'ERROR', responseMessage = 'At least one valid public media URL must be provided.'
phoneList is null or emptyresponse = 'ERROR', responseMessage = 'At least one phone field must be provided.'
senderId is nullresponse = 'ERROR', responseMessage = 'Sender Id is required.'

Message processing behavior

When validation passes, the SDK:

  1. validates input parameters
  2. resolves recipient phone numbers from phoneList
  3. validates that at least one media URL exists
  4. uses the provided sender record
  5. creates outbound records on Message History
  6. stores each media URL in the MMS Detail child object
  7. submits the messages to the Conversive platform

Record creation behavior

Message History

The parent outbound record is created on Message History.

MMS Detail

Each media URL is stored as a child record in MMS Detail, including:

  • the media URL
  • a lookup to the parent Message History record

Multiple media URLs

If multiple URLs are passed:

  • 1 parent Message History record is created
  • 1 MMS Detail child record is created per media URL

Message status lifecycle

StatusMeaning
SubmittedMessage record created and queued for delivery
ERRORDelivery failed during the callout to Conversive

Callout failure behavior

If the message record is created but the platform callout fails:

  • initial status = Submitted
  • later status = ERROR

Example

Contact con1 = new Contact(
LastName = 'Mark Smith',
MobilePhone = '9876543210'
);
Contact con2 = new Contact(
LastName = 'Eugene Taylor',
MobilePhone = '9876543211'
);
insert new List<Contact>{ con1, con2 };
Sender_Id__c senderRec = new Sender_Id__c(
Label__c = 'Marketing',
Phone__c = '9330909119'
);
insert senderRec;
ConversiveAPI.MessageResponse resp =
ConversiveAPI.sendBulkMMS(
new List<Id>{ con1.Id, con2.Id },
'Hello, this is the invite for our new Product Launch Event.',
new List<String>{
'https://images.unsplash.com/photo-1516387938699-a93567ec168e'
},
new List<String>{ 'MobilePhone', 'Phone' },
senderRec.Id
);
System.debug('Response: ' + resp.response);
System.debug('Message: ' + resp.responseMessage);

Media-only example

ConversiveAPI.MessageResponse resp =
ConversiveAPI.sendBulkMMS(
new List<Id>{ con.Id },
'',
new List<String>{ 'https://images.unsplash.com/photo-1516387938699-a93567ec168e' },
new List<String>{ 'MobilePhone', 'Phone' },
senderRec.Id
);

Example success response

response = 'SUCCESS'
responseMessage = 'Messages queued for delivery'

Example error responses

No contacts provided

response = 'ERROR'
responseMessage = 'No contacts provided'

Missing media URLs

response = 'ERROR'
responseMessage = 'At least one valid public media URL must be provided.'

Missing sender ID

response = 'ERROR'
responseMessage = 'Sender Id is required.'

Missing phone fields

response = 'ERROR'
responseMessage = 'At least one phone field must be provided.'

What success means here

A successful MessageResponse means the MMS was accepted and queued. It does not mean final carrier delivery has completed.

Best practices

  • always provide at least one reachable public media URL
  • test media URLs before using them in production
  • use small-scale testing before high-volume sends
  • review both Message History and MMS Detail when troubleshooting