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. |
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 |
---|---|
| 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 i |
| 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.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 }