The OrderSearchTreeQueryActor is used to search for orders. The path to this actor is: /atg/commerce/custsvc/order/OrderSearchTreeQueryActor.

This actor contains the following actor-chains:

Actor-Chain

Description

clearForm

Clears the search session.

search

Used to search for orders. It also indicates the way that the results will display, including the paging and sort order.

The clearForm actor-chain allows you to clear the saved session search request.

Parameters: None

Clear Order Search Sessions Example
curl -L -v -b agent_cookies.txt -H "Content-Type: application/json"
"http://localhost:8280/rest/model/atg/commerce/custsvc/order/
OrderSearchTreeQueryActor/clearForm"

The search actor-chain searches for orders and configures the result display.

Parameter

Description

fieldCount

Indicates the size of the fields array, or the number of items in the field.

pageSize

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

pageNum

Indicates which page of results to return. The default is set to 0.

maxResults

The total number of search results to return. The default is set to 100.

docProps

Identifies the properties of the order to return in each search result. The default is set to all.

docSort

The type of sort property to use. The default is strprop. Use numpropr if you are doing a number property sort.

docSortOrder

Sort the results in ascending or descending order. The default is descending.

docSortProp

The property to sort on. The default is id.

saveRequest

Keeps the request in session.

fields[].name

The name of the order property to search.

fields[].op

The operation, which should be set to starts.

field[].value

The value that is used for searching this field.

Search for Orders Example
curl -L -v -b agent_cookies.txt -H "Content-Type: application/json" –d
"{ \"pageNum\":1, \"pageSize\":3, \"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\": "id",\"op\":
\"starts\",\"value\": \"x\"} ]}}" "http://localhost:8280/rest/model/
atg/commerce/custsvc/order/OrderSearchTreeQueryActor/search"

The server response may be similar to the following:

{
  "searchResponse": {"items": [
    {
      "total": 715.2,
      "customerId": "se-570040",
      "returnedQuantity": 2,
      "status": "no_pending_action",
      "originOfOrder": "default",
      "submittedDate": "1340638926",
      "quantity": 4,
      "orderId": "xco20042"
    },
    {
      "total": 316.7,
      "lastName": "Schmidt",
      "returnedQuantity": 5,
      "status": "no_pending_action",
      "originOfOrder": "default",
      "submittedDate": "1340638855",
      "quantity": 0,
      "firstName": "Stuart",
      "orderId": "xco20040"
    },
    {
      "total": 88,
      "customerId": "se-570042",
      "returnedQuantity": 0,
      "status": "processing",
      "originOfOrder": "default",
      "submittedDate": "1340636993",
      "quantity": 2,
      "orderId": "xco20031"
    }
  ]},
  "pagesAvailable": 7
}

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