You are on page 1of 29

Undersstandin

U ng Conffigured
d Item SStructure
C
Cloud S
SOAP WWeb Serrvice
S
Sales View and Co
omplete In
nstance View
V
ORACLE WHITE PAPER | SEPTEMBER 2017
Table of Contents

Introduction 1

Overview: 1

Web Service Call: 6

Web Service Invocation Examples: 9

Sample response for the complete item structure: 19

Sample response for the sales structure: 21

Response Attributes Explained: 21

Web Service Output Processing Examples: 24

Formatting the web service output using XSLT style sheet: 25

UNDERSTANDING CONFIGURED ITEM STRUCTURE CLOUD SOAP WEB SERVICE


Introduction
The purpose of this document is to aid the users in understanding how to use this web service to retrieve the
configured item sales structure or complete item structure. This document includes the brief functional overview of
the service and offers examples on several ways this service can be used to get the required output. This document
also explains how to construct the payloads to invoke these operations.

This document assumes that user will have knowledge of working with web services like constructing input XML
payload, invoking web services and creating web service proxy.

Overview:
This web service will be used by the consuming products to retrieve and view the options selected for the model
item as well as the configured item structure. This will include the Model reference and description, selected options
and description, and TIAs related to the selected options. Four operations will be provided as part of this service
which enables to retrieve the two types of structures requested.

This service provides four operations; findCtoSalesStructure operation is used to retrieve the sales structure of the
configured item, findCtoItemStructure operation is used to retrieve the complete item structure of the configured
item, refreshConfigStructure is used to refresh the item structure in the explosion repository and
deleteConfigStrucure will purge the item structure from the explosion repository.

Sales Structure (findCtoSalesStructure): Is the set of options, option classes and match-enabled TIAs selected
by the user at runtime.

1 | ENTER TITLE OF DOCUMENT HERE


Example: In this example we will use the following ATO model item VIK12. This model item has two child ATO’s
BRN1, OVOC.

2 | UNDERSTANDING CONFIGURED ITEM STRUCTURE CLOUD SOAP WEB SERVICE


Following are the options selected for configured item VIK12*100 while placing a sales order.



Sales structure for the Configured Item Number: VIK12*100 looks like below.

Sales structure of VIK12*100 will include the sales structure of the entire child ATOs. Assuming that BRN*11,
BSOC*2 and OVOC*30 are the configured items for the child ATOs you can see the structure of them included in
the sales structure of the VIK12*100 in the following table.

LINE_I SUB_ITEM_TYPE ITEM_NUMBE PARENT_ CONFIG QTY UOM


D R LINE_ ID ITEM
NUMER

1 ATO VIK12 1 VIK12*100 1 EA

2 ATO BRN1 1 BRN1*11 1 EA

3 OPTION CLASS FTOC 2 FTOC 1 EA

4 STD GAS 3 GAS 1 EA

5 ATO BSOC 2 BSOC*2 1 EA

6 OPTION CLASS COM 5 COM 1 EA

7 STD COMLG 6 COMLG 1 EA

8 STD GRD 6 GRD 1 EA

3 | UNDERSTANDING CONFIGURED ITEM STRUCTURE CLOUD SOAP WEB SERVICE


9 ATO OVOCVAL 1 OVOC*30 1 EA

10 OPTION CLASS OVTY 9 OVTY 1 EA

11 STD GASC 10 GASC 1 EA

12 OPTION CLASS WRM 9 WRM 1 EA

13 STD WRMGASC 12 WRMGASC 1 EA

14 OPTION CLASS FINOC 1 FINOC 1 EA

15 STD FINSS 14 FINSS 1 EA



*(Please note that this table shows only a few important attributes from the output, for the entire list of attributes refer
to the section named ‘Response Attributes Explained’)

Transactional Item Attribute (TIA):

If any match enabled transactional item attribute (TIA) is present for the item that is also returned along with the Item

LINE_ID ATTRIBUTE_NAME CHARACTER_ATTRI NUMBER_AT TIMESTAMP_


BUTE_VALUE TRIBUTE_VA ATTRIBUTE_V
LUE ALUE

7 FINISH Black ‐ ‐

Complete Item Structure (findCtoItemStructure): Is the complete structure for a configured item which includes
all the model items, selected options, mandatory components and phantom sub-assembly structure. This also
includes substitutions and Transactional item attributes for the selected components.

Example:

Assuming the same example as for sales structure, the complete instance view for VIK12*100 looks like below.

Complete Instance structure for the VIK12*100 looks like below.

LIN SUB_ITEM_TYPE ITEM_NUMBER INVENTORY_ITEM_ PARENT_L CONFIG QTY UOM WIP_SUP RootPhantomItem
E_ID ID INE_ ID ITEM_NUMBER PLY_TYP Id
E

1 ATO VIK12 100 1 VIK12*100 1 EA ‐

2 ATO BRN1 101 1 BRN1*11 1 EA ‐

3 OPTION CLASS FTOC 102 2 FTOC 1 EA ‐

4 STD GAS 103 3 GAS 1 EA ‐

5 ATO BSOC 200 2 BSOC*2 1 EA ‐

6 OPTION CLASS COM 201 5 COM 1 EA ‐

4 | UNDERSTANDING CONFIGURED ITEM STRUCTURE CLOUD SOAP WEB SERVICE


7 STD COMLG 202 6 COMLG 1 EA Phantom

8 STD CM‐BRN 203 7 CM‐BRN 1 EA Phantom 202

9 STD CM‐BRN‐BS 204 8 CM‐BRN‐BS 1 EA ‐ 202

10 STD CM‐BRN‐VAL 205 8 CM‐BRN‐VAL 1 EA ‐ 202

11 STD CM‐BCAP 206 7 CM‐BCAP 1 EA ‐ 202

12 STD GRD 207 6 GRD 1 EA ‐

13 ATO OVOC 300 1 OVOC*30 1 EA ‐

14 OPTION CLASS OVTY 301 13 OVTY 1 EA ‐

15 STD GASC 302 14 GASC 1 EA ‐

16 OPTION CLASS WRM 303 13 WRM 1 EA ‐

17 STD WRMGASC 304 16 WRMGASC 1 EA ‐

18 OPTION CLASS FINOC 104 1 FINOC 1 EA ‐

19 STD FINSS 105 18 FINSS 1 EA ‐

20 STD STVU 106 1 STVU 1 EA ‐

21 STD CLK‐Assembly 107 1 CLK‐Assembly 1 EA Phantom

22 STD CLSS 108 21 CLSS 1 EA ‐ 107

23 STD CL‐CTR 109 21 CL‐CTR 1 EA ‐ 107


Note that mandatory items STVU and CLK-Assembly under VIK12 are also included in the results. As COMLG &
CLK-Assembly are phantom items, their sub-assemblies also gets included the in the result.

Explosion Repository: Whenever complete item structure information of a configured item is requested, structure
information of that configured item is first pulled and stored in the explosion tables called explosion repository and
later information is fetched from this repository. So for this operation to return the data, it is necessary that structure
information is present in the repository. Following are the ways in which the information stored in the repository can
be refreshed.

» Passing RefreshStructure attribute value ‘true’ to the find item structure operation in the first row of the input will
force structure information in the repository will always be refreshed before fetching the data. Default value for
this attribute is ‘false’, in this case only missing structure information is pulled into the repository and existing data
in the repository will not be refreshed.
» Explosion repository can be refreshed by calling the refreshConfigStructure operation (details of refresh configure
structure operation are explained in the below section) prior to the invocation of find item structure with the same
set of input parameters as find operation. This is the preferable approach for invoking the find item structure
operation that is going to return large amount of data because structure information of the required configured
items will be readily available in the explosion repository and need not to be pulled into the repository as part of
the find operation invocation, the performance of the find operation will be improved.

5 | UNDERSTANDING CONFIGURED ITEM STRUCTURE CLOUD SOAP WEB SERVICE


Refresh Config Structure: This operation will refresh the structure of the configured items matching the input
search criteria in the explosion repository. Following are the list of parameters that can be passed as input to this
operation.
Attribute Name Type Description
ConfigItemId ** Long Item Id of the Configured Item
ConfigItemNumber ** String Item name of the Configured Item
BaseModelId ** Long The Item Id of the ATO Model
BaseModelItemNumber ** String The Item name of the ATO Model
CreationDateFrom ** Date Configured item creation date from
CreationDateTo ** Date Configured item creation date to

** Indicates at least one of the attributes is mandatory.

General use of this operation is that this will be called prior to the invocation of the find item structure so that
performance of the find operation will improve much as the structure information of the required configured items will
be readily available in the explosion repository for the find operation to retrieve and need not to be populated as part
of the find operation invocation.

Delete Config Structure: This operation will delete the structure information of the configured items matching the
input search criteria from the explosion repository. Following are the list of parameters that can be passed as input
to this operation.

This operation is used to purge the structure information of configured items that are no longer required or used from
the explosion repository.

Attribute Name Type Description
ConfigItemId ** Long Item Id of the Configured Item
ConfigItemNumber ** String Item name of the Configured Item
BaseModelId ** Long The Item Id of the ATO Model
BaseModelItemNumber ** String The Item name of the ATO Model
CreationDateFrom ** Date Configured item creation date from
CreationDateTo ** Date Configured item creation date to

** Indicates at least one of the attributes is mandatory.

Web Service Call:


Service can be launched from the browser or Soap UI or some other tool by providing the service URL as given
below.

http://hostname:port/ctoUtilitiesPublicService/ConfiguredItemService

Choose one operation from the list of operations drop down, currently four operations are available
findCtoItemStructure, findCtoSalesStructure, refreshConfigStructure and deleteConfigStructure.

Enter the payload and click on Invoke to get the response. The following section explains on how to build the
payload in detail.

6 | UNDERSTANDING CONFIGURED ITEM STRUCTURE CLOUD SOAP WEB SERVICE


Building Blocks of Payload:

1. findCriteria: The structure containing all the object and attribute filter criteria.

1.1. fetchStart and fetchSize are required. They define the number of rows in the result set plus which row to start
with.
» fetchStart: The zero-based row index to start with. The default is 0 (first row). If the value is 0 the result set
will begin with the first row of the data set. If the value is 99 the result set will begin with the 100th row of the
data set.
» fetchSize: The maximum number of rows to retrieve. A fetchSize of -1 gets all rows found, starting with the
start row (fetchStart). If fetchSize is greater than the number of remaining rows, only the remaining rows are
returned. This service has a predefined maximum fetchSize of 500 which cannot be exceeded in a single
query. If fetchSize is set to a value greater than 500 or -1, service throws an exception if there are more than
500 records matching the input criteria.
1.2. filter: The structure containing all runtime search conditions. View criteria restrict returned data to those rows
matching the defined filters. If there are no view criteria, there are no filters applied during query processing. You
can think of view criteria as a collection of one or more "query-by-example" (QBE) rows that define a data filter for a
view object. The view criteria are converted to a SQL WHERE clause.

1.2.1. conjunction: Defines how search conditions are evaluated in relation to each other (i.e. And, Or, Not,
AndNot, OrNot). Absence of a value defaults to AND behavior. For those with an ADF background, this is the
conjunction used between these view criteria and the previous view criteria, if any exist. Conjunction is case
sensitive.

1.2.2. group: The structure containing a set of runtime search/filter conditions for 1 or more attributes. For those
with an ADF background, this is the list of view criteria rows, where each row defines distinct view criteria.

1.2.2.1. conjunction: See previous definition.

1.2.2.2. item: The structure containing one runtime search condition for an attribute.

1.2.2.2.1. conjunction: See previous definition

1.2.2.2.2. upperCaseCompare: Boolean flag specifying whether the returned attribute values are converted to
uppercase before being evaluated against the filter value.

1.2.2.2.3. attribute: Case sensitive name of the object attribute to filter on. Note that the root node of a child object
is technically an attribute of the parent object.

Following are the list of filter attributes supported for complete item structure.
Attribute Name Type Description
ConfigItemId ** Long Item Id of the Configured Item
ConfigItemNumber ** String Item name of the Configured Item
BaseModelId ** Long The Item Id of the ATO Model
BaseModelItemNumber ** String The Item name of the ATO Model
CreationDate ** Date Date of Configured Item Creation
OrganizationId Big Decimal Organization id of Configured Item
OrganizationCode String Organization Code of Configured Item
EffectiveAsOfDate Date Effective date of the Configured item

7 | UNDERSTANDING CONFIGURED ITEM STRUCTURE CLOUD SOAP WEB SERVICE


RefreshStructure Boolean True/false, indicating whether the
structure present in explosion repository
to be refreshed or not. Default value is
‘false’

Following are the list of filter attributes supported for sales item structure.
Attribute Name Type Description
ConfigItemId ** Long Item Id of the Configured Item
ConfigItemNumber ** String Item name of the Configured Item
BaseModelId ** Long The Item Id of the ATO Model
BaseModelItemNumber ** String The Item name of the ATO Model
CreationDate ** Date Date of Configured Item Creation

** Indicates at least one of the attributes is mandatory. An error will be thrown if none of the required attributes are
used in the search criteria.

An error will be thrown if any other attributes is used for this field.

1.2.2.2.4 operator: =, >=, <=, >, <,<>, ISBLANK, ISNOTBLANK, CONTAINS, STARTSWITH, AFTER,
ONORAFTER, BEFORE, ONORBEFORE, BETWEEN, NOTBETWEEN. Not all available operators will work
against all attribute types (e.g. String, Integer, Date etc). Note that the numeric comparison operators (=,< etc)
generally work against String fields. Operator is case sensitive.

Only following operators are allowed for the mandatory attributes of the complete item structure
Attribute Name Operator Supported
ConfigItemId ** =
ConfigItemNumber ** =
BaseModelId ** =
BaseModelItemNumber ** =
CreationDate ** BETWEEN

There is no restriction on the operators for the non-mandatory attributes of the complete item structure and attributes
of sales structure.

1.2.2.2.5. value: The attribute filter criteria which can include a non-leading '%' wildcard (e.g. Foo%).

1.3. sortOrder: The structure containing directives for sorting the result set in ascending or descending order.

1.4. findAttribute: Specifies the subset of attributes to retrieve when the search/filter criteria is satisfied. When none
is specified, all attributes are fetched. When specified, only those are returned. Note that a child object is technically
an attribute of the parent object.

1.5. excludeAttribute: Boolean flag. When True, attributes defined by findAttribute declarations are not returned.

2. findControl: The structure defining whether or not to retrieve all translations of attributes if they exist. This is a
global parameter affecting the entire result set

Following is the key point to note for findCtoItemStructure operation:

8 | UNDERSTANDING CONFIGURED ITEM STRUCTURE CLOUD SOAP WEB SERVICE


» When a non-zero value is passed for fetch start, the service will assume the configured item to be already
available in the explosion repository, and will retrieve the records based on the starting row value provided in the
fetch start. So it is mandatory to call either find item structure by passing fetch start as ‘zero’ or call the refresh
config structure prior to making such call.

Web Service Invocation Examples:


Scenario 1: Querying for the records based on simple condition

Following is the payload for retrieving complete instance structure for the Configured Item Number VIK12*100

<ns1:findCtoItemStructure
xmlns:ns1="http://xmlns.oracle.com/apps/scm/cto/matchRepository/utilities/configItemStructureService/types/"
>
<ns1:findCriteria xmlns:ns2="http://xmlns.oracle.com/adf/svc/types/">
<ns2:fetchStart>0</ns2:fetchStart> ‐‐ start at index 0
<ns2:fetchSize>‐1</ns2:fetchSize> ‐‐ Indicates all the rows should be returned
<ns2:filter>
<ns2:conjunction>And</ns2:conjunction>
<ns2:group>
<ns2:conjunction>And</ns2:conjunction>
<ns2:upperCaseCompare/>
<ns2:item>
<ns2:conjunction>And</ns2:conjunction>
<ns2:upperCaseCompare/>
<ns2:attribute>ConfigItemNumber</ns2:attribute> ‐‐ Condition is Based on ConfigItemNumber
<ns2:operator>=</ns2:operator>
<ns2:value>VIK12*100</ns2:value> ‐‐ Configured Item Number Value
</ns2:item>
</ns2:group>
<ns2:nested/>
</ns2:filter>
<ns2:excludeAttribute/>
</ns1:findCriteria>
<ns1:findControl xmlns:ns2="http://xmlns.oracle.com/adf/svc/types/">
<ns2:retrieveAllTranslations/>
</ns1:findControl>
</ns1:findCtoItemStructure>


Scenario 2: Passing multiple conditions & filtering the output

Following is the payload for retrieving complete item structure for all the configured items created between ’09-Dec-
2012’ and ‘ 09-Dec-2015’ with base model item VIK12. This example also tells us how to remove/exclude certain
attributes from the response.

In this example the item element is repeated. Item elements are used to specify runtime search conditions for
attributes. Item elements are child structures within a group container. There can be multiple item elements within
the group container.

<ns1:
findCtoItemStructurexmlns:ns1="http://xmlns.oracle.com/apps/scm/cto/matchRepository/utilities/configItemStr
uctureService/types/">
<ns1:findCriteria xmlns:ns2="http://xmlns.oracle.com/adf/svc/types/">

9 | UNDERSTANDING CONFIGURED ITEM STRUCTURE CLOUD SOAP WEB SERVICE


<ns2:fetchStart>0</ns2:fetchStart>
<ns2:fetchSize>‐1</ns2:fetchSize>
<ns2:filter>
<ns2:conjunction>And</ns2:conjunction>
<ns2:group>
<ns2:conjunction>And</ns2:conjunction>
<ns2:upperCaseCompare></ns2:upperCaseCompare>
<ns2:item>
<ns2:conjunction>And</ns2:conjunction>
<ns2:upperCaseCompare></ns2:upperCaseCompare>
<ns2:attribute>CreationDate</ns2:attribute>
<ns2:operator>between</ns2:operator>
<ns2:value>2015‐10‐09</ns2:value> ‐‐Date value needs to be given in the ‘YYYY‐MM‐DD’ format
<ns2:value>2015‐12‐09</ns2:value>
</ns2:item>
<ns2:item>
<ns2:conjunction>And</ns2:conjunction>
<ns2:upperCaseCompare></ns2:upperCaseCompare>
<ns2:attribute> BaseModelItemNumber </ns2:attribute>
<ns2:operator>CONTAINS</ns2:operator>
<ns2:value>VIK12</ns2:value>
</ns2:item>
</ns2:group>
</ns2:filter>
<ns2:findAttribute>InventoryItemId</ns2:findAttribute> ‐‐‐ List of attributes to be excluded/Included in the
response
<ns2:findAttribute>ParentInventoryItemId</ns2:findAttribute>
<ns2:excludeAttribute>true</ns2:excludeAttribute> ‐‐ Flag indicates whether attribute should be
include/excluded in the response
</ns1:findCriteria>

</ns1: findCtoItemStructure>

In the above example attributes InventoryItemId, ParentInventoryItemId are specified to be excluded from the
response.

Scenario 3: Passing multiple conditions with RefreshStructure attribute value true.

Following is the payload for refreshing the explosion repository & retrieving complete item structure for all the
configured items created between ’09-Dec-2012’ and ‘ 09-Dec-2015’ with base model item VIK12. The payload also
contains the Refresh Structure attribute with the value ‘true’, so the structure information for all the matched
configured items will be refreshed in the explosion repository before the actual query.

<ns1:
findCtoItemStructurexmlns:ns1="http://xmlns.oracle.com/apps/scm/cto/matchRepository/utilities/configItemStr
uctureService/types/">
<ns1:findCriteria xmlns:ns2="http://xmlns.oracle.com/adf/svc/types/">
<ns2:fetchStart>0</ns2:fetchStart>
<ns2:fetchSize>‐1</ns2:fetchSize>
<ns2:filter>
<ns2:conjunction>And</ns2:conjunction>
<ns2:group>
<ns2:conjunction>And</ns2:conjunction>
<ns2:upperCaseCompare></ns2:upperCaseCompare>
<ns2:item>
<ns2:conjunction>And</ns2:conjunction>

10 | UNDERSTANDING CONFIGURED ITEM STRUCTURE CLOUD SOAP WEB SERVICE


<ns2:upperCaseCompare></ns2:upperCaseCompare>
<ns2:attribute>CreationDate</ns2:attribute>
<ns2:operator>between</ns2:operator>
<ns2:value>2015‐10‐09</ns2:value> ‐‐Date value needs to be given in the ‘YYYY‐MM‐DD’ format
<ns2:value>2015‐12‐09</ns2:value>
</ns2:item>
<ns2:item>
<ns2:conjunction>And</ns2:conjunction>
<ns2:upperCaseCompare></ns2:upperCaseCompare>
<ns2:attribute> BaseModelItemNumber </ns2:attribute>
<ns2:operator>CONTAINS</ns2:operator>
<ns2:value>VIK12</ns2:value>
</ns2:item>
<ns2:item>
<ns2:conjunction>And</ns2:conjunction>
<ns2:upperCaseCompare></ns2:upperCaseCompare>
<ns2:attribute> RefreshStructure </ns2:attribute> ‐‐true/false need to be passed for this attribute
<ns2:operator>=</ns2:operator>
<ns2:value>true</ns2:value>
</ns2:item>

</ns2:group>
</ns2:filter>
</ns1:findCriteria>

</ns1: findCtoItemStructure>

Scenario 4: Invoking service for the large structures

The service has to be called multiple times in a loop for retrieving larger structures which are expected to have more
than 500 rows in the response by modifying the fetch start and size appropriately.

Following are the payloads for retrieving the complete item structure for all the configured items created within the
given date range. Assuming that response contains 690 rows( > 500 rows which is the pre-defined limit of maximum
number of rows that service can retrieve), the service has to be invoked twice by passing fetch start and fetch size
appropriately.

In the first invocation we will be retrieving the first 500 rows by passing fetch start as ‘0’ and fetch size as 500. In the
second invocation we will be retrieving the rows from 500 to 690 by passing the fetch start as 500.

First Invocation:

<ns1:findCtoItemStructure
xmlns:ns1="http://xmlns.oracle.com/apps/scm/cto/matchRepository/utilities/configItemStructureService/types/"
>
<ns1:findCriteria xmlns:ns2="http://xmlns.oracle.com/adf/svc/types/">
<ns2:fetchStart>0</ns2:fetchStart>
<ns2:fetchSize>500</ns2:fetchSize>
<ns2:filter>
<ns2:conjunction>And</ns2:conjunction>
<ns2:group>
<ns2:conjunction>And</ns2:conjunction>
<ns2:upperCaseCompare/>
<ns2:item>
<ns2:conjunction>And</ns2:conjunction>
<ns2:upperCaseCompare/>
<ns2:attribute>CreationDate</ns2:attribute>

11 | UNDERSTANDING CONFIGURED ITEM STRUCTURE CLOUD SOAP WEB SERVICE


<ns2:operator>BETWEEN</ns2:operator>
<ns2:value>2014‐12‐09</ns2:value>
<ns2:value>2015‐12‐09</ns2:value>
</ns2:item>
</ns2:group>
</ns2:filter>
<ns2:excludeAttribute/>
</ns1:findCriteria>
<ns1:findControl xmlns:ns2="http://xmlns.oracle.com/adf/svc/types/">
<ns2:retrieveAllTranslations/>
</ns1:findControl>
</ns1:findCtoItemStructure>

Second Invocation:

