Skip to content

Instantly share code, notes, and snippets.

@wvpv
Created December 11, 2015 17:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wvpv/62e96a54dd25eb259f6a to your computer and use it in GitHub Desktop.
Save wvpv/62e96a54dd25eb259f6a to your computer and use it in GitHub Desktop.
SFMC Retrieve TriggeredSendDefinition
%%[
var @ret, @filter, @status, @rr
Set @ret = CreateObject("RetrieveRequest")
SetObjectProperty(@ret,"ObjectType","TriggeredSendDefinition")
AddObjectArrayItem(@ret,"Properties","Name")
Set @filter = CreateObject("SimpleFilterPart")
SetObjectProperty(@filter,"Property","CustomerKey")
SetObjectProperty(@filter,"SimpleOperator","equals")
AddObjectArrayItem(@filter,"Value","TSDCUSTOMERKEY")
SetObjectProperty(@ret,"Filter",@filter)
Set @rr = InvokeRetrieve(@ret, @status)
IF rowcount(@rr) > 0 THEN
Set @row = row(@rr, 1)
Set @TSDName = field(@row,"Name")
OutputLine(concat("TSDName: ",@TSDName))
EndIf
]%%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment