Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@zuzannamj
Created December 2, 2019 10:48
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 zuzannamj/af2138cbae7585d29cca78e7befe7fe5 to your computer and use it in GitHub Desktop.
Save zuzannamj/af2138cbae7585d29cca78e7befe7fe5 to your computer and use it in GitHub Desktop.
Dear Customer,<br>
Here are the details of your order:<br>
<script runat="server">
Platform.Load("core","1");
var custId = "0031t000005D98UAAS"
var OrdersDE = DataExtension.Init("Orders");
var rows = OrdersDE.Rows.Lookup(["CustomerId"], [custId]);
if(rows.length >= 1) {
for (i = 0; i < rows.length; i++) {
OrderItem = rows[i]["OrderItem"];
Write("&#8226; OrderItem " + i + ":" + OrderItem + "<br>");
}
}
else {
Write("No items to display");
}
</script>
<br>
We hope to see you again soon!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment