Introducing
Your new presentation assistant.
Refine, enhance, and tailor your content, source relevant images, and edit visuals quicker than ever before.
Trending searches
REWRITE!
Example
$clientData['email'] = "micah.breedlove@gmail.com";
$client = new EtClient($etUname, $etPass);
// all subscribers require the following 2 points of data
// Email Address and Subscriber key
$subscriberInfo = array(
array(
'Name' => 'EmailAddress',
'Value' => $clientData['email'],
'operator' => 'equals'
),
array(
'Name' => 'SubscriberKey',
'Value' => $clientData['email'],
'operator' => 'equals'
),
);
// Check to see if subscriber exists -if it does returns object if not create it
if (!($subscriber = $client->recallSubscriber($subscriberInfo))) {
$subscriber = $client->createSubscriber(array(
'EmailAddress' => $clientData['email'],
'SubscriberKey' => $clientData['email']
));
}
What if we make the classes a little more manageable?
$client = new EtClient($etUname, $etPass);
// Create New Triggered Send object ExternalKey
$ts = $client->buildTriggeredSend('mobilesubscriber');
// Assume we already have a subscriber object as $subscriber
// Setting an Exact Target Attribute
$etMblId = new EtAttribute();
$etMblId->setName('Mobile ID');
$etMblId->setValue($mblId);
// Setting attribute to Subscriber
$subscriber->setAttributes(array($etMblId));
// update that Subscriber
$client->updateSubscriber($subscriber, 'updateOnly');
// Define the Subsriber (or list using setList() ) for the TriggeredSend object
$ts->setSubscribers(array($subscriber));
// boolean value
$emailSent = $client->sendEmail($ts, 'TriggeredSend');
Passing the EtClient to these classes gives
added functionality
Attributes to about Subscribers
Simple functionality:
Set on instantiation:
new EtAttribute("ip-addr", "127.0.0.1");
Manage Body content, Name, folder,
active status and more.
Functions:
Manage an Exact Target list from this class changing names, descriptions, subscribers and categories
Functions:
save()
* not a client-class
Manage aspects of a subscriber including unsubscribed status, email type preferences, lists and emails. Subscribers require the Email Address and Subscriber Key.
Functions Available:
Emails which can be executed when certain
conditions are met, or on-demand emails.
Functions:
useKey((String) $customerKey (array) $options)
send()
Interactive Marketing Tool for email
Consisting of:
Managed via Web Interface or SOAP calls
$emailAddy = 'micah.breedlove@gmail.com';
$client = new EtClient($etUname, $etPass);
// new subscriber object with the EtClient passed to it
$subscriber = new EtSubscriber($client);
//find by subscriberKey (which is email address)
$subscriber->find($emailAddy);
$etAttr = new EtAttribute("someRandomAttr", $attrValue);
// Attributes setters would also still work
// $etAttr->setName("someRandomAttr");
// $etAttr->setValue($attrValue);
// update the attribute on subscriber object
$subscriber->updateAttribute($etAttr);
// last but not least save
$subscriber->save();