Class: module:EloquaLookupDataScrapper

module:EloquaLookupDataScrapper(elqSiteId)

Eloqua data scrapper to get data from Eloqua's lookup with proper and easy to use format.

Constructor

new module:EloquaLookupDataScrapper(elqSiteId)

Data scrapper for lookup data from eloqua.
Parameters:
Name Type Description
elqSiteId string Eloqua site id. [REQUIRED]
Source:

Methods

getEloquaData() → {Array}

Util function to get all stored data from eloqua reponses
Source:
Returns:
- stored data
Type
Array

getScript() → {string}

Special get script function, it getting the script and then removes them from the dom
Source:
Returns:
- Url to get script from
Type
string

getVisitorEmailFromLookupResult() → {string}

Util function to get visitor email (if it's already known) from eloqua response
Source:
Returns:
- Visitor email if know or empty string if not known
Type
string

lookup(elqSiteId, lookupId, lookupKey) → {Promise}

Eloqua lookup function to prepare settings and get data from eloqua
Parameters:
Name Type Description
elqSiteId string Eloqua site id. [REQUIRED]
lookupId string Lookup id [Visitor or primary]. [REQUIRED]
lookupKey string Lookup key. [REQUIRED for PrimaryLookup]
Source:
Returns:
- Promise with eloqua lookup data
Type
Promise

scrapCDO(lookupId, matchFieldColumnName, matchFieldValue) → {Promise}

Main function to scrap SINGLE data from Eloqua response
Parameters:
Name Type Description
lookupId string Lookup Id from Eloqua. [REQUIRED]
matchFieldColumnName string Column name to match after. [REQUIRED]
matchFieldValue string Field value. [REQUIRED]
Source:
Returns:
- Promise which will contain data scrapped from eloqua response
Type
Promise

scrapContactData(visitorLookupId) → {Promise}

Main function to scrap data from Eloqua response
Parameters:
Name Type Description
visitorLookupId string Visitor lookup id. [REQUIRED]
Source:
Returns:
- Promise which will contain data scrapped from eloqua response
Type
Promise

scrappAllDataFromElqLookupFunction() → {Array}

This function converts window.GetElqContentPersonalizationValue function to string and scrapp all the data from it
Source:
Returns:
- Array of object with property name and value for each property
Type
Array

storeEloquaData() → {string}

Util function to store all parsed data eloqua reponses
Source:
Returns:
- Visitor email if know or empty string if not known
Type
string