Operation: SearchResult

This request comprises an element of type vcc:SearchResultRequest which extends vct:TransactionRequestType with the following elements:

Name

Type/occurrence

Description

Name

Type/occurrence

Description

StartIndex

xsd:integer

Index of the first item to be communicated (0 as base).

Count

xsd:integer

Number of items.

ResultFormat

vcc:ResultFormatType

Format of search results.

DoNotClose

xsd:boolean?

Flag to prevent the transaction from ending automatically when the last item is returned.

The response comprises a vcc:SearchResultResponse element which extends vct:TransactionResponseType as follows:

Name

Type/occurrence

Description

Name

Type/occurrence

Description

StartIndex

xsd:integer

Index of the first communicated item (0 as base).

Count

xsd:integer

Number of communicated items.

ResultFormat

vcc:ResultFormatType

Format of search results.

cac:Item

*

Item master data.

vco:ItemDetail

*

Item master data and availability.

cac:SellersItemIdentifcation

*

Item number.

 

Rule: SearchResult

A Veloconnect-compliant server processes a SearchResult request as follows:

  • If the TransactionID submitted in the request is unknown, a SearchResultResponse with ResponseCode 420 is returned.

  • If the referenced transaction instance is not in state 2, a SearchResultResponse with ResponseCode 430 is returned.

  • The transaction context supplies the total number of hits, as well as a list of found articles; the hit list is not empty, otherwise the transaction instance would be in state 100. The start index submitted by the client is first modified as follows: If the number is negative, it is replaced with 0; if it is greater than or equal to TotalCount, it is replaced with TotalCount - 1. The number submitted via Count is then also modified as follows: If the number is negative, it is replaced with 0. If Startindex + Count > TotalCount, then Count is replaced with TotalCount - Startindex. The server can define an upper limit for Count, and replace Count with this limit if necessary. The upper limit must not be smaller than 50 or 2% of TotalCount. The current values of TotalCount, StartIndex and Count are saved in the SearchResultResponse element. The content of ResultFormat is also taken over.

  • If ResultFormat does not contain COUNT, multiple items in the hit list, beginning with Startindex (0-based), are handled as follows for Count:

    • If ITEM_DETAIL is contained in ResultFormat, an ItemDetail element is created as per Rule: GetItemDetailsList.

    • If ITEM_TYPE is contained in ResultFormat, an Item element is created from the item's master data

    • If ID_ONLY is contained in ResultFormat, the item number is used to create a SellersItemIdentification element.

  • The filled-out vcc:SearchResultResponse element is conveyed with ResponseCode 200 to the client.

  • The transaction remains in state 2 unless StartIndex + Count >= TotalCount, and the DoNotClose element in vcc:SearchResultRequest is not true.