Predictive Intelligenc DW
Predictive Intelligenc DW
Predictive Intelligenc DW
Predictive Intelligence:
Predictive Recommendations and
Predictive Email
Enablement Guide
Predictive
Merchandising
and
Predictive
Email
Enablement
Guide
2
Predictive
Merchandising
and
Predictive
Email
Enablement
Guide
3
Predictive
Merchandising
and
Predictive
Email
Enablement
Guide
4
1 Introduction
Predictive
Intelligence
(PI)
is
a
Demandware
technology
offering,
which
provides
personalized
product
recommendations
to
the
Digital
Center
(DC)
storefront
and
for
merchant
targeted
emails.
The
PI
engine
consumes
customer
order
history,
product
catalog
information,
and
click
stream
data
as
input
and
applies
machine
learning
algorithms
that
result
in
dynamic
recommendations
for
shoppers.
These
recommendations
are
augmented
by
custom
configured
rules
setup
by
merchants.
PI
includes
the
following
key
functions.
Predictive
Email
Predictive
Email
personalizes
a
merchant’s
email
campaign
with
recommended
products.
• Predictive
Email
recommendations
easily
integrate
into
the
merchant’s
email
campaign’s
HTML
templates.
Predictive
Merchandising
and
Predictive
Email
Enablement
Guide
5
Predictive
Merchandising
and
Predictive
Email
Enablement
Guide
6
2.1 QuickStart
The
following
instructions
provide
a
quickstart
for
the
developer
to
enable
predictive
recommendations
in
a
SiteGenesis
implementation.
For
demonstration
purposes,
it
uses
the
Predictive
Merchandising
and
Predictive
Email
Enablement
Guide
7
“recently–viewed”
recommender
rule.
This
recommender
rule
is
configured
to
serve
the
most
recently
viewed
products.
Assumptions
• Data
enablement
for
the
PI
engine
has
been
completed.
• Demandware
DII
team
has
turned
on
the
PI
recommendations
services
for
the
configured
site.
• Recommender
rule
for
“recently–viewed”
is
listed
in
the
slot
content
in
Business
Manager
in
the
recommender
property
dropdown.
Basic
Steps
1. Place
the
recommendation
slots
on
your
storefront’s
PDP
template.
The
location
of
this
template
in
the
SiteGenesis
reference
app:
/app_storefront_core/cartridge/templates/default/product/productdetail.isml
• The
slot
must
be
given
a
unique
ID
that
identifies
the
slot
in
Business
Manager.
See
ISSLOT
“pdp-‐
recommendation”
setup
in
this
sample
PDP
template
source
code.
• Ensure
the
context
attribute
is
set
appropriately
with
values:
global
or
category.
Note:
The
context
value
global
in
the
slot
configured
above
• Ensure
that
for
anchor-‐based
slots,
a
reference
to
the
anchor
products
id
is
set
as
part
of
the
context-‐object
attribute.
The
following
are
examples
of
an
anchor
based
slot
tag
placed
on
a
page
template
that
would
render
a
recommendation
slot.
2. Design and develop a slot rendering template to render the recommended products.
Predictive
Merchandising
and
Predictive
Email
Enablement
Guide
8
The
following
example
rendering
template
can
be
used
to
serve
product
recommendations.
SiteGenesis
contains
an
out-‐of-‐the
box
template
to
render
the
slot
content
for
recommendations.
This
template
can
be
used
as
a
starting
point.
Note:
Additional
coding
is
required
for
complex
controls
like
sliders,
carousels
etc.
Ensure
that
any
additional
JavaScript
code
gets
placed
inside
the
template.
Template
Location:
/app_storefront_core/cartridge/templates/default/slots/recommendation/product_1x4_recomm.isml
3. Ensure
the
sub
pipeline
(Product-‐HitTile)
is
available
in
the
product
pipeline.
Note:
Older
releases
of
the
SiteGenesis
reference
cartridge
may
not
have
this
to
support
the
include
in
the
code
from
the
previous
step.
Predictive
Merchandising
and
Predictive
Email
Enablement
Guide
9
4. If
applicable,
copy
the
new
slot
template
to
the
following
folder:
/templates/default/slots/recommendation/
5. In
Business
Manager
(Merchant
Tools
>
Online
Marketing
>
Content
Slots),
in
the
Slot
Content
section
configure
the
content
slot
using
the
following
properties:
• Content
Type:
Recommendation
• Recommender:
recently-‐viewed(Shopper,Recently-‐Viewed)
• Template:
Select
the
applicable
rendering
template.
Predictive
Merchandising
and
Predictive
Email
Enablement
Guide
10
NOTE:
If
the
recommender
rules
are
visible
in
Business
Manager,
it
is
a
good
indicator
that
the
configuration
between
the
Demandware
Storefront
and
PI
engine
is
working,
as
the
rules
(configured
at
the
PI
configurator)
are
pulled
into
the
dropdown
menu
as
shown
in
the
next
step.
6. On
the
SiteGenesis
storefront,
visit
several
of
product
pages.
The
recently
viewed
products
will
display
below
the
product
details
section
in
the
product
detail
page,
as
shown.
Predictive
Merchandising
and
Predictive
Email
Enablement
Guide
11
Predictive
Merchandising
and
Predictive
Email
Enablement
Guide
12
Here
is
a
high
level
overview
of
the
data
flow
between
various
systems
from
Demandware
storefront
perspective.
Predictive
Merchandising
and
Predictive
Email
Enablement
Guide
13
PRODUCT_DESCRIPTION
Localized
short
description
(if
it
exists)
otherwise
it
is
the
localized
long
description.
Tabs
and
new
lines
will
be
escaped
with
spaces.
Note:
A
variation
product
might
not
have
a
description.
In
such
a
case,
its
master
product
is
used
to
compute
the
description.
CUSTOM_ATTRIBUTE1
The
variation
attribute
or
custom
attribute
representing
specified
attribute
id.
The
attribute
id
CUSTOM_ATTRIBUTE2
is
first
used
to
check
variation
attribute,
if
not
satisfied
then
custom
attribute.
CUSTOM_ATTRIBUTE3
CUSTOM_ATTRIBUTE4
CUSTOM_ATTRIBUTE5
To
configure
the
Catalog
Feed
for
PI
Predictive
Merchandising
and
Predictive
Email
Enablement
Guide
14
1. In
Business
Manager,
select
Navigate
to
Administration
>
Operations
>
Predictive
Intelligence
Configurations
>
Catalog
Feeds.
2. Enable
the
job.
3. Schedule
it
to
run
once
daily
during
off-‐peak
hours
after
the
regular
catalog
replications
for
the
day.
4. Set
job
schedule
to
start
time.
5. Update
the
host
and
image
type
fields.
2.2.1.2 Order
History
Feed
A
nightly
batch
job
transmits
order
history
data
to
the
PI
engine.
This
information
is
used
to
train
the
machine
learning
algorithms
and
is
also
used
for
reporting.
Some
Demandware
customers
may
need
to
send
order
history
data
to
the
PI
engine
from
outside
the
Demandware
environment
for
two
possible
reasons:
• Customers
with
retail
stores
want
the
PI
engine
to
utilize
transaction
data
from
the
stores.
• Customers
who
are
not
live
on
the
Demandware
platform
may
want
to
go-‐live
with
good
recommendations.
To
accomplish
this,
they
need
to
send
order
history
data
from
their
internal
or
legacy
systems.
To
accommodate
this
need,
the
merchant
must
create
a
feed
that
meets
the
following
specification
to
load
the
data
into
the
PI
engine.
File
Metadata
File
Characteristic
Value
Predictive
Merchandising
and
Predictive
Email
Enablement
Guide
15
Data
Records
Field
Field
Name
Data
Type
Max
Required
Details
Number
Length
1
TRANSACTION_KEY
String
Y
For
Store
orders,
this
can
be
Store
+
Trans
Date
+
Register
+
Trans
Num
2
TRANSACTION_DATE
datetime
8
Y
YYYYMMDD
3
* String
See
important
notes
CUSTOMER_KEY
4
*
String
Y
See
important
notes
CUSTOMER_EMAIL
5
* String
Y
See
important
notes
BUYER_EMAIL
6
**
String
Y
SKU-‐level
product
identifier
PRODUCT_KEY
7
**
String
Y
If
the
line-‐item
is
a
simple
product,
this
MASTER_PRODUCT_KEY
a
copy
of
field
#6
If
the
line-‐item
is
a
variant
of
a
master
product,
this
should
be
the
PRODUCT_KEY
of
the
master
product
8
NET_SALES_UNITS
Number
N
9
NET_SALES_AMT
Number
N
10
GROSS_SALES_AMT
Number
N
11
RETURN_FLAG
String
1
N
0-‐1
binary
flag
Important
*
At
least
one
of
these
three
fields
must
be
populated.
Wherever
possible,
please
include
email
addresses.
Please
exclude
anonymous
transactions
from
the
feed.
Predictive
Merchandising
and
Predictive
Email
Enablement
Guide
16
**
These
keys
MUST
match
the
product
keys
in
the
merchant’s
Demandware
catalog.
Configure
the
feed:
In
Business
Manager,
select
Administration
>
Operations
!
Predictive
Intelligence
Configurations
!
Order
Feeds.
Enable
two
jobs
in
two
days,
based
on
the
order
history
scenario:
1. Run
one-‐time
export
of
order
history
(Day
1).
2. After
a
successful
(one
time)
historical
export,
schedule
the
order
feed
to
run
once
daily
during
off-‐
peak
hours
(Day
2).
Recommendation:
set
the
Max
Order
Value
to
10,000
2.2.1.3 Clickstream
Data
Click
stream
data
gets
transmitted
to
Demandware
PI
engine
using
real-‐time
click
tracking.
It
tracks
relevant
visitor
activities
on
a
merchant’s
storefront
using
a
specialized
page-‐tagging
library.
Demandware
automatically
injects
these
supported
tags
into
pages
of
merchant’s
storefront.
• Product
View
-‐
logs
viewProduct
event
whenever
a
user
views
a
product.
• Add
To
Cart
–
logs
addToCart
even
whenever
a
user
adds
a
product
to
their
cart.
• Finish
Checkout
–
logs
finishCheckout
even
whenever
a
user
completes
checkout.
• View
Recommendation
–
logs
viewReco
event
whenever
a
user
views
a
recommendation
Predictive
Merchandising
and
Predictive
Email
Enablement
Guide
17
• Click Recommendation – logs clickReco event whenever a user clicks on a recommended product
For
existing
customers,
allow
5-‐7
business
days
for
the
setup
and
validation
process.
For
a
new
customer,
it
can
take
up
to
one
month
of
continuous
feeds
to
generate
relevant
product
recommendations.
The
PI
engine
also
processes
the
click
stream
data.
To
create
a
content
slot,
first
use
the
<isslot>
tag
on
a
page
template
that
would
render
a
slot.
The
slot
must
have
a
unique
ID
that
will
identify
the
slot
in
Business
Manager.
If
this
content
slot
is
used
to
render
anchor
based
recommendations
(such
as
recommendations
shown
on
a
product
detail
page
or
a
category-‐landing
page),
you
must
include
a
reference
to
the
anchor
products
ID
as
part
of
the
context-‐
object
attribute.
Predictive
Merchandising
and
Predictive
Email
Enablement
Guide
18
Predictive
Merchandising
and
Predictive
Email
Enablement
Guide
19
These
rules
are
called
Recommenders.
There
are
some
of
the
pre-‐defined
recommender
rules:
• Products
in
Category
• Products
in
all
Categories
• Recently
Viewed
• Product
to
Product
You
can
also
create
a
custom
recommendation
slot
rendering
template
(depending
upon
the
merchant’s
business
requirements:
and
copy
it
to
the
/templates/default/slots/recommendation/
folder.
Predictive
Merchandising
and
Predictive
Email
Enablement
Guide
20
2.4.4 Chrome
Browser
Extension
You
can
validate
and
troubleshoot
the
triggered
click
stream
activities
like
clickReco,
viewReco
and
viewProduct,
by
adding
an
extension
to
the
Chrome
browser.
Use
the
steps
outlined
here:
https://xchange.demandware.com/docs/DOC-‐30959
Predictive
Merchandising
and
Predictive
Email
Enablement
Guide
21
Activities
Tab
clickReco
tracking
code
after
clicking
a
recommended
item
from
the
slot.
Predictive
Merchandising
and
Predictive
Email
Enablement
Guide
22
Recommendations tab will show the recommender rule recently-‐viewed used for this slot.
Predictive
Merchandising
and
Predictive
Email
Enablement
Guide
23
Phase
1
• Product
Detail
–
Create
one
global
content
slot
below
the
products
core
calls
to
action
(This
is
client
specific).
• Footer
–
Create
a
global
footer
slot.
This
could
also
be
used
later
for
recently
purchased
or
replenishment
recommendations.
• Let
these
locations
run
for
a
period
of
time
before
making
any
adjustments.
Phase
2
• Begin
to
create
your
own
recommendation
rules.
• Category
Grid
–
Create
1
global
content
slot
at
the
top
of
the
page
(Client
specific
strategy
on
what
push
to
that
zone).
• Recommender
types
are
dependent
upon
the
slot’s
page
context.
Target
a
couple
placements
and
recommendation
types
as
shown.
Products-‐in-‐all-‐
ISSlot
Product-‐to-‐ Products-‐in-‐ Recently-‐viewed
(No
Isslot
Storefront
Page
categories
(No
Isslot
Context
product
a-‐category
Required)
Required)
Global
Homepage
x
X
Global
Category
Landing
Page
x
X
Categor
Category
Landing
Page
x
X
y
Predictive
Merchandising
and
Predictive
Email
Enablement
Guide
24
Global
PDP
X
X
Global
Cart
X
X
Global
Wishlist
X
X
Global
Checkout
X
X
Global
My
Account
x
X
Global
My
Recommendations
x
X
Global
404
Error
x
X
Predictive
Merchandising
and
Predictive
Email
Enablement
Guide
25
• Avoid
using
long
scrollers
(or
carousels).
Recommendations
are
not
intended
to
drive
users
out
of
their
existing
experience
and
elongates
the
purchase
path
unnecessarily.
Three
to
four
products
in
a
recommendation
are
sufficient.
Predictive
Merchandising
and
Predictive
Email
Enablement
Guide
26
3 Predictive
Email
Predictive
Email
personalizes
merchant’s
campaign
emails
with
relevant
products.
It
leverages
the
PI
Engine
to
combine
order
data,
catalog
data,
and
click
stream
data
to
dynamically
determine
and
promote
personalized
products
to
shoppers.
Predictive
Merchandising
and
Predictive
Email
Enablement
Guide
27
Enablement
Process:
Predictive
Merchandising
and
Predictive
Email
Enablement
Guide
28
Predictive
Merchandising
and
Predictive
Email
Enablement
Guide
29
6. Add
the
HTML
in
a
tabular
format
in
the
email
template
generates
the
recommendations
in
a
grid
format.
Below
is
a
sample
HTML
to
implement
the
recommendations
in
Email.
Predictive
Merchandising
and
Predictive
Email
Enablement
Guide
30
When
this
code
is
inserted
in
the
email
template,
it
creates
the
recommendation
slot
as
shown:
Predictive
Merchandising
and
Predictive
Email
Enablement
Guide
31
3.2.2 Captions
Captions
make
up
the
text
information
of
your
email
recommendations.
This
ensures
a
consistent
experience
for
customers
and
leverages
existing
catalog
product
attributes
such
as:
• Brand
• Product
Name
• Price
Styling
and
Font
Sizes
are
configurable.
Segmentation
is
not
required
and
if
attempted
will
hinder
the
performance
and
revenue
generation
of
the
predictive
email
recommendations.
The
predictive
engine
performs
best,
when
the
recommendations
generated
are
not
manipulated
through
different
rules.
However,
there
can
be
certain
products
that
you
do
not
want
to
display
as
a
recommendation.
Predictive
Merchandising
and
Predictive
Email
Enablement
Guide
32
Predictive
Merchandising
and
Predictive
Email
Enablement
Guide
33
4 Glossary
Term
Definition
Predictive
Digital
Center
functionality
that
provides
personalized
and
dynamic
product
Intelligence
(PI)
recommendations
Predictive
PI
engine
based
feature
that
serves
product
recommendations
to
Store
front
Merchandising
Predictive
Email
PI
engine
based
feature
that
personalizes
email
messages
to
promote
products,
offers
and
content.
Predictive
Personalized
products
recommendations
served
by
PI
Engine
Recommendation
PI
Engine
Internal
service
that
analyzes
the
order,
catalog
and
click
stream
activity
data.
PI
Configurator
Online
tool
that
enables
the
Merchant
to
configure
rules
on
top
of
the
Predictive
Engine
by
publishing
recommenders
available
for
insertion
into
the
Recommendation
content
slot
type
viewProduct
Event
whenever
a
user
views
a
product
viewReco
Event
whenever
a
user
views
a
recommendation
clickReco
Event
whenever
a
user
clicks
a
recommendation
product
tile
finishCheckout
Event
when
a
user
completes
a
checkout
addToCart
Event
when
user
adds
a
product
to
their
cart
anonymous
Transactions
by
an
un-‐registered
customer
transactions
warming
Period
Waiting
Period
during
data
enablement
process
before
the
PI
product
recommendations
are
turned
on
served
to
storefront
DII
Data
Intelligence
and
Insights
Product-‐to-‐product
Customizable
recommender
type
that
given
a
product,
recommends
similar/related
affinity
products.
References
Product
Anchor
on
page.
Products-‐in-‐a-‐ Customizable
recommender
type
that
given
a
category,
recommends
products
category
from
within
that
category.
References
a
Category
Anchor
on
page.
Products-‐in-‐all-‐ Customizable
recommender
type
that
recommends
products
from
across
all
categories
categories.
No
Anchor
Required
Recently-‐viewed
Customizable
recommender
type
that
shows
products
recently
viewed
by
the
shopper.
No
Anchor
Required
Deep
affinity
Recommender
strategy
that
uses
model-‐generated
affinity
recommendations
algorithm
(batch)
Customers
who
Recommender
strategy
that
leverages
view
to
view
correlations
Predictive
Merchandising
and
Predictive
Email
Enablement
Guide
34