Search Projected Assets by Customer

post

/rest/v16/projectedAssets/actions/search

This REST API call provides a consolidated list of fulfilled and pending order asset lines in a hierarchical list for a specific customer. In addition, users can perform search and sort operations on the consolidated list of projected assets.

Request

Supported Media Types
Body ()
Root Schema : projectedAssets-searchCollectionRequest
Type: object
Show Source
Nested Schema : Query Definition
Type: object
Title: Query Definition
Captures the query definition for the current resource request.
Show Source
Nested Schema : actions
Type: array
Array of actions names, whose state is requested in the state object response.
Show Source
Nested Schema : childDefs
Type: array
Show Source
Nested Schema : expand
Type: array
Array of child resource names that you want to expand so that the contents return with the parent in the same request.
Show Source
Nested Schema : expandedDomains
Type: array
Array of field names, whose expanded domains are requested in the state object response.
Show Source
Nested Schema : fields
Type: array
Array of field names that you wanted returned in a request.
Show Source
Nested Schema : Child query criteria.
Type: object
Title: Child query criteria.
Captures the query criteria for the child resource.
Show Source
Back to Top

Response

Supported Media Types

Default Response

Body ()
Root Schema : projectedAssets-searchCollectionResponse
Type: object
Show Source
Nested Schema : projectedAssets-collection
Type: object
Show Source
  • The number of resource instances returned in the current range.
  • Returns true if more resources are available on the server than the subset returned in current page.
  • items
  • The actual paging size used by the server.
  • The offset used in the current page.
  • state
    Title: state
    Captures the current state of the resource collection. Of available properties, only those that are applicable and whose values are known in the current context are included.
  • Capture the total count of the resource instances, which not only includes the instances in the current range, but all instances on the server that satisfy the request.
Nested Schema : items
Type: array
Show Source
Nested Schema : state
Type: object
Title: state
Captures the current state of the resource collection. Of available properties, only those that are applicable and whose values are known in the current context are included.
Show Source
  • Title: Has Warning
    Boolean value that specifies whether any warning that was issued has been assigned to the collection itself.
  • Messages
    Title: Messages
    Array of messages that have been generated for a specific object.
Nested Schema : Projected Assets
Type: object
Title: Projected Assets
Show Source
Nested Schema : Action Code
Type: object
Title: Action Code
Show Source
  • Title: Display Value
    Translated display name of the type for which fixed list of values can be defined.
  • Title: Id
    Primary Key of the fixed list of value resource.
  • Title: Lookup Code
    Language independent code of the fixed list of value.
Nested Schema : Fulfillment Status
Type: object
Title: Fulfillment Status
Show Source
  • Title: Display Value
    Translated display name of the type for which fixed list of values can be defined.
  • Title: Id
    Primary Key of the fixed list of value resource.
  • Title: Lookup Code
    Language independent code of the fixed list of value.
Nested Schema : Status
Type: object
Title: Status
Show Source
  • Title: Display Value
    Translated display name of the type for which fixed list of values can be defined.
  • Title: Id
    Primary Key of the fixed list of value resource.
  • Title: Lookup Code
    Language independent code of the fixed list of value.
Nested Schema : Messages
Type: array
Title: Messages
Array of messages that have been generated for a specific object.
Show Source
Back to Top

Examples

The following examples show how to search a projected asset by submitting a POST request to the REST resource using cURL. For more information about cURL, see Use cURL.

curl - X POST - i - H "Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQg" - H "Content-type: application/json"
https://sitename.oracle.com/rest/v16/projectedAssets/actions/search

Request Body Sample

{
  "customerId": "pal_customer",
  "sourceIdentifier": "oraclecpqo",
  "criteria": {
    "enableHierarchy": false,
    "orderby": [
      "assetKey:DESC",
      "partNumber:DESC",
      "serviceId:DESC",
      "id:DESC",
      "transactionId:DESC",
      "lineId:DESC"
    ],
    "q": "{$or:[{'assetKey':{$eq:'kgAsset1'}},{'rootAssetKey':{$eq:'kgAsset1'}},{'serviceId':{$eq:null}},{'partNumber':{$eq:'part11'}}]}"
  }
}
    

Response Body Sample

