Skip to main content
Skip table of contents

Recent items and shopping cart events

Overview

In this section we break down the various out-of-the-box Web Realtime Decisions Events, specifically the Recent Items and Shopping Cart Events.

Recent Items and Shopping Cart Events

Recent item events

Below is a list of the Recent Item Events that are preconfigured events in RPI Web Realtime Decisions.

Event Name in RPI

Event Name in Payload

Recent Items - Add Item

add_recentview_item

Recent Items - Clear

clear_recentview_param

Recent Items - Remove Item

remove_recentview_item

Recent Items - Update All Items

upsert_recentview_param

Sample Realtime rules in cache

Recent items: add item

XML
<DynamicContentisContectCached="true" id="909673e1-9c3e-47ad-9467-c148a3a7c4ec" name="Web - RTD - Shppoing Cart" histID="172" dfIndex="2">
<Content index="1" resp="true" respFormat="BOOLEAN">
<Rule name="Web - RTD - Shppoing Cart" id="204cfd3c-0a72-4388-a196-216e01219767" andor="And" type="Web">
<Item parameter="add_recentview_item" type="EventState" paramId="a5a71132-0176-4e9c-802c-552fd5637841" isUD="False" lft="0" op="HappenedAnytime">
<Val>Hat</Val>
</Item>
</Rule>
</Content>
<Content index="2" resp="false" respFormat="BOOLEAN" />
</DynamicContent>

Recent items: clear

XML
<DynamicContentisContectCached="true" id="909673e1-9c3e-47ad-9467-c148a3a7c4ec" name="Web - RTD - Shppoing Cart" histID="173" dfIndex="2">
<Content index="1" resp="true" respFormat="BOOLEAN">
<Rule name="Web - RTD - Shppoing Cart" id="097379fe-ac0e-4df9-984c-9f730983564a" andor="And" type="Web">
<Item parameter="clear_recentview_param" type="EventState" paramId="a5a71132-0176-4e9c-802c-552fd5637841" isUD="False" lft="0" op="HappenedAnytime">
<Val>Hat</Val>
</Item>
</Rule>
</Content>
<Content index="2" resp="false" respFormat="BOOLEAN" />
</DynamicContent>

Recent items: remove item

XML
<DynamicContentisContectCached="true" id="909673e1-9c3e-47ad-9467-c148a3a7c4ec" name="Web - RTD - Shppoing Cart" histID="174" dfIndex="2">
  <Content index="1" resp="true" respFormat="BOOLEAN">
    <Rule name="Web - RTD - Shppoing Cart" id="52fb1124-7148-492e-84b5-a6b52202e334" andor="And" type="Web">
      <Item parameter="remove_recentview_item" type="EventState" paramId="a5a71132-0176-4e9c-802c-552fd5637841" isUD="False" lft="0" op="HappenedAnytime">
        <Val>Shirt</Val>
      </Item>
    </Rule>
  </Content>
  <Content index="2" resp="false" respFormat="BOOLEAN" />
</DynamicContent>

Recent items: update all items

XML
<DynamicContentisContectCached="true" id="909673e1-9c3e-47ad-9467-c148a3a7c4ec" name="Web - RTD - Shppoing Cart" histID="176" dfIndex="2">
<Content index="1" resp="true" respFormat="BOOLEAN">
<Rule name="Web - RTD - Shppoing Cart" id="9f21ad64-d279-483d-b809-4243d2f06242" andor="And" type="Web">
<Item parameter="upsert_recentview_param" type="EventState" paramId="a5a71132-0176-4e9c-802c-552fd5637841" isUD="False" lft="0" op="HappenedAnytime">
<Val>Shirt</Val>
</Item>
</Rule>
</Content>
<Content index="2" resp="false" respFormat="BOOLEAN" />
</DynamicContent>

Shopping cart events

Below is a list of the Recent Item Events that are preconfigured events in RPI Web Realtime Decisions.

Event Name in RPI

Event Name in Payload

Shopping Cart - Add Item

add_cart_item

Shopping Cart - Clear

clear_recentview_param

Shopping Cart - Remove Item

remove_recentview_item

Shopping Cart - Update All Items

