salesforce-marketingcloud / FuelSDK-PHP

FuelSDK-PHP
MIT License
134 stars 142 forks source link

Triggered Send Attributes? #155

Closed akasophistikat closed 4 years ago

akasophistikat commented 4 years ago

Has anyone been able to send additional column data to your Triggered Send Data Extension ("TSDE")? My TSDE has 4 columns;

  1. SubscriberKey
  2. EmailAddress
  3. FirstName
  4. PromoCode

When sending the subscriber information, only the two default columns (SubscriberKey and EmailAddress) are updated. FirstName and PromoCode are ignored.

$sendTrigger->subscribers = array( array( "SubscriberKey" => $uniqid, "EmailAddress" => $email, "FirstName" => $firstname, "PromoCode" => $promo ) );

While doing some research I found this example using AMPscript, where FirstName and, what would be their PromoCode, are passed through an Attributes object. Was this missed, purposely omitted or should I be defining FirstName and PromoCode somewhere else?

akasophistikat commented 4 years ago

After links after links, here's how attributes are added:

$sendTrigger->subscribers = array( array( 'SubscriberKey' => $uniqid, 'EmailAddress' => $email, 'Attributes' => array( array('Name' => 'FirstName', 'Value' => $firstname'), array('Name' => 'PromoCode', 'Value' => $promo) ) )
);

I hope this helps someone in the future.