DocumentationTarget Developer Guide

Render experiences

Last update: October 2, 2023
  • Topics:
  • APIs/SDKs

CREATED FOR:

  • Experienced
  • Developer

Follow the steps in the Render Experiences diagram to ensure that all necessary tasks needed to render experiences are executed in the correct sequence.

NOTE
If you have enabled Automatic Page Load Request during the Configure Automatic Page Load Request step in Initialize SDKS , you can skip this activity unless you want to call the Adobe Target SDK to render additional experiences using a regional-location request.
TIP
Click the images in this topic to expand to full screen.

Render experiences diagram

Automatic out-of-the-box flicker handling available with at.js makes sense only when you have Automatic Page Load Request enabled. This option hides the entire HTML body while fetching the experiences from Target. In this case, it is your responsibility to handle flicker. Search for implementation patterns available for flicker handling for guidance.

NOTE
The step numbers in the following illustration correspond to the sections below. The step numbers are in no particular order and do not reflect the order of steps taken in the Target UI while creating the activity.

Render experiences diagram

Click the following links to navigate to the desired sections:

  • 3.1: Promotion
  • 3.2: Cart-based criteria
  • 3.3: Popularity-based criteria
  • 3.4: Item-based criteria
  • 3.5: User-based criteria
  • 3.6: Custom criteria
  • 3.7: Provide attributes used in inclusion rules
  • 3.8: Provide excludedIds
  • 3.9: Provide entity attributes to update the product catalog for Recommendations
  • 3.10: Provide profile attributes used as keys for inclusion rules
  • 3.11: Fire page-load request
  • 3.12: Fire regional location request

3.1: Promotion

Add promoted items and control their placement in your recommendations design by choosing Front or Back promotions in the Target UI while creating the activity.

See details

Available options

  • Promote by IDs
  • Promote by collection
  • Promote by attribute

Entity parameters required

  • Item attributes in promotions must be passed when using the “promote by attribute” option.

Readings

  • Add promotions

Return to the diagram at the top of this page.

3.2: Cart-based criteria

Make recommendations based on the user’s cart contents.

See details

Available criteria

  • People Who Viewed These, Viewed Those
  • People Who Viewed These, Bought Those
  • People Who Bought These, Bought Those

Entity parameters required

  • cartIds

Readings

  • Cart-based

Return to the diagram at the top of this page.

3.3: Popularity-based criteria

Make recommendations based on the overall popularity of an item across your site or based on the popularity of items within a visitor’s favorite or most-viewed category, brand, genre, and so forth.

See details

Available criteria

  • Most Viewed Across the Site
  • Most Viewed by Category
  • Most Viewed by Item Attribute
  • Top Sellers Across the Site
  • Top Sellers by Category
  • Top Sellers by Item Attribute
  • Top by Analytics Metric

Entity parameters required

  • entity.categoryId or the item attribute for popularity based if the criteria is based on the current or the item attribute.
  • Nothing must be passed for Most Viewed/Top Sold across the site.

Readings

  • Popularity-based

Return to the diagram at the top of this page.

3.4: Item-based criteria

Make recommendations based on finding similar items to an item that the user is viewing or has recently viewed.

See details

Available criteria

  • People Who Viewed This, Viewed That
  • People Who Viewed This, Bought That
  • People Who Bought This, Bought That
  • Items with Similar Attributes

Entity parameters required

  • entity.id
  • If any profile attribute is used as a key

Readings

  • Item based

Return to the diagram at the top of this page.

3.5: User-based criteria

Make recommendations based on the user’s behavior.

See details

Available criteria

  • Recently Viewed Items
  • Recommended for You

Entity parameters required

  • entity.id

Readings

  • User-based

Return to the diagram at the top of this page.

3.6: Custom criteria

Make recommendations based on a custom file that you upload.

See details

Available criteria

  • Custom algorithm

Entity parameters required

entity.id or the attribute used as a key for the custom algorithm

Readings

  • Custom criteria

Return to the diagram at the top of this page.

3.7: Provide attributes used in inclusion rules

See details

Readings

  • Use dynamic and static inclusion rules

Return to the diagram at the top of this page.

3.8: Provide excludedIds

Pass entity IDs for entities that you want to exclude from your recommendations. For example, you can exclude items that are already in the shopping cart.

See details

Readings

  • Can I dynamically exclude an entity?

Return to the diagram at the top of this page.

3.9: Provide entity attributes to update the product catalog for Recommendations

See details

Readings

  • Entity attributes

You can also accomplish this step by creating product feeds using the Target UI to update the product catalog for Recommendations.

Return to the diagram at the top of this page.

3.10: Provide profile attributes used as keys for inclusion rules

Provide the profile attributes that are used as keys for inclusion rules in any Recommendations criteria mentioned above.

See details

Readings

  • Profile attributes

Return to the diagram at the top of this page.

3.11: Fire page-load request

This step triggers a Delivery API call with execute > pageLoad payload in the request. The getOffers() method fetches the experience and applyOffers() renders the experience on the page. The pageLoad request is needed for rendering experiences authored in the Visual Experience Composer (VEC).

See details

Fire page-load request diagram

Prerequisites

  • All data mapping must be done using the targetPageParams function.

Readings

  • adobe.target.getOffers()
  • adobe.target.applyOffers()

Actions

  • Use the getOffers and applyOffers methods to fetch the experience using a Page Load Request API call.

Return to the diagram at the top of this page.

3.12: Fire regional location request (#location)

This step triggers a Delivery API call with execute > mboxes payload in its request. The getOffers method fetches the experience and applyOffers renders the experience to the page. You can send more than one mbox under the execute > mboxes payload.

See details

Fire regional location request diagram

Prerequisites

  • All data mapping must be done using the targetPageParams function.

Readings

  • adobe.target.getOffers()
  • adobe.target.applyOffers()

Actions

  • Use the getOffers and applyOffers methods to fetch the experience using a Page Load Request API call.

Return to the diagram at the top of this page.

Proceed to Step 4: Notify Target.

recommendation-more-help
6906415f-169c-422b-89d3-7118e147c4e3