This page was last edited on March 9, 2015, at 16:48.
Comments or questions about this documentation? Contact us for support!
This topic describes several ways to get the e-mail address of a customer using Context Services blocks and using it in the To property of the Create Email block.
There are two ways to get a customer's e-mail address from the Context Services server:
With the default Context Services schema, EmailAddress is a field of the customer profile. The CustomerData content sample:
{"EmailAddress":"Roger.Rosen@genesyslab.com","FirstName":"Roger","PhoneNumber":["+1.219.12345678","+1.832.67890123"],"LastName":" Rosen ","customer_id":"00001a5GD0A80040"}
In the Create Email block, when defining the To property, select the Type as Variable and select the variable that was previously used to save the e-mail address (data.EmailAddress) from above.
With the Variables Mapping feature, getting an e-mail address is easy. When Customer ID is unknown:
When Customer ID is known:
No additional ECMAScript block is needed. The "EmailAddress" variable will automatically be assigned the customer's email address.