Offer Code Elements

og-frequency-status

This element is aware of the frequency associated with a given optin. This element contains three slots - one is displayed when one is subscribed, another when one is not subscribed, and another when one is subscribed whilst frequency does not match default frequency.

Attributes

Attribute Type
default-frequency Frequency
disabled Boolean
frequency Frequency
product String
subscribed Boolean

 

Slots

Slot Default
frequency-mismatch By default this slot is empty
not-subscribed By default this slot is empty
subscribed By default this slot displays a formatted version of the frequency associated with the option

 

og-next-upcoming-order

This element displays the placement date of one'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 optin. The product attribute is required except in the case that either preview-standard-offer or preview-upsell-offer are true. If the product is upsell-eligible, the element will display an upsell offer. If the product is not upsell-eligible but is subscription-eligible, the element will display an offer for the specified type, or an offer of radio type if type is not specified. Upsell eligibility and subscription eligibility are determined at runtime based on response data from a request made 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 not upsell-eligible but is subscription-eligible.

Attributes

Attribute Type
default-frequency Frequency
preview-standard-offer Boolean
preview-upsell-offer Boolean
product String
product-components List of Product Components
show-tooltip Boolean
type Offer Type
first-order-place-date String YYYY-MM-DD
product-to-subscribe String
location String

Slots

Slot Default
upsell By default, this slot displays an upsell offer comprised of a button, which when clicked, displays a modal presenting option to opt in
standard-template By default, this slot displays either a radio offer, a select offer, or a toggle offer, based on the value of the type attribute

og-optin-button

This element allows one to opt in to an offer. One may typically wish to use this element in conjunction with og-optout-button to enable the ability to toggle one's optin status. This element contains two slots - a default slot, and a label slot, which is nested within the default slot and so will only be displayed if the default slot has not been overridden.

 

Attributes

Attribute Type
default-frequency Frequency
frequency Frequency
optin-button-label String
product String
subscribed (read-only) None

Slots

Slot Default
unnamed slot By default this slot displays a radio button to opt in, along with a label to display the value of offerOptInLabel
label By default this slot displays the value of offerOptInLabel
og-optin-status

This element is aware of one's optin status for a given product. One may either be subscribed or not subscribed. These two states correspond to eponymously named slots. There exist two additional slots, frequency-match and frequency-mismatch that may be employed when the frequency of the optin either matches or does not match the default frequency.

 

Attributes

Attribute Type
product String
subscribed Boolean

 

Slots

Slot Default
frequency-match By default this slot is empty
frequency-mismatch By default this slot is empty
not-subscribed By default, this slot displays the value of optinStatusOptedOutLabel
subscribed By default, this slot displays the value of optinStatusOptedInLabel

og-optin-toggle

This element allows one to toggle one's optin status. One may either be subscribed or not subscribed. This element contains one unnamed slot.

Attributes

Attribute Type
frequency Frequency
product String
subscribed (read-only) None

Slots

Slot Default
unnamed slot By default this slot displays a checkbox to toggle one's optin status, along with a label to display the value of optinStatusOptedInLabel

 

og-optout-button

This element allows one to opt out of an offer. One may typically wish to use this element in conjunction with og-optin-button to enable the ability to toggle one's optin status. This element contains two slots - a default slot, and a label slot, which is nested within the default slot and so will only be displayed if the default slot has not been overridden.

Attributes

Attribute Type
default-frequency Frequency
frequency Frequency
optin-button-label String
product String
subscribed (read-only) None

Slots

Slot Default
unnamed slot By default this slot displays a radio button to opt out, along with a label to display the value of offerOptOutLabel
label By default this slot displays the value of offerOptOutLabel

og-select-frequency

This element displays a select control that allows one to view and modify the frequency of one's optin.

 

Attributes

Attribute Type
default-frequency Frequency
disabled Boolean
frequencies List of Frequencies
frequency (read-only) Frequency
subscribed (read-only) None

Slots

Slot Default
unnamed slot By default this slot contains the configured frequency as select option. You can substitute it with your owntags with values such as "2w", "3m" or "10d" to represent the different frequencies.

 

og-tooltip

This element displays a tooltip trigger. When one hovers one's cursor over the trigger, a tooltip is displayed.

Slots

Slot Default
trigger By default, this slot displays the value of offerTooltipTrigger
content By default, this slot displays the value of offerTooltipContent