Retrieves recipient information for the specified target name. You can determine the recipient category (PERSON, DEVICE, or GROUP), using the Recipient script object’s getRecipientCategory method, and then use the methods and variable specific to that type.
@interaction::getRecipient(String targetName)
(String) targetName: target recipient
(script object) @recipient
In the following example, the getRecipient method is used in an Interaction object, followed by a determination of the recipient category. If the recipient type is a Device, the Device’s address is recorded to a log file:
@recipient = @interaction::getRecipient($content.recipient_target)
$category = @recipient::getRecipientCategory()
if($category == "DEVICE")
@script::log($recipient.address)
endif