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 |
|---|---|
| Clears the search session. |
| Used to search for orders. It also indicates the way that the results will display, including the paging and sort order. |
Clearing Search Sessions
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"
Searching for Orders
The search actor-chain searches for orders and configures the result display. It contains the following parameters.
Parameter | Description |
|---|---|
| Indicates the size of the fields array, or the number of items in the field. |
| The number of orders per page. The default is set to |
| Indicates which page of results to return. The default is set to |
| The total number of search results to return. The default is set to |
| Identifies the properties of the order to return in each search result. The default is set to |
| The type of sort property to use. The default is |
| Sort the results in |
| The property to sort on. The default is |
| Keeps the request in session. |
| The name of the order property to search. |
| The operation, which should be set to |
| 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.search.routing.command.search.Field"}}, \"atg-rest-values\":
[{"atg-rest-class-type":"atg.search.routing.command.search.Field", \"name\":
"orderId",\"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,
"lastName": "johnson",
"returnedQuantity": 2,
"status": "no_pending_action",
"originOfOrder": "default",
"submittedDate": "1340638926",
"quantity": 4,
"firstName": "Brandon",
"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,
"lastName": "Moore",
"returnedQuantity": 0,
"status": "processing",
"originOfOrder": "default",
"submittedDate": "1340636993",
"quantity": 2,
"firstName": "Lindsay",
"orderId": "xco20031"
}
]},
"pagesAvailable": 7
}
