You can use the Salesforce B2C Commerce APIs to run a series of time-based promotions, such as "deal of the day" campaigns, by using methods that retrieve specific promotions within a campaign, based on time.
You can have multiple deal of the day campaigns at the same time (deal of the day, week, month, or year), where the storefront user will see the currently active deal, the number of missed deals, and the number of upcoming deals. Each deal is a promotion. All deals of the day are bundled in a campaign.
dw.campaign.PromotionMgr
class to retrieve promotions
by the dates they are active. These methods differ from methods such as
getUpcomingPromotions()
in that they retrieve
promotions assigned to a specific campaign and active within a specific
date range, including past dates.getActivePromotionsForCampaign(Campaign campaign, Date
from, Date to) : PromotionPlan
getActiveCustomerPromotionsForCampaign(Campaign
campaign, Date from, Date to) : PromotionPlan
getPromotions(int sortOrder) : Collection
getStartTime() : Date
getEndTime(): Date