Offer Code Elements
og-frequency-status
This element is aware of the frequency associated with a given opt-in. It contains three slots — one displayed when subscribed, one when not subscribed, and one when subscribed but the frequency does not match the default frequency.
Attributes
Slots
og-incentive-text
This element displays information from dynamic incentives. By default, the component searches for an ongoing discount class. The initial attribute can be specified to force a search in initial incentives.
Attributes
og-next-upcoming-order
This element displays the placement date of the customer’s next upcoming order.
og-offer
This element displays a complete offer, allowing one to opt in, opt out, and change the frequency of an opt-in. The product attribute is required except when preview-standard-offer or preview-upsell-offer are true.
If the product is upsell-eligible, the element displays an upsell offer. If the product is not upsell-eligible but is subscription-eligible, it displays an offer for the specified type, or a radio-type offer if type is not specified. Upsell eligibility and subscription eligibility are determined at runtime based on response data for the specified product. If a product is neither upsell-eligible nor subscription-eligible, nothing is displayed.
This element contains two slots. The iu-template slot is displayed when the product is upsell-eligible. The standard-template slot is displayed when the product is subscription-eligible but not upsell-eligible.
Attributes
Slots
og-optin-button
This element allows a customer to opt in to an offer. It is typically used alongside og-optout-button to enable toggling opt-in status. This element contains two slots — a default slot and a label slot nested within the default slot (displayed only if the default slot has not been overridden).
Attributes
Slots
og-optin-status
This element is aware of a customer’s opt-in status for a given product. The customer may either be subscribed or not subscribed, corresponding to the subscribed and not-subscribed slots. Two additional slots — frequency-match and frequency-mismatch — can be used when the opt-in frequency either matches or does not match the default frequency.
Attributes
Slots
og-optin-toggle
This element allows a customer to toggle their opt-in status between subscribed and not subscribed. This element contains one unnamed slot.
Attributes
Slots
og-optout-button
This element allows a customer to opt out of an offer. It is typically used alongside og-optin-button to enable toggling opt-in status. This element contains two slots — a default slot and a label slot nested within the default slot (displayed only if the default slot has not been overridden).
Attributes
Slots
og-select-frequency
This element displays a select control that allows a customer to view and modify the frequency of their opt-in.
Attributes
Slots
og-tooltip
This element displays a tooltip trigger. When a customer hovers over the trigger, a tooltip is displayed.