getCustomer()

Usage

CleengApi.getCustomer(callback);

Helper function that can be used to improve user experiece for authenticated customers. When call is successful (ie. user is logged in to Cleeng Platform), you will receive useful information about the customer.

Example

CleengApi.getCustomer(function(result) {

    if (result) {
        alert("Welcome " + result.displayName + " !");
    }

});

Output

{
    country: "US"
    currency: "USD"
    displayName: "John Developer"
    firstName: "John"
    id: "123168578"
    lastName: "Developer"
    locale: "en_US"
}

Back to API Reference