Campaign_Send_Transactional

Campaign_Send_Transactional( string keyint campaignId,struct contactstring sourcestruct replacements)
 

Note: When using one of the API wrappers, you do not need to pass the API key. The wrapper will pass the key for you, your first parameter should be the second parameter in the signature.

Description

Send a new message in a transactional Campaign. 

A transactional campaign is sent to one recipient at a time for a specific purpose with replacement values for tokens specific to that message. Ex: sending a user's authorization code following a signup action on your site. Replacements will override the value of a custom field with the same name in the Campaign. If the content of your email included a string {activation_code}, your replacements could contain {'activation_code':'123'}, and that value would be used only for this instance of the transactional campaign.

Parameters

string key Your API key - used to authenticate your account
int campaignId The campaign you wish to send
struct contact The contact you wish to send this transactional campaign to
contact is a struct, which can contain:
- email => value
- customFieldToken => value
- customFieldId => value

A contact must have a valid email

Ex:
contact = {"email":"test@mail2.com", "first_name":"Test", "last_name":"User"}
contact = {"email":"support@mail2.com", 1:"Support", 2:"User"}
string source A short description of the source of your contact
struct replacements Token replacement values to be swapped in the message body

Return

mixed Returns true on success, returns a struct on failure
 

Still need help? Contact Us Contact Us