FRAMES | NO FRAMES

 

B U S I N E S S   A N A L Y S T   10.1   R E S T   S E G M E N T A T I O N   T A S K

Profile by Import from Table Endpoint

Creates a new Tapestry segmentation profile from a table of aggregated segmentation information.

 

Availability: Business Analyst Server.

 

URL Example

http://localhost:6080/arcgis/rest/services/DefaultMap/MapServer/exts/BAServer/ProfileByImportFromTable/execute

Specific Parameters

Parameter

Description

CountField (required)

The attribute field in the DataTable table which contains summarized counts (e.g. number of customers) for each Tapestry segment. Type string.

DataTable (required)

The data table to import the profile. Type TableData.

IDField (required)

The attribute field in the DataTable table which contains IDs of Tapestry segments. Type string.

VolumeField (optional)

The attribute field in the DataTable table which contains summarized volume (e.g. total sales) for each Tapestry segment. Type string.

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.

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.

OutputItem (optional)

Configuration options for storing the output profile in the repository. This will enable viewing and working with the output result in subsequent tasks. Type esriFolderItem.

token

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

Returns

Variable of type string containing XML serialized segmentation profile. In the case of JSON and PJSON response types, the response format depends on the compatibility parameter value.

Remarks

Use the Profile by Import from Table endpoint when you want to import a segmentation profile that has already been summarized. For example, you may have a table that has a count of customers for each Tapestry segment. Use this method to import these counts and create a segmentation profile that can be used with other segmentation methods.

 

The table below illustrates how an import table may look. The IDField parameter will be set to the "TAPCODE" and the CountField parameter will be set to the "COUNT".

 

Usage Tips

• The import table should only have one record for each segmentation code.

• The import table must contain summarized counts for each segment.

• The import table can contain summarized volumes (e.g. total sales) for each segment.

Example Usage

The example below generates a profile from a table consisting of market Tapestry segment codes. See Get Segments lookup operation to query available Tapestry segments.

 

Request

http://localhost:6080/arcgis/rest/services/DefaultMap/MapServer/exts/BAServer/ProfileByImportFromTable/execute?
DataTable={"RecordSet":{"features":[
  {"geometry":{},"attributes":{"OID":1,"CUST_TYPE":"Target","SEG_CODE":"5","COUNT":1232}},
  {"geometry":{},"attributes":{"OID":2,"CUST_TYPE":"Secondary","SEG_CODE":"30","COUNT":341}}
]}}&
IDField=SEG_CODE&
CountField=COUNT&
ActiveDatasetID=USA_ESRI_2011&
f=PJSON

 

Response

{
  "results":
  [
    {
      "paramName":"ProfileData",
      "dataType":"GPString",
      "value":"<ProfileData
        xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
        xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"
        Base=\"Total Households\"
      >
        <Cluster
          ID=\"1\"
          Name=\"Top Rung\"
          Count=\"0\"
          Weight=\"0.000000\"
          VolumeInfo=\"0.000000\"
        />
        ...
        <Cluster
          ID=\"66\"
          Name=\"Unclassified\"
          Count=\"0\"
          Weight=\"0.000000\"
          VolumeInfo=\"0.000000\"
        />
      </ProfileData>"
    }
  ],
  "messages":
  [
  ]
}

 

NOTE: The XML string value in the response is split in lines for easy reading. The response has been abbreviated where "..." is noted.

 

See Also

ProfileData Type

Profile by Area Summation Endpoint

Profile by Table Geocoding Endpoint

Business Analyst Server REST Reference