A design defines how recommendations appear on a page.
You can create a Recommendations design using a default design or by creating a custom design. The Recommendations > Designs screen displays both default design cards and any designs that have been created in your account.
Keep the following information in mind as you work with designs:
This illustration shows the default 1 x 4 design:
This illustration shows a custom design:
You can create a design during the activity-creation process from within the Visual Experience Composer (VEC) or from the design library outside of activity creation. The following sections assume you are creating designs from the library, but the steps are similar.
You can create a design based on a default design or you can create a custom design.
Click Recommendations > Designs to display the Designs library.
Click the More Actions icon ( ) for the design you want to create, then click Copy.
The Create Design dialog box displays.
Type a ** Name** and an optional preview image to display on the design card.
When you use a default design, the design name and “Copy” appears in the Content Name field. You can edit the name. You can also select an image to display on the design card.
(Conditional) Edit the design Code, as desired.
Recommendation designs use the open-source Velocity design language. Information about Velocity can be found at https://velocity.apache.org and in Customize a design using Velocity.
A design can be HTML or non-HTML. By default, HTML designs are wrapped with a <div>
tag to allow for click-tracking in a Web environment. Non-HTML designs are for non-Web environments where click-tracking is not possible. Slide the HTML Design toggle to the “off” position to use non-HTML code.
The maximum number of entities that can be referenced in a design, either hard-coded or via loops, is 99.
Click Create.
Click Recommendations > Designs to display the Designs library.
Click Create Design.
If you want to base your new custom design on an existing design, click the More Actions icon ( ) for the design you want to create, then click Copy. You can then edit the copy to create a new custom design.
Add a Name and an optional preview image.
(Conditional) Edit the design Code, as desired.
Refer to the information in Step 4 above for more information.
Click Create.
Remember that you cannot edit or copy a default design; you can only copy default designs.
Click the More Actions icon ( ) for the design you want to edit or delete, then click the appropriate icon: Edit, Copy, or Delete.
You can copy an existing design to create a duplicate design that you can then modify. This process lets you create a similar design with less effort.
Be aware that designs are available across the entire account. Ensure that you consider the usage across accounts before deleting a design. Deleted designs cannot be recovered.
The following example shows how JSON responses can be returned when configuring an activity via the form-based editor.
Create a design from within the Design library or within the form-based workflow. If you attempt to do create a design inside the Visual Experience Composer (VEC) workflow you cannot create anything other than an HTML design, which is wrapped in a <div>
for click-tracking purposes.
Ensure that the “HTML Design” option is turned off:
The following code is an example of what you could paste into your design:
#*
* "Return a simple list of recommended entity ids"
*#
{
"notes":{
"purpose": "Return a simple list of recommended entity ids",
"use-case": "Use this approach if you prefer to do a real-time lookup of entity attribute details (such as inventory, price, rating) from another system (such as a CMS, PIM or ecommerce platform)",
"version": "01"
},
"recommendedItems": {
"key": "$key.id",
"slot-01": "$entity1.id",
"slot-02": "$entity2.id",
"slot-03": "$entity3.id",
"slot-04": "$entity4.id",
"slot-05": "$entity5.id",
"slot-06": "$entity6.id",
"slot-07": "$entity7.id",
"slot-08": "$entity8.id",
"slot-09": "$entity9.id",
"slot-10": "$entity10.id"
}
}
Set up a form-based Recommendations activity that uses this design.
After your activity is set up and activated, you can set up a sample request to get back the clean JSON response.
From the time that you save your activity, Target needs to build a model to support the selected criteria configuration. Depending on a number of factors, this process could take some time. Results appear once the model has build.
For example:
https://[YOUR_CLIENT_CODE].tt.omtrdc.net/m2/YOUR_CLIENT_CODE/ubox/raw?mbox=[YOUR_MBOX_NAME]&mboxContentType=text/html&mboxXDomain=disabled&entity.id=[ENTITY_ID]&mboxHost=rawbox_sample&at_property=[AT_PROPERTY_TOKEN]&mboxNoRedirect=true&mboxPC=1234-4321&mboxSession=9876-7000
where
Parameter | Value |
---|---|
[YOUR_CLIENT_CODE] |
Target Client code (available on /help/target/products.html#recsSettings > Recommendations API Token > Client Code). |
[YOUR_MBOX_NAME] |
The name you’ve selected in the “locations” section of the form-based Recommendations, in this case Sample_Recs_Response. |
[ENTITY_ID |
The entity.id of an item in your catalog. |
[AT_PROPERTY_TOKEN] |
(Optional) Add if you’ve selected a Property (part of Enterprise Permissions) during your activity setup. |
After your algorithm has run, and you have results, your response should look something like this:
You can also send back a simple comma-delimited list of items by setting up a design with the following syntax:
entity1.id, $entity2.id, $entity3.id, $entity4.id, $entity5.id,
Alternatively, you can send additional information in the response. The following code file is a more complex example that returns much more than the entity ids with their associated slots (order). This design example also returns activity details, Target Profile details (as applicable), and other entity.attributes
associated with the items returned.
{
"adobeRecommendations": {
"notes": {
"purpose": "Return a list of entity ids with their associated entity.attributes",
"use-case": "Use this approach to avoid looking up attribute details after receiving a response from Target",
"version": "01"
},
"recommendedItems": {
"slot-01": "$entity1.id",
"slot-02": "$entity2.id",
"slot-03": "$entity3.id",
"slot-04": "$entity4.id",
"slot-05": "$entity5.id",
"slot-06": "$entity6.id",
"slot-07": "$entity7.id",
"slot-08": "$entity8.id",
"slot-09": "$entity9.id",
"slot-10": "$entity10.id"
},
"activityDetails": {
"mbox.name": "email-mbox",
"campaign.name": "\${campaign.name}",
"campaign.id": "\${campaign.id}",
"campaign.recipe.name": "\${campaign.recipe.name}",
"campaign.recipe.id": "\${campaign.recipe.id}",
"offer.name": "\${offer.name}",
"offer.id": "\${offer.id}",
"criteria.title": "$criteria.title",
"algorithm.name": "$algorithm.name",
"algorithm.dayCount": "$algorithm.dayCount"
},
"visitorProfile": {
"profile.favorite-category": "\${profile.favorite-category}",
"profile.test": "\${profile.test}",
"user.endpoint.lastPurchasedEntity": "\${user.endpoint.lastPurchasedEntity}",
"user.endpoint.lastViewedEntity": "\${user.endpoint.lastViewedEntity}",
"user.endpoint.mostViewedEntity": "\${user.endpoint.mostViewedEntity}",
"user.endpoint.categoryAffinity": "\${user.endpoint.categoryAffinity}",
"profile.geolocation.city": "\${profile.geolocation.city}",
"profile.geolocation.dma": "\${profile.geolocation.dma}",
"profile.geolocation.state": "\${profile.geolocation.state}",
"profile.geolocation.country": "\${profile.geolocation.country}",
"profile.sessionCount": "\${profile.sessionCount}",
"profile.averageDaysBetweenVisits": "\${profile.averageDaysBetweenVisits}",
"profile.browserTime": "\${profile.browserTime}",
"user.activeActivities": "\${user.activeActivities}",
"user.pcId": "\${user.pcId}",
"user.isFirstSession": "\${user.isFirstSession}",
"user.isNewSession": "\${user.isNewSession}",
"user.header": "\${user.header}",
"user.parameter": "\${user.parameter}"
},
"recKey": {
"recKeyDetails": {
"id": "$key.id",
"name": "$key.name",
"category": "$key.category",
"pageUrl": "$key.pageUrl",
"thumbnailUrl": "$key.thumbnailUrl"
}
},
"recDetailedResults": {
"recEntity1Details": {
"id": "$entity1.id",
"name": "$entity1.name",
"category": "$entity1.category",
"pageUrl": "$entity1.pageUrl",
"thumbnailUrl": "$entity1.thumbnailUrl"
},
"recEntity2Details": {
"id": "$entity2.id",
"name": "$entity2.name",
"category": "$entity2.category",
"pageUrl": "$entity2.pageUrl",
"thumbnailUrl": "$entity2.thumbnailUrl"
},
"recEntity3Details": {
"id": "$entity3.id",
"name": "$entity3.name",
"category": "$entity3.category",
"pageUrl": "$entity3.pageUrl",
"thumbnailUrl": "$entity3.thumbnailUrl"
},
"recEntity4Details": {
"id": "$entity4.id",
"name": "$entity4.name",
"category": "$entity4.category",
"pageUrl": "$entity4.pageUrl",
"thumbnailUrl": "$entity4.thumbnailUrl"
},
"recEntity5Details": {
"id": "$entity5.id",
"name": "$entity5.name",
"category": "$entity5.category",
"pageUrl": "$entity5.pageUrl",
"thumbnailUrl": "$entity5.thumbnailUrl"
},
"recEntity6Details": {
"id": "$entity6.id",
"name": "$entity6.name",
"category": "$entity6.category",
"pageUrl": "$entity6.pageUrl",
"thumbnailUrl": "$entity6.thumbnailUrl"
},
"recEntity7Details": {
"id": "$entity7.id",
"name": "$entity7.name",
"category": "$entity7.category",
"pageUrl": "$entity7.pageUrl",
"thumbnailUrl": "$entity7.thumbnailUrl"
},
"recEntity8Details": {
"id": "$entity8.id",
"name": "$entity8.name",
"category": "$entity8.category",
"pageUrl": "$entity8.pageUrl",
"thumbnailUrl": "$entity8.thumbnailUrl"
},
"recEntity9Details": {
"id": "$entity9.id",
"name": "$entity9.name",
"category": "$entity9.category",
"pageUrl": "$entity9.pageUrl",
"thumbnailUrl": "$entity9.thumbnailUrl"
},
"recEntity10Details": {
"id": "$entity10.id",
"name": "$entity10.name",
"category": "$entity10.category",
"pageUrl": "$entity10.pageUrl",
"thumbnailUrl": "$entity10.thumbnailUrl"
}
}
}
}
This video contains the following information: