API Documentation

Current version: 2.3.0

Released: March 23, 2018

The OLData object provides lead information and targeting data back to our system to better serve the offers to your customers and leads to our advertisers. It should be hard-coded onto any post-transaction page or anywhere your want to serve offers where the user data is available. The OLData object should be defined and data populated prior to the OfferLogic Tag on the page.

Note:

  • If you are an existing Host Partner using the adagilityData object, please contact your OfferLogic account manager before any new implementations.
  • Please use the specified key names in the object below to pass data to OfferLogic. If there are additional attributes that are not currently in the documentation but you’d like us to consider supporting please let us know.
  • Values for the OLData.userData object should be defined with the customer’s information when available and is required on post-transaction pages. All additional data is optional and can be omitted if not available. Please discuss with your OfferLogic Contact or Integration Specialist if you are unable to provide any information. The more data you can provide the smarter our system gets which in turn drives greater value from our platform.

Expanded API Options:


<script type="text/javascript">
    window.OLData = {
    	userData:{
            email: string,          //User email address 
            firstName: string,      //User first name
            lastName: string,       //User last name
            phone: string,          //User primary phone number
            phoneExtension: string, //User phone extension
            businessName: string,   //User business name
            street1: string,        //User billing street address 1
            street2: string,        //User billing street address 2
            city: string,           //User billing city
            state: string,          //User billing state - see ISO-3166-2_US_state_codes (excluding the US- prefix)
            zip: string,            //User billing zip code
            country: string,        //User billing country - see ISO-3166-1_Country_Codes (alpha-2)
            language: string,       //User language preference - see ISO-6391-1_Language_Codes (alpha-2)
            currency: string,       //User currency - see ISO-4217_Currency_Codes (alpha-3)
            industry: string,       //Business industry
            jobTitle: string        //Job title or function
        },
        userAttributes:{
            customerSegment: [string, string, string ...], //Names/codes of customer segments you would like to target
            isBusiness: boolean     //true or false
        },
        purchaseData:{
            orderValue: float,                  //Order Value
            paymentType: [string, string, ...], //User payment types - download current list of payment type codes.
            individualItems:[
                {
                    name: string,         //Individual Product Name 1
                    sku: string,          //Individual Product SKU 1
                    category: string,     //Individual Product Category 1
                    subcategory: string,  //Individual Product SubCategory A
                    price: float,         //Unit Price
                    qty: integer          //Quantity
                },
                {...}  //Additional items following structure above
            ]
        },
        purchaseHistory:{  //Past purchased items you would like us to consider in decisions (MAX 25)
            individualItems: [
                {
                     name: string,        //Individual Product Name 2
                     sku: string,         //Individual Product SKU 2
                     category: string,    //Individual Product Category 2
                     subcategory: string  //Individual Product Subcategory B
                },
                {...} //Additional items following structure above
            ]
        },
        partnerData:{
            correlationId: string         //Partner Correlation Identifier (e.g. customer ID, order ID, custom ID)
        }
    };
</script>

Example API data object:


<script type="text/javascript">
    window.OLData = {
    	userData:{
            email: "amy.smith@smfinance.com",
            firstName: "Amy",
            lastName: "Smith",
            phone: "123-456-7890",
            phoneExtension: "201",
            businessName: "SM Finance Corp",
            street1: "123 Milk Street",
            street2: "Unit 4A",
            city: "Boston",
            state: "MA",
            zip: "02201",
            country: "US",
            language: "en",
            currency: "USD",
            industry: "Financial Services",
            jobTitle: "Director of Marketing"
        },
        userAttributes:{
            customerSegment: ["Pro User", "Rewards Member"],
            isBusiness: true
        },
        purchaseData:{
            orderValue: 50.00,
            paymentType: ["VI"], 
            individualItems:[
                {
                    name: "XYZ Calendar Book",
                    sku: "A1234",
                    category: "Home Office",
                    subcategory: "Calendars",
                    price: 20.00,
                    qty: 1
                },{
                    name: "ACME Accounting 2015",
                    sku: "SO5678",
                    category: "Software",
                    subcategory: "Finance",
                    price: 30.00,
                    qty: 1
                }
            ]
        },
        purchaseHistory: {
            individualItems: [
                 {
                     name: "HP Laserjet 123",
                     sku: "LP12345",
                     category: "Printers",
                     subcategory: "Laser Printers"
                 }
            ]
        },
        partnerData: {
            correlationId: "Z98767"
        }
    };
</script>