Example of External Merge Fields

You can create category template text that contains external merge fields, as in:

Thank you for choosing us as your hat supply company.

To confirm your order:

   Order ID: <merge URL="http://www.company.com/getorderinfo.asp?which=id&messageid=&lt;merge name=&quot;Message ID&quot;/&gt;"/>

   Number of hats ordered: <merge URL="http://www.company.com/getorderinfo.asp?which=count&messageid=&lt;merge name=&quot;Message ID&quot;/&gt;"/>

   Price: <merge URL="http://www.company.com/getorderinfo.asp?which=price&messageid=&lt;merge name=&quot;Message ID&quot;/&gt;"/>

The external merge fields in this example would be populated with data pulled from the URLs specified, so that the message to the customer might look like this:

Thank you for choosing us as your hat supply company.

To confirm your order:

Order ID: A165E72R

Number of hats ordered: 10

Price: $92.99

The file from which the data is pulled might look like this:

<%@LANGUAGE='JavaScript'%>

<%

Response.ContentType = "text/plain";

var gMessageID = Request("messageid").Item;

var orderProcessor = Session("Order Processor");

var order = orderProcessor.getOrder(gMessageID);

 

if (Request("which") == "id")

{

Response.Write(order.getID());

}

else if (Request("which") == "count")

{

Response.Write(order.getCount());

}

else if (Request("which") == "price")

{

Response.Write(order.getPrice());

}

else

{

Response.Write("Order ID: " + order.getID());

Response.Write("Number Ordered: " + order.getCount());

Response.Write("Price: " + order.getPrice());

}

%>

A more efficient way to do this is to use a single external merge field to pull an entire customized template into the e-mail message:

Thank you for choosing us as your hat supply company.

To confirm your order:

             <merge URL="http://www.company.com/getorderinfo.asp? messageid=&lt;merge name=&quot;Message ID&quot;/&gt;"/>


Learn about external merge fields.

How do I add merge fields?

How do I insert a merge field?

Learn about custom fields.