Create an order confirmation email
The story
Luma is launching their online store and want to ensure a good customer experience. They are providing an order confirmation email once a customer has placed an order.
Your challenge
Create a journey that sends an order confirmation email when a Luma customer completes an online order.
-
Create a journey called
Luma - Order Confirmation
. -
Use the event:
LumaOnlinePurchase
. -
Create a transactional email called
Luma - Order Confirmation
.-
The subject line “Thank you for your purchase,
FirstName
” -
Use the
Luma - Order summary
template and modify it:-
Remove the
You may also like
sections -
Add the unsubscribe link at the bottom of the email
-
-
The email should be structured as follows:
table 0-row-2 1-row-2 2-row-2 3-row-2 html-authored no-header | |
---|---|
Header section |
|
Order confirmation section |
Text Hey {firstName}, Your order has been placed. Once your package ships, we will send you an email with a tracking number so you can track your order. |
Ship to section
|
Ship to: {firstName} {lastName} |
Order details section
|
Header Order: {purchaseOrderNumber} List of products that were ordered: List each product in the order with an image, the price, and the name. The layout of each item should look like this: Add the link to the cart Replace the order ID in the URL with the purchase order number: https://luma.enablementadobe.com/content/luma/us/en/user/account/order-history/order-details.html?orderId=90845952-c2ea-4872-8466-5289183e4607 |
note tip |
---|
TIP |
To allow you to troubleshoot your journeys, best practice is to add an alternative path to all message actions if there is a timeout or error. |
Trigger the Journey that you created in test mode and send the email to yourself:
-
Before you switch to test mode, override the email parameters to send to the test email to your email address:
- Open the email details view.
- In the Email parameters section, click on the T symbol (enable parameter override
- Click into the Address field
- On the next screen add your email address in parentheses: “yourname@yourdomain” in the expression editor and click ok.
-
Put the journey into test mode
-
Trigger the event with the following parameters:
- Set the profile identifier to: Identity value:
a8f14eab3b483c2b96171b575ecd90b1
- Event Type: commerce.purchases
Quantity
: 1Price Total:
69Purchase Order Number:
90845952-c2ea-4872-8466-5289183e4607SKU:
LLMH09City:
San JosePostal Code:
95119State
: CAStreet:
245 Park Avenue
- Set the profile identifier to: Identity value:
You should receive the personalized purchase confirmation email.
-
The subject line should have the test profile’s first name: Leora
-
This is what your email body should look like:
Journey
Subject line:
Thank you for your purchase, {{ profile.person.name.firstName }}
!
Ship to section:
This is what your code should look like:
code language-javascript |
---|
|
event.45481416 is a different number for you.
TIP: Personalize each line separately
Order detail section:
This is what your code should look like:
Header:
code language-javascript |
---|
|
List of products:
Use the helper function “each” to create the list of products. Display them in a table. This is what your code should look like (with your specific variables such as your event ID - instead of 454181416
and your Organization I instead of techmarketingdemos
):
code language-javascript |
---|
|
View order button:
https://luma.enablementadobe.com/content/luma/us/en/user/account/order-history/order-details.html?orderId={{context.journey.events.454181416.commerce.order.purchaseOrderNumber}}
Price total:
Total:${{context.journey.events.1627840522.commerce.order.priceTotal}}.00