upsert_recentview_param

Shopping Cart - Update Quantity

update_cart_item_quantity

Sample Realtime rules in cache

Shopping cart: add item

XML
<DynamicContentisContectCached="true" id="60d3ae03-954a-43ed-bfc3-2a277623f139" name="Web - RTD - Shopping Cart - Add Item" histID="165" dfIndex="2">
<Content index="1" resp="true" respFormat="BOOLEAN">
<Rule name="Web - RTD - Shopping Cart - Add Item" id="21015d05-c194-460e-b2e5-0b1a0db3c44f" andor="And" type="Web">
<Item parameter="add_cart_item" type="EventState" paramId="a5a71132-0176-4e9c-802c-552fd5637841" isUD="False" lft="0" op="HappenedAnytime">
<Val>Pants</Val>
</Item>
</Rule>
</Content>
<Content index="2" resp="false" respFormat="BOOLEAN" />
</DynamicContent>

Shopping cart: clear cart

XML
<DynamicContentisContectCached="true" id="909673e1-9c3e-47ad-9467-c148a3a7c4ec" name="Web - RTD - Shppoing Cart" histID="167" dfIndex="2">
<Content index="1" resp="true" respFormat="BOOLEAN">
<Rule name="Web - RTD - Shppoing Cart" id="878c4a9d-3d7d-4396-9b78-4530d4b2ea3c" andor="And" type="Web">
<Item parameter="clear_cart" type="EventState" paramId="a5a71132-0176-4e9c-802c-552fd5637841" isUD="False" lft="0" op="HappenedAnytime">
<Val>Value 1</Val>
</Item>
</Rule>
</Content>
<Content index="2" resp="false" respFormat="BOOLEAN" />
</DynamicContent>

Shopping cart: remove item

XML
<DynamicContentisContectCached="true" id="909673e1-9c3e-47ad-9467-c148a3a7c4ec" name="Web - RTD - Shppoing Cart" histID="168" dfIndex="2">
<Content index="1" resp="true" respFormat="BOOLEAN">
<Rule name="Web - RTD - Shppoing Cart" id="20511219-b72f-45d4-a988-0151c25a7780" andor="And" type="Web">
<Item parameter="remove_cart_item" type="EventState" paramId="a5a71132-0176-4e9c-802c-552fd5637841" isUD="False" lft="0" op="HappenedAnytime">
<Val>Shirt</Val>
</Item>
</Rule>
</Content>
<Content index="2" resp="false" respFormat="BOOLEAN" />
</DynamicContent>

Shopping cart: update all items

XML
<DynamicContentisContectCached="true" id="909673e1-9c3e-47ad-9467-c148a3a7c4ec" name="Web - RTD - Shppoing Cart" histID="169" dfIndex="2">
<Content index="1" resp="true" respFormat="BOOLEAN">
<Rule name="Web - RTD - Shppoing Cart" id="c56c219f-1cfa-405e-978a-84b3554bb5cd" andor="And" type="Web">
<Item parameter="upsert_entire_cart" type="EventState" paramId="a5a71132-0176-4e9c-802c-552fd5637841" isUD="False" lft="0" op="HappenedAnytime">
<Val>Shirt</Val>
</Item>
</Rule>
</Content>
<Content index="2" resp="false" respFormat="BOOLEAN" />
</DynamicContent>

Shopping cart: update quantity

XML
<DynamicContentisContectCached="true" id="909673e1-9c3e-47ad-9467-c148a3a7c4ec" name="Web - RTD - Shppoing Cart" histID="171" dfIndex="2">
<Content index="1" resp="true" respFormat="BOOLEAN">
<Rule name="Web - RTD - Shppoing Cart" id="6375d054-2ff8-4fd8-b1d0-a0b23f26c7fc" andor="And" type="Web">
<Item parameter="update_cart_item_quantity" type="EventState" paramId="a5a71132-0176-4e9c-802c-552fd5637841" isUD="False" lft="0" op="HappenedAnytime">
<Val>3</Val>
</Item>
</Rule>
</Content>
<Content index="2" resp="false" respFormat="BOOLEAN" />
</DynamicContent>

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.