searchPartsContinue Procedure

The searchPartsContinue procedure returns additional results for a search that is initiated by the searchParts procedure.

Parameters

Here are the parameters of the searchPartsContinue procedure:
Parameter Name Mandatory Type Description
searchId Yes Integer A unique id of the search procedure within a plug-in’s open session. Minimum value: 0, Maximum value: 2147483647 For more information, see Loading More Search Results.

Response

Here is the response for of the searchPartsContinue procedure:
Field Name Type Description
items Array Array of FoundItem objects. Found parts. Limited by the limit parameter.
source String Source of the search. Possible values:
  • "cache": The search is performed only in the cache, no network request is sent.

  • "server": The search is performed with a network request.

searchId Integer A unique id of the search procedure within the a plug-in’s open session. Used as a parameter for the searchPartsContinue procedure.
isContinueAvailable Boolean Indicates whether the total number of results overflows the limit parameter or not. If it's true - then the procedure can be called once more to return more results (limited by the limit parameter for the searchParts procedure).

foundItem Object Structure

Here is the structure of the foundItem object:
Field Name Type Parts Catalog API Parameter for ‘item’ Element of ‘upload_catalog’ Request Description
catalogId Integer None A unique identifier of a catalog.
itemId Integer None A unique identifier of a part within a catalog. Can be changed after catalog update.
label String label A unique identifier of a part within a catalog.
itemType String type Item type
inventoryType String None Label of a corresponding inventory type in Oracle Field Service. Can be empty if the mapping of item types to inventory types isn’t configured in the catalog schema. Mapping between itemType and inventoryType can be found in the typeSchemas field of the getPartsCatalogStructure procedure result.
fields Object fields An object (dictionary) that contains the item's fields by it's labels.
linkedItems Array linked_items Array of LinkedItem objects.
images Array images An array of strings, where each string is a URL of an image.

LinkedItem Object Structure

Here is the structure of the linkedItem object:
Field Name Type Parts Catalog API Parameter for ‘LinkedItem’ Element of ‘upload_catalog’ Request Description
id Integer None A unique identifier of a linked part within a catalog. Can be changed after catalog update.
label String label A unique identifier of a linked part within a catalog.
displayData String display_data Text comments to the linked item to be displayed in GUI.
Example of a Request
{
    "apiVersion": 1,
    "callId": "J3wa6jhKxwf6xfAZbsCdjQ==",
    "method": "callProcedure",
    "procedure": "searchPartsContinue",
    "params": {
        "searchId": 1
    }
}
Example of a Response
{
    "apiVersion": 1,
    "method": "callProcedureResult",
    "callId": "J3wa6jhKxwf6xfAZbsCdjQ==",
    "resultData": {
        "items": [
            {
                "catalogId": 3,
                "itemId": 7300,
                "label": "MU220055000",
                "itemType": "parts",
                "inventoryType": "PT",
                "linkedItems": [
                    {
                        "id": 4481,
                        "label": "CF064-67901",
                        "displayData": "0"
                    },
                    {
                        "id": 4986,
                        "label": "B2469510",
                        "displayData": "5"
                    }
                ],
                "fields": {
                    "description": "INTRACK JOGGER AY F4100-02",
                    "vendor": "KODAK",
                    "cost": "341.4693432572",
                    "price": "799.075",
                    "item_type": "NA",
                    "item_disposition": "NA"
                },
                "images": [
                    "https://example.com/picture/4.jpg",
                    "https://example.com/picture/26.jpg",
                    "https://example.com/picture/10.jpg",
                    "https://example.com/picture/8.jpg"
                ]
            },
            {
                "catalogId": 3,
                "itemId": 6337,
                "label": "B8305562",
                "itemType": "parts",
                "inventoryType": "PT",
                "linkedItems": [],
                "fields": {
                    "description": "STEPPER MOTOR DC1 .56V 3.7W",
                    "vendor": "RICOH",
                    "cost": "36.97",
                    "price": "185.7",
                    "item_type": "NA",
                    "item_disposition": "NA"
                },
                "images": [
                    "https://example.com/picture/14.jpg",
                    "https://example.com/picture/15.jpg",
                    "https://example.com/picture/4.jpg"
                ]
            }
        ],
        "isContinueAvailable": false,
        "source": "server",
        "searchId": 1
    }
}

Error handling

Examples of the error message

{
    "apiVersion": 1,
    "method": "error",
    "callId": "123abc",
    "errors": [
        {
            "type": "TYPE_PROCEDURE_ERROR",
            "code": "CODE_PROCEDURE_UNKNOWN"
        }
    ]
}
{
    "apiVersion": 1,
    "callId": "KnnXUxS7APzLBVIzY+8B0g==",
    "method": "error",
    "errors": [
        {
            "type": "TYPE_PROCEDURE_PARAM_ITEM",
            "code": "CODE_PROCEDURE_PARAM_ITEM_MANDATORY_FIELD_EMPTY",
            "procedure": "getParts",
            "paramName": "items",
            "itemId": 2,
            "itemField": "label"
        }
    ]
}