<ns1:findCtoItemStructure
xmlns:ns1="http://xmlns.oracle.com/apps/scm/cto/matchRepository/utilities/configItemStructureService/types/"
>
<ns1:findCriteria xmlns:ns2="http://xmlns.oracle.com/adf/svc/types/">
<ns2:fetchStart>500</ns2:fetchStart>
<ns2:fetchSize>500</ns2:fetchSize>
<ns2:filter>
<ns2:conjunction>And</ns2:conjunction>
<ns2:group>
<ns2:conjunction>And</ns2:conjunction>
<ns2:upperCaseCompare/>
<ns2:item>
<ns2:conjunction>And</ns2:conjunction>
<ns2:upperCaseCompare/>
<ns2:attribute>CreationDate</ns2:attribute>
<ns2:operator>BETWEEN</ns2:operator>
<ns2:value>2014‐12‐09</ns2:value>
<ns2:value>2015‐12‐09</ns2:value>
</ns2:item>
</ns2:group>
</ns2:filter>
<ns2:excludeAttribute/>
</ns1:findCriteria>
<ns1:findControl xmlns:ns2="http://xmlns.oracle.com/adf/svc/types/">
<ns2:retrieveAllTranslations/>
</ns1:findControl>
</ns1:findCtoItemStructure>

* As the second invocation is made with fetch start value greater than zero, neither structure information is refreshed
nor the missing item information is pulled into the repository, so the first call with fetch start as zero is mandatory
when making multiple calls to retrieve larger structures.

Scenario 5: Refresh Config Structure prior to find Item structure for larger structures

If findItemStructure is directly called for larger structures it may take lot of time to retrieve the data as it has to
refresh & pull the structure information into the explosion repository before querying for the data. To avoid this
scenario we should invoke refresh config structure operation prior to invoking the find item structure with the same
input parameter values, so when the find item structure operation is called later the required structure information
will be readily available in the explosion repository and performance of the find operation will be much better.
Sample payload for this scenario is given below.

12 | UNDERSTANDING CONFIGURED ITEM STRUCTURE CLOUD SOAP WEB SERVICE


refreshConfigStructure Invocation:

<ns1:refreshConfigStructure
xmlns:ns1="http://xmlns.oracle.com/apps/scm/cto/matchRepository/utilities/configItemStructureService/types/"
>
<ns1:configList
xmlns:ns2="http://xmlns.oracle.com/apps/scm/cto/matchRepository/utilities/configItemStructureService/">
<ns2:CreationDateFrom>2014‐12‐09</ns2:CreationDateFrom>
<ns2:CreationDateTo>2015‐12‐09</ns2:CreationDateTo>
</ns1:configList>
</ns1:refreshConfigStructure>

findItemStructure Invocation:

<ns1:findCtoItemStructure
xmlns:ns1="http://xmlns.oracle.com/apps/scm/cto/matchRepository/utilities/configItemStructureService/types/"
>
<ns1:findCriteria xmlns:ns2="http://xmlns.oracle.com/adf/svc/types/">
<ns2:fetchStart>0</ns2:fetchStart>
<ns2:fetchSize>500</ns2:fetchSize>
<ns2:filter>
<ns2:conjunction>And</ns2:conjunction>
<ns2:group>
<ns2:conjunction>And</ns2:conjunction>
<ns2:upperCaseCompare/>
<ns2:item>
<ns2:conjunction>And</ns2:conjunction>
<ns2:upperCaseCompare/>
<ns2:attribute>CreationDate</ns2:attribute>
<ns2:operator>BETWEEN</ns2:operator>
<ns2:value>2014‐12‐09</ns2:value>
<ns2:value>2015‐12‐09</ns2:value>
</ns2:item>
</ns2:group>
</ns2:filter>
<ns2:excludeAttribute/>
</ns1:findCriteria>
<ns1:findControl xmlns:ns2="http://xmlns.oracle.com/adf/svc/types/">
<ns2:retrieveAllTranslations/>
</ns1:findControl>
</ns1:findCtoItemStructure>

Scenario 6: Grouping conditions

This example shows how to retrieve the complete instance structure of all the configured items created between ’09-
Dec-2012’ and ‘ 09-Dec-2015’ or with base model item VIK12.

<ns1:findCtoItemStructure
xmlns:ns1="http://xmlns.oracle.com/apps/scm/cto/matchRepository/utilities/configItemStructureService/types/"
>
<ns1:findCriteria xmlns:ns2="http://xmlns.oracle.com/adf/svc/types/">
<ns2:fetchStart>0</ns2:fetchStart>
<ns2:fetchSize>500</ns2:fetchSize>
<ns2:filter>
<ns2:conjunction>And</ns2:conjunction>
<ns2:group>
<ns2:conjunction>And</ns2:conjunction>

13 | UNDERSTANDING CONFIGURED ITEM STRUCTURE CLOUD SOAP WEB SERVICE


<ns2:upperCaseCompare/>
<ns2:item>
<ns2:conjunction>And</ns2:conjunction>
<ns2:upperCaseCompare/>
<ns2:attribute>CreationDate</ns2:attribute>
<ns2:operator>BETWEEN</ns2:operator>
<ns2:value>2014‐12‐09</ns2:value>
<ns2:value>2015‐12‐09</ns2:value>
</ns2:item>
</ns2:group>
<ns2:group>
<ns2:conjunction>Or</ns2:conjunction> ‐‐ Group with the OR condition
<ns2:upperCaseCompare/>
<ns2:item>
<ns2:conjunction>And</ns2:conjunction>
<ns2:upperCaseCompare/>
<ns2:attribute>BaseModelItemNumber</ns2:attribute>
<ns2:operator>=</ns2:operator>
<ns2:value>VIK12</ns2:value>
</ns2:item>
</ns2:group>
</ns2:filter>
<ns2:excludeAttribute/>
</ns1:findCriteria>
<ns1:findControl xmlns:ns2="http://xmlns.oracle.com/adf/svc/types/">
<ns2:retrieveAllTranslations/>
</ns1:findControl>
</ns1:findCtoItemStructure>

Scenario 7: Filtering transactional attribute information

This example shows how to retrieve the complete item structure for the configured item VIK12*100 and only show
TIA information which has the attribute name starts with MFG_Transactional_Attributes and attribute’s value is
‘Black’

<ns1:findCtoItemStructure>
<ns1:findCriteria>
<ns2:fetchStart>0</ns2:fetchStart>
<ns2:fetchSize>‐1</ns2:fetchSize>
<ns2:filter>
<ns2:conjunction>And</ns2:conjunction>
<ns2:group>
<ns2:conjunction>And</ns2:conjunction>
<ns2:upperCaseCompare>false</ns2:upperCaseCompare>
<ns2:item>
<ns2:conjunction>And</ns2:conjunction>
<ns2:upperCaseCompare>false</ns2:upperCaseCompare>
<ns2:attribute>ConfigItemNumber</ns2:attribute>
<ns2:operator>=</ns2:operator>
<ns2:value>VIK12*100</ns2:value>
</ns2:item>
</ns2:group>
</ns2:filter>
<ns2:childFindCriteria> ‐‐ This is the structure for adding conditions based on TIA
<ns2:fetchStart>0</ns2:fetchStart>
<ns2:fetchSize>‐1</ns2:fetchSize>
<ns2:filter>

14 | UNDERSTANDING CONFIGURED ITEM STRUCTURE CLOUD SOAP WEB SERVICE


<ns2:conjunction>And</ns2:conjunction>
<ns2:group>
<ns2:conjunction>And</ns2:conjunction>
<ns2:upperCaseCompare>false</ns2:upperCaseCompare>
<ns2:item>
<ns2:conjunction>And</ns2:conjunction>
<ns2:upperCaseCompare>false</ns2:upperCaseCompare>
<ns2:attribute>AttributeName</ns2:attribute>
<ns2:operator>STARTSWITH</ns2:operator>
<ns2:value>MFG_Transactional_Attributes</ns2:value>
</ns2:item>
<ns2:item>
<ns2:conjunction>And</ns2:conjunction>
<ns2:upperCaseCompare>false</ns2:upperCaseCompare>
<ns2:attribute>CharacterAttributeValue</ns2:attribute>
<ns2:operator>=</ns2:operator>
<ns2:value>Black</ns2:value>
</ns2:item>


