The atg/svc/agent/ui/formhandlers/CustomerSearchTreeQueryActor contains actor-chains that perform the following:

Actor-Chain

Description

search

Searches for a customer profile.

clearForm

Clears the saved session search request.

The search actor-chain is used to search for customer profiles. It identifies the way that the results will display, including the paging and sort order.

Parameter

Description

fieldCount

The array size of the fields returned.

pageSize

The number of results per page. The default is set to 10.

pageNum

The page number within the pages of results This parameter is zero-based, with the default set to 0.

maxResults

The maximum number of results to display. The default is set to 100.

docProps

Which properties should be returned for each result. The default is set to all.

docSort

Type of sorting used to display the results. The default is strprop. For number fields, use numprop sorting.

docSortOrder

Sets the sort order as ascending or descending. The default is set to ascending.

docSortProp

The field used to sort the results on. The default is lastName.

saveRequest

Identifies if the request should be saved within the session. The default is true.

fields[].name

The order property name.

fields[].op

The operation, which should be set to starts.

field[].value

The value that is used for searching this field.

Search Customer Profile Example
curl -L -v -b agent_cookies.txt -H "Content-Type: application/json" -d "{
\"pageNum\":0, \"pageSize\":2, \"fieldCount\":\"1\", \"fields\":
{\"atg-rest-class-type\":\"java.util.ArrayList\", "atg-rest-class-descriptor\" :
{ \"atg-rest-values\" : {\"container-class\" : \"java.util.ArrayList\",
\"element-class\":\"atg.textsearch.client.Field\"}}, \"atg-rest-values\":
[{\"atg-rest-class-type\":\"atg.textsearch.client.Field\", \"name\":
\"lastName\",\"op\": \"starts\",\"value\": \"t\"} ]}}" "http://localhost:8280/
rest/model/atg/svc/agent/ui/formhandlers/CustomerSearchTreeQueryActor/
search"

The server response may be similar to the following:

{
  "searchResponse": {"items": [
    {
      "lastName": "Taylor",
      "postalCode": "89501",
      "phoneNumber": "2125558105",
      "email": "chuck@example.com",
      "profileId": "se-570105",
      "login": "chuck@example.com",
      "firstName": "Chuck"
    },
    {
      "lastName": "Thomas",
      "postalCode": "59101",
      "phoneNumber": "2125558855",
      "email": "juan@example.com",
      "profileId": "se-570056",
      "login": "juan@example.com",
      "firstName": "Juan"
    }
  ]},
  "pagesAvailable": 2
}

Copyright © 1997, 2015 Oracle and/or its affiliates. All rights reserved. Legal Notices