Skip to content

Instantly share code, notes, and snippets.

@wvpv
Created December 11, 2015 17:27
Show Gist options
  • Save wvpv/477907a0dc267640f006 to your computer and use it in GitHub Desktop.
Save wvpv/477907a0dc267640f006 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