</ns2:group>
</ns2:filter>
<ns2:childFindCriteria/>
<ns2:childAttrName>CtoTransactionAttr</ns2:childAttrName> ‐‐ This value is fixed and needs to be passed if we
want filter based on the TIA
</ns2:childFindCriteria>
</ns1:findCriteria>
<ns1:findControl>
<ns2:retrieveAllTranslations>false</ns2:retrieveAllTranslations>
</ns1:findControl>
</ns1:findCtoItemStructure>

Scenario 8: Retrieving complete item structure for the configured items based on TIA filter

Following payload retrieves the complete item structure for all the configured items which are created between 09-
DEC-2012 and 09-DEC-2016 and having the Transaction item attribute with name ‘SCO_color’ and value is ‘Black’.

To achieve this user has to invoke the service twice, in the first invocation we will find all the configured items
matching the above filter criteria and we should invoke the service for the second time with the returned values (ex:
ConfigItemNumber) from first invocation as the parameters.

First Invocation:

<ns1:findCtoItemStructure >
<ns1:findCriteria xmlns:ns2="http://xmlns.oracle.com/adf/svc/types/">
<ns2:fetchStart>0</ns2:fetchStart>
<ns2:fetchSize>500</ns2:fetchSize>
<ns2:filter>
<ns2:conjunction>And</ns2:conjunction>
<ns2:group>
<ns2:conjunction>And</ns2:conjunction>
<ns2:upperCaseCompare>false</ns2:upperCaseCompare>
<ns2:item>
<ns2:conjunction>And</ns2:conjunction>
<ns2:upperCaseCompare>false</ns2:upperCaseCompare>
<ns2:attribute>CreationDate</ns2:attribute>
<ns2:operator>BETWEEN</ns2:operator>

15 | UNDERSTANDING CONFIGURED ITEM STRUCTURE CLOUD SOAP WEB SERVICE


<ns2:value>2012‐12‐09</ns2:value>
<ns2:value>2016‐12‐09</ns2:value>
</ns2:item>
<ns2:item> ‐‐This block contains the logic for filtering configured items based on TIA
<ns2:conjunction>And</ns2:conjunction>
<ns2:upperCaseCompare>false</ns2:upperCaseCompare>
<ns2:attribute>CtoTransactionAttr</ns2:attribute>
<ns2:operator>Exists</ns2:operator>
<ns2:nested>
<ns2:group>
<ns2:conjunction>And</ns2:conjunction>
<ns2:upperCaseCompare>false</ns2:upperCaseCompare>
<ns2:item>
<ns2:conjunction>And</ns2:conjunction>
<ns2:upperCaseCompare>false</ns2:upperCaseCompare>
<ns2:attribute>AttributeName</ns2:attribute>
<ns2:operator>=</ns2:operator>
<ns2:value>SCO_Color</ns2:value>
</ns2:item>
<ns2:item>
<ns2:conjunction>And</ns2:conjunction>
<ns2:upperCaseCompare>false</ns2:upperCaseCompare>
<ns2:attribute>CharacterAttributeValue</ns2:attribute>
<ns2:operator>=</ns2:operator>
<ns2:value>Black</ns2:value>
</ns2:item>
</ns2:group>
</ns2:nested>
</ns2:item>
</ns2:group>
</ns2:filter>
<ns2:excludeAttribute/>
</ns1:findCriteria>
</ns1:findCtoItemStructure>

Second Invocation:

<ns1:findCtoItemStructure
xmlns:ns1="http://xmlns.oracle.com/apps/scm/cto/matchRepository/utilities/configItemStructureService/types/"
>
<ns1:findCriteria xmlns:ns2="http://xmlns.oracle.com/adf/svc/types/">
<ns2:fetchStart>0</ns2:fetchStart> ‐‐ start at index 0
<ns2:fetchSize>‐1</ns2:fetchSize> ‐‐ Indicates all the rows should be returned
<ns2:filter>
<ns2:conjunction>And</ns2:conjunction>
<ns2:group>
<ns2:conjunction>And</ns2:conjunction>
<ns2:upperCaseCompare/>
<ns2:item> ‐‐ This block has to be repeated for all the configured items returned from the previous call
<ns2:conjunction>And</ns2:conjunction>
<ns2:upperCaseCompare/>
<ns2:attribute>ConfigItemNumber</ns2:attribute> ‐‐ Condition is Based on ConfigItemNumber
<ns2:operator>=</ns2:operator>
<ns2:value>VIK12*100</ns2:value> ‐‐ Configured Item Number returned from the previous call
</ns2:item>
</ns2:group>
<ns2:nested/>

16 | UNDERSTANDING CONFIGURED ITEM STRUCTURE CLOUD SOAP WEB SERVICE


</ns2:filter>
<ns2:excludeAttribute/>
</ns1:findCriteria>
</ns1:findCtoItemStructure>


Scenario 9: Purge the item structure information.

Delete config structure operation can be invoked to purge the structure information of unused configured items from
the repository. Following is the payload for removing the structure of all the configured items with base model item
number value as ‘VIK12’ from the repository.

<ns1:deleteConfigStructure
xmlns:ns1="http://xmlns.oracle.com/apps/scm/cto/matchRepository/utilities/configItemStructureService/types/"
>
<ns1:configList
xmlns:ns2="http://xmlns.oracle.com/apps/scm/cto/matchRepository/utilities/configItemStructureService/">
<ns2:BaseModelItemNumber>VIK12</ns2:BaseModelItemNumber>
</ns1:configList>
</ns1:deleteConfigStructure>

Invoking service through web service-proxy:

Once the proxy for web service is created, we can use java code similar to the following code snippet to invoke the
service using proxy by passing the filter criteria as the input.

Scenario 1: Retrieving complete item structure based on simple condition using proxy

The following code queries complete item structure for all the configured items created between 09-Dec-2011 and
09-Dec-2018. The service was called in a loop. Each iteration will call the service with fetch size of 500. Loop will be
exited if the number of records fetched is less than 500.

ObjectFactory obj = new ObjectFactory();


ViewCriteriaRow vcr = obj.createViewCriteriaRow();
ViewCriteria vc = obj.createViewCriteria();
ViewCriteriaItem vci = obj.createViewCriteriaItem();
vci.setAttribute("CreationDate");
vci.getValue().add("2011‐12‐09");
vci.getValue().add("2018‐12‐09");
vci.setOperator("BETWEEN");
vci.setConjunction(Conjunction.AND);
vcr.getItem().add(vci);
vc.setConjunction(Conjunction.AND);
vc.getGroup().add(vcr);
FindCriteria fc = obj.createFindCriteria();

fc.setFilter(vc);
int fetchCounter=0;
List<CtoItemStructure> opList=new ArrayList<CtoItemStructure>; ‐‐List for storing all the output records
List<CtoItemStructure> opTempList=null; ‐‐ List for storing the result of one service call
while(opTempList ==null || opTempList.size()==500)
{
fc.setFetchStart(fetchCounter);

17 | UNDERSTANDING CONFIGURED ITEM STRUCTURE CLOUD SOAP WEB SERVICE


fc.setFetchSize(500);
opTempList = ctoConfigItemService.findCtoItemStructure(fc, null);
opList.addAll(opTempList); ‐‐ items of result list from the service call be will be added to the final list
fetchCounter = fetchCounter +500;
}
Scenario 2: Retrieving complete item structure for the configured items based on TIA filter using proxy.

Following code retrieves the complete item structure for all the configured items which are created between 09-
DEC-2012 and 09-DEC-2016 and having the Transaction item attribute with name ‘SCO_color’ and value is ‘Black’.

//Code Block for finding the list of Configured Items based on TIA filter‐Starts
ObjectFactory obj = new ObjectFactory();
ViewCriteriaRow vcr = obj.createViewCriteriaRow();
ViewCriteria vc = obj.createViewCriteria();
ViewCriteriaItem vci = obj.createViewCriteriaItem();
vci.setAttribute("CreationDate");
vci.getValue().add("2012‐12‐09");
vci.getValue().add("2016‐12‐09");
vci.setOperator("BETWEEN");
vci.setConjunction(Conjunction.AND);
vcr.getItem().add(vci);

