FRAMES | NO FRAMES

 

B U S I N E S S   A N A L Y S T   10.0   R E S T   A P I    A N A L Y S I S    T A S K

Customer Profiling Endpoint

Profiles some demographic attributes of customer data calculating statistical parameters which are floor and ceiling bounds, an average, and a standard deviation.

 

Availability: Business Analyst Server.

 

URL Example

http://localhost/ArcGIS/baserver/REST/services/DefaultMap/BAServer/CustomerProfiling/execute

Specific Parameters

Parameter

Description

Customers (required)

The customer layer used to get Customer Profile for. Type PointLayer.

DataLayerID (required)

ID of a geography layer to get demography. Type string.

Summarizations (required)

Array of demography field names to profile customers. Type array of string.

AnalysisExtent (optional)

Data extent to restrict the analysis with. Type ExtentData.

ProfileType (optional)

Type of profiling the bounds of demography variables. Type esriCustomerProfilingFillingType.

Default: esriCustomerProfilingFloorAndCeilingValues.

Variance (optional)

A variance value in percents. Type double.

Default: 0.

Other Parameters

Parameter

Description

ActiveDatasetID (optional)

ID of the active dataset. Type string.

Default: ID of the first available dataset.

compatibility (optional)

Business Analyst Server version the JSON output is compatible with. Type string. Available with Business Analyst Server 10.0.

Default: 9.3.1

f (optional)

Response format. Type string. Available formats: HTML, JSON, PJSON, XML.

Default: HTML.

IsFullErrorMessage (optional)

Mode for composing error messages. Type boolean.

Default: false.

token

Authentication token. This parameter is required if your Business Analyst Server is secured. Type string.

Returns

Customer Profile object. It is the Customer Profile in XML format serialized to a string for HTML and XML response types. In the case of JSON and PJSON response types, the response format depends on the compatibility parameter value.

Remarks

Customer Profiling is used to set up a definition query to search for geographic areas that meet a set of criteria. In other words, you can profile the composition of your customer data to determine what demographic variables best represent your customer base. In most cases, this criteria is based on an existing customer layer.

 

The geography level determines the feature class that will be used to profile your customers. Each customer feature point is spatially matched to a single geographic feature in the geography layer and that feature's attributes are queried to meet the requirements set. These results are compiled for each customer and returned in the output Customer Profile.

 

The analysis can be restricted to an analysis extent if the AnalysisExtent parameter is specified.

 

The ProfileType parameter specifies what bounds of ranges of demography variables will be profiled for your customers: floor bounds, ceiling bounds, or both. The Variance specifies how wide the range will be. The floor and ceiling values for a demographic variable are calculated by the formulas

 

floor = average * (1 – Variance/100),     ceiling = average * (1 + Variance/100).

 

Here average is an average value of a demographic variable calculated.

 

NOTE: The Customer Profiling endpoint lets you set up an output object that will be used as an input for the Customer Prospecting endpoint. To do this, assign the resulting XML string value received in compatibility with version 10.0 to the CustomerProfileDescription parameter of the Customer Prospecting endpoint.

Usage Tips

• When defining the variance of the fields to profile, start with a high variance, for example, (+/-) 20 percent, to establish a general range and refine the variance further as needed.

• The ProfileType option specifies what bounds of ranges will be profiled for your customers: floor bounds, ceiling bounds, or both.

Example Usage

The example below creates a customer profile for 2 summarization variables.

 

Request in compatibility with version 9.3.1

http://localhost/ArcGIS/baserver/REST/services/DefaultMap/BAServer/CustomerProfiling/execute?
Customers={"Points":[
  {"name":"Alex Smith","latitude":37.777,"longitude":-122.465,"storeId":"1","description":"Customer of Store 1"},
  {"name":"Olga Meyers","latitude":37.779,"longitude":-122.447,"storeId":"1","description":"Customer of Store 1"},
  {"name":"Tim Jones","latitude":37.788,"longitude":-122.435,"storeId":"2","description":"Customer of Store 2"}
]}&
DataLayerID=US.BlockGroups&
Summarizations=MEDHINC_CY;AVGNW_CY&
ActiveDatasetID=USA_ESRI&
ProfileType=esriCustomerProfilingFloorValue&
compatibility=9.3.1&
f=PJSON

 

Response

{
  "results":
  [
    {
      "BACustomerProfile":
      {
        "FillingType":"Floor",
        "Item":
        [
          {
            "Average":"84829.333333",
            "Ceiling":"0.000000",
            "FieldAlias":"2010 Median HH Income",
            "FieldCategory":"2010 Income",
            "FieldName":"MEDHINC_CY",
            "Floor":"84829.333333",
            "StdDev":"18680.469382"
          },
          {
            "Average":"627588.333333",
            "Ceiling":"0.000000",
            "FieldAlias":"2010 Average Net Worth",
            "FieldCategory":"2010 Net Worth",
            "FieldName":"AVGNW_CY",
            "Floor":"627588.333333",
            "StdDev":"399800.039150"
          }
        ],
        "Variance":"0.000000"
      }
    }
  ],
  "messages":
  [
  ]
}

 

Request in compatibility with version 10.0

http://localhost/ArcGIS/baserver/REST/services/DefaultMap/BAServer/CustomerProfiling/execute?
Customers={"Points":[
  {"name":"Alex Smith","latitude":37.777,"longitude":-122.465,"storeId":"1","description":"Customer of Store 1"},
  {"name":"Olga Meyers","latitude":37.779,"longitude":-122.447,"storeId":"1","description":"Customer of Store 1"},
  {"name":"Tim Jones","latitude":37.788,"longitude":-122.435,"storeId":"2","description":"Customer of Store 2"}
]}&
DataLayerID=US.BlockGroups&
Summarizations=MEDHINC_CY;AVGNW_CY&
ActiveDatasetID=USA_ESRI&
ProfileType=esriCustomerProfilingFloorValue&
compatibility=10.0&
f=PJSON

 

Response

{
  "results":
  [
    {
      "paramName":"BACustomerProfile",
      "dataType":"GPString",
      "value":"<BACustomerProfile Variance=\"0.000000\" FillingType=\"Floor\">
        <Item
          FieldName=\"MEDHINC_CY\"
          FieldAlias=\"2009 Median HH Income\"
          FieldCategory=\"2009 Household Income\"
          Average=\"84829.333333\"
          Floor=\"84829.333333\"
          Ceiling=\"0.000000\"
          StdDev=\"18680.469382\"
        />
        <Item
          FieldName=\"AVGNW_CY\"
          FieldAlias=\"2009 Average Net Worth\"
          FieldCategory=\"2009 Household Net Worth\"
          Average=\"627588.333333\"
          Floor=\"627588.333333\"
          Ceiling=\"0.000000\"
          StdDev=\"399800.039150\"
        />
      </BACustomerProfile>"
    }
  ],
  "messages":
  [
  ]
}

 

NOTE: The XML string value in the response is in lines for easy reading.

 

See Also

Customer Prospecting Endpoint

Business Analyst Server REST API Reference