{
  "result": {
    "hasMore": false,
    "items": [
      {
        "sourceIdentifier": "oraclecpqo",
        "dateAdded": "2021-07-26T23:15:52.000Z",
        "assetKey": "kgNewAsset1",
        "fulfillmentStatus": {
          "displayValue": "Being Fulfilled",
          "lookupCode": "BEING_FULFILLED"
        },
        "customerId": "pal_customer",
        "actionCode": {
          "displayValue": "Add",
          "lookupCode": "ADD"
        },
        "id": 3022499483,
        "serviceId": null,
        "quantity": 10.0,
        "lineId": 5,
        "dateModified": "2021-07-26T23:15:53.000Z",
        "rootAssetKey": "kgNewAsset1",
        "transactionId": "3022499443",
        "numberOfOpenOrders": 1,
        "partNumber": "part11",
        "status": null
      },
      {
        "sourceIdentifier": "oraclecpqo",
        "dateAdded": "2021-07-26T23:15:26.180Z",
        "assetKey": "kgAsset1",
        "fulfillmentStatus": {
          "displayValue": "Being Fulfilled",
          "lookupCode": "BEING_FULFILLED"
        },
        "customerId": "pal_customer",
        "actionCode": {
          "displayValue": "Add",
          "lookupCode": "ADD"
        },
        "id": 3022499447,
        "serviceId": null,
        "quantity": 10.0,
        "lineId": 8,
        "dateModified": "2021-07-26T23:15:55.000Z",
        "rootAssetKey": "kgAsset1",
        "transactionId": "3022499443",
        "numberOfOpenOrders": null,
        "partNumber": "part11",
        "status": {
          "lookupCode": "ACTIVE",
          "displayValue": "Active"
        }
      }
    ]
  }
}
    

Notes:

  • This service can be used to return root asset only (enableHierarchy=false) or asset tree (enableHierarchy=true). By default the server processes a maximum of 100,000 rows for all assets and in addition a maximum of 100 root rows for the tree search. When the results exceed the server limits, the state parameter includes a warning in the response.
  • The Commerce process assetkey (instanceid_l) data column must be indexed.
  • If upgrading to 21D and an ABO Commerce process is already implemented, you must repopulate the data column if there are any pending fulfilled transaction lines already in the Commerce process.
  • The search and sort behavior when enableHierarchy=true is very similar to the Transaction Line hierarchical search and sort. The result line returns in a flat list with children following their parent. Only results that match the specified criteria are returned and non-matching results for those parent/child items are not provided in the result. The sort feature takes into account parent/child relationship but does not sort between children of different parents.
  • The search results take into account the information available in the database and from a memory search of merged data of the projected assets. With this in mind, the child component of the search/sort will always match the specified criteria; however, a root line search/sort can only guarantee to match the criteria from the database query.

    Due to the nature of combination of database search and in-memory search, there could be differences in the search results based on the user-specified criteria for multiple changeable attributes. For example:

      Quantity Date Added
    Asset (database query) 10 Oct 1
    Pending Fulfilled Orders (database query) 20 Nov 1
    Projected Asset (merged data) 20 Oct 1
    • If the user searches on the projected asset, the result would indicate a Quantity of 20 with the Date Added of Oct 1.
    • If the user searches for Quantity less than 10 and Date added is less than Oct 15, the asset would not return a result because the criteria was filtered out in the database query prior to the merged projected asset query.

    In general, avoid a combination multiple attributes for a search when those attributes may change the result from the pending fulfillment order query.

  • When there are multiple pending fulfilled order lines for the same asset, the projected asset info will come from the pending fulfilled line of latest request date. Therefore if the first pending fulfilled order line is asset creation order with action code of Add, even if the asset doesn't exist, the action in the final projected asset will still show as updated based on the second pending fulfilled line.
  • If the response includes hasMore=true, this indicates that more results can be retrieved via pagination without changing search criteria. You could still get a warning of too much result data even if the response is hasMore=false. In this case, you should apply more restrictive search criteria.
  • If you get a warning that there are too many results from the root asset search of the database, try to apply more restrictive criteria. You won't be able to limit the number of results from the database by adding restrictive criteria using fulfillmentstatus, action code, creation date, or modification date attributes as those are only being applied in memory.
    • For flat mode, partNumber is the only attribute that can for more restrictive search results.
    • For tree search mode, try to apply criteria with partNumber, assetkey, lineId, or transactionId attributes.
  • he 21C and earlier ABO package sample Update Asset script incorporates all the pending fulfilled lines information to update the asset. This script logic assumes the pending fulfilled order will always update the asset in the order of request date. If this logic does not fit your business case, the Update Asset script will need to be customized to your needs.
  • The 21C and earlier ABO package includes an Update Asset sample script which needs to be updated for this feature to populate the origTransactionid attribute for the asset. Modify the abo_convertDeltaBomToAsset function by adding the following line to the asset payload:

    jsonput(assetPayload, "origTransactionId", transactionId);

Back to Top