//Code Block for setting TIA filter criteria‐Starts
ViewCriteriaItem childExistsItem = obj.createViewCriteriaItem();
childExistsItem.setAttribute("CtoTransactionAttr");
childExistsItem.setOperator("EXISTS");
childExistsItem.setConjunction(Conjunction.AND);
vcr.getItem().add(childExistsItem);
vc.setConjunction(Conjunction.AND);
ViewCriteriaRow childCriteriaRow = obj.createViewCriteriaRow();
ViewCriteria childCriteria= obj.createViewCriteria();
ViewCriteriaItem childCriteriaItem = obj.createViewCriteriaItem();
childCriteriaItem.setAttribute("AttributeName");
childCriteriaItem.getValue().add("SCO_Color");
childCriteriaItem.setOperator("=");
childCriteriaItem.setConjunction(Conjunction.AND);
childCriteriaRow.getItem().add(childCriteriaItem);
childCriteriaItem = obj.createViewCriteriaItem();
childCriteriaItem.setAttribute("CharacterAttributeValue");
childCriteriaItem.getValue().add("Black");
childCriteriaItem.setOperator("=");
childCriteriaItem.setConjunction(Conjunction.AND);
childCriteriaRow.getItem().add(childCriteriaItem);
childCriteria.getGroup().add(childCriteriaRow);
childExistsItem.setNested(childCriteria);
vc.getGroup().add(vcr);
//Code Block for setting TIA filter criteria‐Ends

//Code for the first Inovcation‐starts
FindCriteria fc = obj.createFindCriteria();
fc.setFilter(vc);
int counter=0;
List<CtoItemStructure> configItemList=new ArrayList<CtoItemStructure>(); //List for holding
the output from the first service call
List<CtoItemStructure> opTempList=null;
while(opTempList==null || opTempList.size()==500)
{

18 | UNDERSTANDING CONFIGURED ITEM STRUCTURE CLOUD SOAP WEB SERVICE


fc.setFetchStart(counter);
fc.setFetchSize(500);
opTempList= ctoConfigItemService.findCtoItemStructure(fc, null);
counter=counter+500;
configItemList.addAll(opTempList);

}
//Code for the first Inovcation‐Ends
//Code Block for finding the list of Configured Items based on TIA filter‐Ends

//Code Block for finding the complete item structure for all the configured item returned from the
previous service call ‐‐Starts
ViewCriteriaRow configVcr = obj.createViewCriteriaRow();
ViewCriteria configVc = obj.createViewCriteria();
ViewCriteriaItem configVci =null;
for(CtoItemStructure itemStructRow:configItemList) //For loop to iterate through the list of
configured items
{
if(itemStructRow.getSubItemType().getValue().intValue()==1) // if it is a config item create
condition based on config item id
{
configVci = obj.createViewCriteriaItem();
configVci.setAttribute("ConfigItemId");
configVci.getValue().add(itemStructRow.getConfigItemId().getValue());

configVci.setOperator("=");
configVci.setConjunction(Conjunction.OR);
configVcr.getItem().add(configVci);

}
}
configVc.getGroup().add(configVcr);
//Code for the second Inovcation‐starts
FindCriteria configFc = obj.createFindCriteria();
configFc.setFilter(configVc);
counter=0;
List<CtoItemStructure> opList=new ArrayList<CtoItemStructure>(); //List for storing the final output
opTempList=null;
while(opTempList==null || opTempList.size()==500)
{
configFc.setFetchStart(counter);
configFc.setFetchSize(500);
opTempList= ctoConfigItemService.findCtoItemStructure(configFc, null);
counter=counter+500;
opList.addAll(opTempList);
}
//Code for the second Inovcation‐Ends
//Code Block for finding the complete item structure for all the configured item returned from the
previous service call ‐‐Ends

Sample response for the complete item structure:


<ns0:findCtoItemStructureResponse
xmlns:ns0="http://xmlns.oracle.com/apps/scm/cto/matchRepository/utilities/configItemStructureService/ty
pes/">
<ns2:result

19 | UNDERSTANDING CONFIGURED ITEM STRUCTURE CLOUD SOAP WEB SERVICE


xmlns:ns2="http://xmlns.oracle.com/apps/scm/cto/matchRepository/utilities/configItemStructureService/ty
pes/"
xmlns:ns1="http://xmlns.oracle.com/apps/scm/cto/matchRepository/utilities/configItemStructureService/"
xmlns:ns0="http://xmlns.oracle.com/adf/svc/types/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:type="ns1:CtoItemStructure">
<ns1:ConfigItemId>300100071637243</ns1:ConfigItemId>
<ns1:ConfigItemNumber>DOS-BAT-CTO*101*</ns1:ConfigItemNumber>
<ns1:BaseModelId>100100035462338</ns1:BaseModelId>
<ns1:BaseModelItemNumber>DOS-BAT-CTO</ns1:BaseModelItemNumber>
<ns1:InventoryItemId>300100071637243</ns1:InventoryItemId>
<ns1:InventoryItemNumber>DOS-BAT-CTO*101*</ns1:InventoryItemNumber>
<ns1:ParentInventoryItemId>300100071637243</ns1:ParentInventoryItemId>
<ns1:ParentInventoryItemNumber>DOS-BAT-CTO*101*</ns1:ParentInventoryItemNumber>
<ns1:HeaderId>300100071637281</ns1:HeaderId>
<ns1:LineId>300100071637284</ns1:LineId>
<ns1:ParentLineId
xsi:nil="true"/>
<ns1:SubItemType>1</ns1:SubItemType>
<ns1:UnitQuantity
xmlns:tns="http://xmlns.oracle.com/adf/svc/errors/"
unitCode="Ea">1</ns1:UnitQuantity>
<ns1:UnitUOM>Ea</ns1:UnitUOM>
<ns1:CreationDate>2015-12-02T10:59:08.119+05:30</ns1:CreationDate>
<ns1:RevisionId
xsi:nil="true"/>
<ns1:EffectivityDate>2015-12-02T10:59:08.119+05:30</ns1:EffectivityDate>
<ns1:DisableDate
xsi:nil="true"/>
<ns1:OrganizationId>204</ns1:OrganizationId>
<ns1:OrganizationCode>V1</ns1:OrganizationCode>
<ns1:BillSequenceId>300100046112964</ns1:BillSequenceId>
<ns1:ComponentSequenceId
xsi:nil="true"/>
<ns1:ComponentType>1</ns1:ComponentType>
<ns1:WIPSupplyType
xsi:nil="true"/>
<ns1:OptionalComponent>Y</ns1:OptionalComponent>
<ns1:SubstituteComponent>N</ns1:SubstituteComponent>
<ns1:ComponentYieldFactor
xsi:nil="true"/>
<ns1:PlanningFactor
xsi:nil="true"/>
<ns1:RoundingDirection
xsi:nil="true"/>
<ns1:BasisType
xsi:nil="true"/>
<ns1:CheckATP
xsi:nil="true"/>
<ns1:ComponentHierarchy>300100046112964</ns1:ComponentHierarchy>
<ns1:ComponentItemHierarchy>300100071637243</ns1:ComponentItemHierarchy>
<ns1:ItemClassId>100000011369001</ns1:ItemClassId>
<ns1:RootPhantomItemId></ns1:RootPhantomItemId>
</ns2:result>
<ns2:result> … </ns2:result>
<ns2:result> … </ns2:result>
….

20 | UNDERSTANDING CONFIGURED ITEM STRUCTURE CLOUD SOAP WEB SERVICE


</ns0:findCtoItemStructureResponse>

Sample response for the sales structure:


<ns2:result xsi:type="ns1:CtoSalesStructure"
xmlns:ns2="http://xmlns.oracle.com/apps/scm/cto/matchRepository/utilities/configItemStructureService/types
/" xmlns:ns1="http://xmlns.oracle.com/apps/scm/cto/matchRepository/utilities/configItemStructureService/"
xmlns:ns0="http://xmlns.oracle.com/adf/svc/types/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance">
<ns1:ConfigItemId>300100090366280</ns1:ConfigItemId>
<ns1:ConfigItemNumber>BSOC*220*</ns1:ConfigItemNumber>
<ns1:BaseModelId>300100032201662</ns1:BaseModelId>
<ns1:BaseModelItemNumber>BSOC</ns1:BaseModelItemNumber>
<ns1:InventoryItemId>300100032201442</ns1:InventoryItemId>
<ns1:InventoryItemNumber>STD-Burner</ns1:InventoryItemNumber>
<ns1:ParentInventoryItemId>300100090366280</ns1:ParentInventoryItemId>
<ns1:ParentInventoryItemNumber>BSOC*220*</ns1:ParentInventoryItemNumber>
<ns1:HeaderId>300100090366310</ns1:HeaderId>
<ns1:LineId>300100090366315</ns1:LineId>
<ns1:ParentLineId>300100090366312</ns1:ParentLineId>
<ns1:SubItemType>2</ns1:SubItemType>
<ns1:UnitQuantity unitCode="Ea"
xmlns:tns="http://xmlns.oracle.com/adf/svc/errors/">1</ns1:UnitQuantity>
<ns1:UnitUOM>Ea</ns1:UnitUOM>
<ns1:ItemHierarchy>/300100090366280/300100032201442</ns1:ItemHierarchy>
<ns1:CreationDate>2016-10-05T06:49:45.836-07:00</ns1:CreationDate>
<ns1:RootHeaderId>300100090366310</ns1:RootHeaderId>
<ns1:CtoTransactionAttr>
<ns1:LineId>300100090366315</ns1:LineId>
<ns1:TimestampAttributeValue xsi:nil="true"/>
<ns1:NumberAttributeValue>0</ns1:NumberAttributeValue>
<ns1:DateAttributeValue xsi:nil="true"/>
<ns1:CharacterAttributeValue xsi:nil="true"/>
<ns1:AttributeName>Number</ns1:AttributeName>
</ns1:CtoTransactionAttr>
</ns2:result>

Response Attributes Explained:


Sales Structure Response:
Attribute Name Type Description
ConfigItemId Long Identifier of the item being assembled.
ConfigItemNumber String Item name of the Configured Item
BaseModelId Long The inventory item id for the ATO model
from which the configured item options
were selected
BaseModelItemNumber String The Item name of the ATO Model
InventoryItemId Long Inventory Item Id for the line item
InventoryItemNumber String The Item name of the line item.
ParentInventoryItemId Long Item Id of the Parent.
ParentInventoryItemNumber String Item Name of the Parent.

21 | UNDERSTANDING CONFIGURED ITEM STRUCTURE CLOUD SOAP WEB SERVICE


HeaderId Long The related Match Header entry.
LineId Long Unique identifier assigned to the Match
Detail record entry
ParentLineId Long The Line ID representing the immediate
parent item for the component
SubItemType Long Returned Values:
1 – ATO
2 – Option Class
4 ‐ Standard (selected option)
UnitQuantity BigDecimal The required quantity to make 1 unit of
the top level assembly
UnitUOM String Unit of measure for the quantity
specified.
ItemHierarchy String Hierarchy of the inventory item ids
separated by ‘/’
CreationDate Timestamp Creation date of the configured item
RootHeaderId Long Header Id of the Top level ATO

Complete Instance Structure Response:
Attribute Name Type Description
ConfigItemId Long Identifier of the item being assembled.
ConfigItemNumber String Item name of the Configured Item
BaseModelId Long The inventory item id for the ATO model
from which the configured item options
were selected
BaseModelItemNumber String The Item name of the ATO Model
InventoryItemId Long Inventory Item Id for the line item
InventoryItemNumber String The Item name of the line item.
ParentInventoryItemId Long Item Id of the Parent.
ParentInventoryItemNumber String Item Name of the Parent.
HeaderId Long The related Match Header entry.
LineId Long Unique identifier assigned to the Match
Detail record entry
ParentLineId Long The Line ID representing the immediate
parent item for the component
SubItemType Long Returned Values:
1 – ATO
2 – Option Class
4 ‐ Standard (selected option)
UnitQuantity BigDecimal The required quantity to make 1 unit of
the top level assembly
UnitUOM String Unit of measure for the quantity
specified.
CreationDate Timestamp Configured Item Creation Date
RevisionId Long Item Revision
EffectivityDate Timestamp Date from Which Item or Component is
effective
DisableDate Timestamp Date from Which Item or Component is
disabled

22 | UNDERSTANDING CONFIGURED ITEM STRUCTURE CLOUD SOAP WEB SERVICE


OrganizationId Long Organization id of inventory item.
OrganizationCode String Organization Code of inventory item
BillSequenceId Long The bill_sequence_id for the ato model, as
it is defined in the base model item
structure.
ComponentSequenceId Long The component sequence id for the
selected component, as it is defined in the
base model item structure.
ComponentType String Value:
1 ‐ Component (Assembly)
‐1 ‐ Ingredient Component

WIPSupplyType BigDecimal WIP supply type code. Retrieved from the
model structure.
OptionalComponent String Y/N indicating the component is either
optional or mandatory
SubstituteComponent String Y/N Indicating the component is a
substitution component
ComponentYieldFactor BigDecimal Factor used to multiply component
quantity with to obtain component
quantity. Retrieved from the model
structure.
PlanningFactor BigDecimal Factor used to multiply component
quantity with to obtain planning quantity
RoundingDirection BigDecimal Rounding direction i.e. up or down.
Retrieved from the model structure
BasisType BigDecimal Value:
1‐Item
CheckATP BigDecimal Flag to determine if ATP should be
checked for component
1 – Check ATP
2 ‐ Do not check ATP
Retrieved from the model structure.
ComponentHierarchy String Hierarchy of Component sequence id’s
separated by “‐“
ComponentItemHierarchy String Hierarchy of Inventory Item Id’s
separated by “‐“
ItemClassId Long Item Class Id of the Configured item
RootPhantomItemId Long The unique identifier of a phantom
subassembly item.

TIA Attributes:
Attribute Name Type Description
LineId Long Unique Lind
AttributeName String Name of the attribute
CharacterAttributeValue String Attribute to hold Character value of TIA.
NumberAttributeValue Long Attribute to hold the Number value of
TIA.
DateAttributeValue Date Attribute to hold the Date value of TIA.
TimestampAttributeValue Timestamp Attribute to hold the Timestamp value of
TIA.

23 | UNDERSTANDING CONFIGURED ITEM STRUCTURE CLOUD SOAP WEB SERVICE


Web Service Output Processing Examples:
Scenario 1:

Assume that service has been called using the proxy; each row of the output will be stored in the relational database
table. Data can be queried later from this table as per the need.

For this we need to create the relational database table (CTO_ITEM_STRUCTURE) which includes a column for
each attribute in the response. Also we should create a separate table for storing the transactional item attributes
(CTO_TRANSACTION_ATTR), which will have foreign key relationship with other table based on LINE_ID.


LINE_ID
CONFIG_ITEM_ID
CTO_ITEM_STRUCTURE CTO_TRANSACTION_ATTR
ATTRIBUTE_NAME
CONFIG_ITEM_NUMBER
LINE_ID CHARACTER_ATTRIBUTE_VALUE
PARENT_LINE_ID NUMBERIC_ATTRIBUTE_VALUE
….. …..








Query: SELECT * FROM CTO_ITEM_STRUCTURE WHERE <CONDITION>

Scenario 2:

Assume that service has been called using the proxy; each row of the output will be converted to XML format using
the following sample code and stored in to the database table with Clob column.
Code for converting the output row into XML:
JAXBContext contextObj = JAXBContext.newInstance(new Class[]{CtoItemStructure.class});
Marshaller marshallerObj = contextObj.createMarshaller();
marshallerObj.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
JAXBElement<CtoItemStructure> rootElement = new JAXBElement<CtoItemStructure>(new
QName("CtoItemStructureRow"), CtoItemStructure.class, opTempList.get(Index));
marshallerObj.marshal(rootElement, baos);
String xmlContent = new String(baos.toByteArray());
ClobDomain objClobDomain = new ClobDomain(xmlContent);

Once we convert the row to XML, the data will be stored in the table with the following structure.

CTO_ITEM_STRUCTURE:
Attribute Name Type Description
CONFIG_ITEM_ID Long Item Id of the Configured Item
ITEM_STRUCTURE Clob XML Data of the Row

Later data can be queried from this table using the following similar query.

select CONFIG_ITEM_ID,

extractvalue(ITEM_STRUCTURE,'/ CtoItemStructureRow /ConfigItemId ')CONFIG_ITEM_ID,

24 | UNDERSTANDING CONFIGURED ITEM STRUCTURE CLOUD SOAP WEB SERVICE


extractvalue(ITEM_STRUCTURE,'/ CtoItemStructureRow /ConfigItemNumber ')CONFIG_ITEM_NUMBER,

extractvalue(ITEM_STRUCTURE,'/ CtoItemStructureRow /BaseModelId ')BASE_MODEL_ID,

extractvalue(ITEM_STRUCTURE,'/ CtoItemStructureRow /BaseModelItemNumber ')BASE_MODEL_ITEM_NUMBER,

extractvalue(ITEM_STRUCTURE,'/ CtoItemStructureRow /InventoryItemId ') INVENTORY_ITEM_ID,

extractvalue(ITEM_STRUCTURE,'/ CtoItemStructureRow /InventoryItemNumber ')INVENTORY_ITEM_NUMBER,

extractvalue(ITEM_STRUCTURE,'/ CtoItemStructureRow /LineId ')LINE_ID,

extractvalue(ITEM_STRUCTURE,'/ CtoItemStructureRow /ParentLineId ')PARENT_LINE_ID,

extractvalue(ITEM_STRUCTURE,'/ CtoItemStructureRow /SubItemType ') SUB_ITEM_TYPE,

extractvalue(ITEM_STRUCTURE,'/ CtoItemStructureRow /OptionalComponent') OPTIONAL_COMPONENT,

extractvalue(ITEM_STRUCTURE,'/ CtoItemStructureRow /ComponentHierarchy ')COMPONENT_HEIRARCHY

from CTO_ITEM_STRUCTURE where CONFIG_ITEM_ID =<CONFIGURED ITEM ID>

Formatting the web service output using XSLT style sheet:


As the XML output of the web service is not indented and not organized hierarchically based on the parent child
relationships, it is sometimes necessary to format the XML output to include the proper indentation and hierarchical
representation. This will aid the user in reading the XML output easily. XSLT (Extensible Stylesheet Language
Transformations) can be used to achieve this.

Following is the XSLT code which transforms the XML output of the service.

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"


xmlns:ns0="http://xmlns.oracle.com/apps/scm/cto/matchRepository/utilities/configItemStructureSer
vice/types/"
xmlns:ns2="http://xmlns.oracle.com/apps/scm/cto/matchRepository/utilities/configItemStructureSer
vice/types/"
xmlns:ns1="http://xmlns.oracle.com/apps/scm/cto/matchRepository/utilities/configItemStructureSer
vice/"
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:wsa="http://www.w3.org/2005/08/addressing"
xmlns:typ="http://xmlns.oracle.com/apps/scm/cto/matchRepository/utilities/configItemStructureService/types/
"
>
<xsl:output method="xml" indent="yes" version="1.0" encoding="UTF-8"/>
<xsl:template match="*">
<xsl:element name="{local-name()}">
<xsl:if test="not(not(text()) and not(node()))">
<xsl:apply-templates select=" node()"/>
</xsl:if>
</xsl:element>
</xsl:template>
<xsl:template match="env:Envelope">
<xsl:apply-templates select="env:Body"/>
</xsl:template>
<xsl:template match="env:Body">
<xsl:apply-templates select=" ns0:findCtoItemStructureResponse |
ns0:findCtoItemStructureAsyncResponse "/>
</xsl:template>

25 | UNDERSTANDING CONFIGURED ITEM STRUCTURE CLOUD SOAP WEB SERVICE


<xsl:template match="ns0 ns0:findCtoItemStructureResponse |
ns0:findCtoItemStructureAsyncResponse">
<xsl:copy>
<xsl:apply-templates select=".//ns2:result[not(ns1:ParentLineId/node())]" />
</xsl:copy>
</xsl:template>
<xsl:template match="ns2:result">
<xsl:variable name="LineId" select="./ns1:LineId" />
<xsl:variable name="OrganizationId" select="./ns1:OrganizationId" />
<xsl:variable name="InventoryItemId" select="./ns1:InventoryItemId" />
<xsl:variable name="ComponentItemHierarchy" select="./ns1:ComponentItemHierarchy"
/>
<xsl:element name="ns2:result">

<xsl:apply-templates select="node()" />


<xsl:if test="../ns2:result[(./ns1:ParentLineId = $LineId and ./ns1:OrganizationId =
$OrganizationId and concat($ComponentItemHierarchy,'-',./ns1:InventoryItemId) =
./ns1:ComponentItemHierarchy )]">

<xsl:apply-templates select="../ns2:result[(./ns1:ParentLineId = $LineId and


./ns1:OrganizationId = $OrganizationId)]" />
</xsl:if>
</xsl:element>
<xsl:variable name="nl" select="'&#10;'"/>
<xsl:value-of select="$nl" disable-output-escaping="no"/>
</xsl:template>
</xsl:stylesheet>

Any XML tool can be used to format the XML output of the web service using the above XSLT code. Please note
that above XSLT can be used only to format the output of the findCtoItemStructure operation. This can be further
extended or modified to format it according to the user needs.

This formatting or conversion can also be done programmatically using the following sample code.
String xml = “input.xml"; // input XML file location
String xslt = “transformations.xsl"; // XSLT file location
String output = "formatted.xml"; //output XML file location
TransformerFactory tf = TransformerFactory.newInstance();
Transformer tr = tf.newTransformer(new StreamSource(new File(xslt)));
tr.transform(new StreamSource(new File(xml)),

26 | UNDERSTANDING CONFIGURED ITEM STRUCTURE CLOUD SOAP WEB SERVICE


Orac
cle Corporation, World
W Headquarterrs Worldwide Inquirries
500 Oracle Parkway Phone: +1.650.50
06.7000
Redwood Shores, CA 94065,
9 USA Fax: +1.650.506.7
7200

CONNECT WITH US

blogs.oracle.ccom/oracle
Copyyright © 2017, Oracle and/or
a its affiliates. All rights reserved. This document
d is provided for
f information purposes only, and the
conte ents hereof are subjecct to change without notice. n This document is not warranted to be
b error-free, nor subje ect to any other
facebook.com
m/oracle warra anties or conditions, whhether expressed orallyy or implied in law, inclluding implied warranties and conditions of merchantability
m or
fitnesss for a particular purpo
ose. We specifically dissclaim any liability with respect to this document, and no contractua al obligations are
forme ed either directly or inddirectly by this document. This document may m not be reproduced d or transmitted in anyy form or by any
twitter.com/orracle mean ns, electronic or mecha anical, for any purpose,, without our prior writte en permission.

oracle.com Oracle and Java are registe


ered trademarks of Ora
acle and/or its affiliates. Other names may be trademarks of their resspective owners.

Intel and
a Intel Xeon are traddemarks or registered trademarks
t of Intel Corrporation. All SPARC trademarks are used un
nder license and
are trrademarks or registere
ed trademarks of SPARRC International, Inc. AMD,
A Opteron, the AMDD logo, and the AMD Opteron
O logo are
trade
emarks or registered tra
ademarks of Advanced Micro Devices. UNIX is a registered tradema ark of The Open Group
p. 0117

Undeerstanding Configured Item


I Structure Cloud SOAP
S Web Service
Septe
ember 2017
Autho
or: Gangadhar Bodla
Contrributing Authors:

You might also like