Referrals Window API
The Referrals Window API exposes public functions that can be called to setup or make configuration changes to referral to be displayed on the page.
Properties
This is a list of all properties that can be set on the window API.
Name | Description | Sample |
---|---|---|
| The current load state of the Referrals widget on site.
|
|
| A |
|
| A |
|
Functions
openModal
Opens the Referrals Widget as a modal/pop-over on a given page. If a Referrals Widget is already embedded on the current page, the page will scroll down to the embedded Referrals Widget.
Example Usage
Properties
Before calling openModal
, you should check that window.okeReferralsApi.appStatus
is loaded
closeModal
Closes an open Referrals Widget modal/pop-over on a given page. If a Referrals Widget is already embedded on the current page this action won't do anything as there is no modal/pop-over to close.
Example Usage
Binding A Referrals Modal Open Action To An Element
We give merchants/engineers the ability to add a data
attribute to elements within the DOM.
When the Okendo App Embed is enabled and the data
attribute is present, any click on that given element will open a Referrals modal/pop-over.
Example Usage
Last updated