1

I have created a Triggered Data Extension to use with a TriggeredSendDefinition. The Data Extension does not have any primary keys set but does include SubscriberKey & EmailAdress (it was created using a TSD Template). I have added quotationId and partNumber as fields within the Data Extension with the intention of allowing multiple parts to be added to any given quotationId.

Over time an Email Address may submit more than 1 quotation, so the quotationId field will determine which quotation the parts were requested from.

With the email content I have AMPScript which currently is using a profile attribute to store the quotationId which works fine but it will mean that using the API once the quotation form on the website is completed, the subscriber will have to be created and the profile attributed updated before the triggeredsenddefinition can be called.

Is there a way of calling the TriggeredSendDefinition and passing through a temporary variable 'quotationId' that doesn't have to be stored as a profile attribute or as a data extension, but can be accessed in the content of the email using AMPScript? That way the email can access only the relevant data extension rows that relate to the most recent quotation, rather than everything linked to that subscriber key.

Thanks in adance Regards Jon

3
  • Which technology are you using for your API call? REST? SOAP?
    – Timothy
    Commented May 14, 2014 at 19:49
  • Hi Jon - welcome to SFSE! Commented May 14, 2014 at 20:14
  • @Timothy - I need to find this out from the developer, I am just looking after the front-end ie setting up the TriggeredSendDefinition / Data Extensions & HTML Content of the emails including any AMPScript required. Commented May 15, 2014 at 8:04

1 Answer 1

2

If I am understanding correctly you should just populate the new row in your triggered DE with the quotationId you want to reference in the email content.

If you are deploying to a Data Extension (such as your triggered DE) ET will attempt to set a variable from the sendable DE first. If the DE field is blank, ET will attempt to pull it out of the Profile Attribute if there is a Profile Attribute with the same name.

So all you should need to do is:

set @quotationId = quotationId

It should pull the value out of the row you just inserted in your Triggered DE and not the Profile Attribute, as long as there is a value in the triggered DE for quotationId.

2
  • Thanks Jsakas. The part I'm not understanding is how the email content can be set to ensure it's looking at the most recent quotationId for a given SubscriberKey. Do you have to iterate through the records that match the SubscriberKey first to find out what the MAX(quotationID) is? I've assumed that the developer will need to add the data to the Data Extensions first and then call the Triggered Send Definition separately. If that's not the case that could be where I'm going wrong! Commented May 15, 2014 at 8:21
  • 1
    When you make the API call to send a TriggeredSend, you specify the values to be inserted into your Triggered Data Extension. Once you make that call ET takes care of the rest - it will insert the data into the DE and then send the triggered message based on that data. If you have multiple triggered emails to the same Subscriber Key, you do not have to loop through the data extension to get the correct values. The AMPscript in your content will pull the value out of the current row being sent to. Even if you are sending many emails over a short timeframe.
    – Jon Sakas
    Commented May 15, 2014 at 16:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .