The PromotionsSearchActor enables an agent to search for a promotion. This actor is located at /atg/commerce/custsvc/promotion/PromotionSearchActor, and contains the searchPromotions actor-chain.

Parameter

Description

keyword

The keyword used to search for promotions.

dateOption

The date to search for the promotion. This parameter can take the following values: Today, Start in Next 7 Days, End in Last 7
Days
, All Future, or All Expired.

type

The type of promotion to search for. This parameter can take the following values: " empty, which gets all types, Item Discount, Order
Discount
, or Shipping Discount.

hideGlobal

To hide global discounts, set this parameter to true.

site

Which sites to search for promotions. This parameter can take the following values: " empty, which gets all sites or site name.

resultsSetSize

The number of promotion results to display.

Search Promotions Example
curl -L -v -b agent_cookies.txt -H "Content-Type: application/json" -d
"{ \"keyword\" : \"10\", \"dateOption\" : \"Today\", \"type\" : \"\" ,
\"hideGlobal\" : \"true\", \"site\" : \"\", \"resultSetSize\" : 20}"
"http://localhost:8080/rest/model/atg/commerce/custsvc/promotion/
PromotionSearchActor/searchPromotions"

The response may be similar to the following:

{"searchResults":[
  {
    "id":"abandonedOrderDiscount",
    "displayName":"10% off Order"
  },
  {
    "id":"promo20011",
    "displayName":"TENSHIP Coupon - 10% Off Order"
  }
]}

Copyright © 1997, 2014 Oracle and/or its affiliates. All rights reserved. Legal Notices