Documente Academic
Documente Profesional
Documente Cultură
Release 9
Copyright © 2005, 2014 Oracle and/or its affiliates. All rights reserved.
This software and related documentation are provided under a license agreement containing restrictions on use
and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license
agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit,
distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering,
disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.
The information contained herein is subject to change without notice and is not warranted to be error-free. If you
find any errors, please report them to us in writing.
If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf
of the U.S. Government, the following notice is applicable:
U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs
installed on the hardware, and/or documentation, delivered to U.S. Government end users are “commercial
computer software” pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental
regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any
operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be
subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S.
Government.
This software or hardware is developed for general use in a variety of information management applications. It is not
developed or intended for use in any inherently dangerous applications, including applications that may create a
risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to
take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation
and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous
applications.
Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their
respective owners.
Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used
under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD
logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a
registered trademark of The Open Group.
This software or hardware and documentation may provide access to or information on content, products, and
services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all
warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its
affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party
content, products, or services.
Documentation Accessibility
For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at
http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.
1 Introduction.................................................................................................................... 7
2 Territory Data Object .................................................................................................... 9
Operations .......................................................................................................................... 29
getTerritory ...................................................................................................................29
findTerritories ................................................................................................................29
addExistingTerritoryToProposal ..................................................................................30
addExistingTerritoryToProposalReturnsTerritory .......................................................30
addNewTerritoryToProposal ......................................................................................31
updateTerritoryInProposal .........................................................................................31
mergeTerritoryInProposal ...........................................................................................31
moveTerritoriesInProposal ..........................................................................................32
deleteTerritoryRule ......................................................................................................32
deleteTerritoryRuleBoundary .....................................................................................32
deleteTerritoryRuleBndryValue .................................................................................33
deleteTerritoryResource .............................................................................................33
deleteTerritoryLineOfBusiness ....................................................................................33
deleteTerritoryInheritedDimension (OBSOLETE) ......................................................34
transformTerritoryUserKeysToIDs (OBSOLETE) ...........................................................34
processTerritoryRuleBoundaryValue ........................................................................34
6 Territory Proposal Service ........................................................................................... 35
Operations .......................................................................................................................... 35
getProposal ..................................................................................................................35
findProposals ................................................................................................................35
createProposal ............................................................................................................36
updateProposal ..........................................................................................................36
deleteProposal ............................................................................................................36
requestProposalActivation ........................................................................................37
reopenProposal ...........................................................................................................37
7 Territory Dimension Service ........................................................................................ 39
Operations .......................................................................................................................... 39
getTerritoryDimension .................................................................................................39
findTerritoryDimension ................................................................................................39
getTerritoryDimensionMember .................................................................................40
findTerritoryDimensionMember .................................................................................40
8 Service Usage Examples ............................................................................................ 41
Example 1 ........................................................................................................................... 41
Example 2 ........................................................................................................................... 44
Example 3 ........................................................................................................................... 46
Example 4 ........................................................................................................................... 47
This document describes how territories within the Oracle Sales Cloud can be accessed
and maintained using a programming interface, i.e., SOAP based web services.
The document will explain what objects are involved, the services and operations
available to access them, as well as the related business rules.
In Territory Management, there are two main objects: territories and proposals.
Territories are organized into a hierarchy, so that every territory except for the top one
has a parent. Each territory:
• Has an owner
• May have any number of additional team members, and
• Typically, but not necessarily, has a coverage defined
The territory coverage is what identifies the scope of responsibility of the territory
team in the market space.
Proposals are the vehicles enabling territory creation and updates. A proposal is the
container within which territory changes are modeled, and then activated on a
specified date. Proposals are very light weight objects, typically they just have an owner,
a name and an activation date specified.
A proposal may contain the changes to multiple territories. Initially, a territory is added to
the proposal, which makes it available for update, then the updates are made, and the
proposal is activated, which is the event that propagates the territory updates within
that proposal into the active territory hierarchy.
There are some differences between the objects and attributes exposed in the object
model, and the equivalent constructs exposed in the user interface. Wherever
applicable, the equivalencies are identified within this document, so that it is easier to
correlate operations that can be performed using the back end and front end
interfaces.
This section has a description of the entities in the territory data object, and their
attributes.
List of Entities
Territory (Header)
Territory Rule
Territory Rule
Boundary
Territory Rule
Territory Resource
Boundary Value
Territory Line of
Business
Territory (Header)
The Territory Header entity contains all versions of the territories in the system.
It is important to note that each territory (identified by Territory ID or Territory Number) will
typically have multiple rows in this entity (identified by Territory Version ID). Following are
the characteristics of the different types of territory versions in this entity:
• Currently active version
There is a single active version for every active territory in the system. The active
version can be distinguished using the following combination of attributes:
o StatusCode = FINALIZED
o Current date is between territory version’s EffectiveStartDate and
EffectiveEndDate
For convenience, there is also a single system maintained attribute that can
be used: LatestVersionFlag.
• Historical (previously active) version
There may be zero to any number of historical versions for every territory in the
system. A historical version can be distinguished using the following combination
of attributes:
o StatusCode = FINALIZED
o Current date is after territory version’s EffectiveEndDate
• Deleted version
This is a special type of historical territory version. It is created only if the territory
has been deleted, i.e., there is no active version for the territory anymore. A
deleted version can be distinguished using the following combination of
attributes:
o StatusCode = DELETED
• Draft (proposed) version
There may be zero to any number of draft territory versions. A draft version is
created any time the territory is added to a proposal. A draft version can be
distinguished using the following attribute:
o StatusCode = DRAFT
Territory Resource
The equivalent term for resource in UIs is “team member”.
The records in this entity contain all team members for historical, active and draft
territory versions. Each territory must have an owner, so each of the above types of
territory versions has at least one record here.
Note that the territory owner is also stored in the Territory entity.
Territory Rule
The equivalent term for rule in UIs is “coverage”.
This entity contains a record for each of the coverages for historical, active and draft
territory versions. A territory version may have no coverages at all (if it’s a grouping
territory), or may have coverages such as Dimensional Coverage, Included Customers,
etc. There are the following possible types of coverages:
• For Customer Centric territories (where territory version’s CoverageModel =
SALES_ACCOUNT_CENTRIC)
o Dimensional Coverage (RuleTypeCode = REGULAR)
o Included Customers (RuleTypeCode = INCLUSION)
o Excluded Customers (RuleTypeCode = EXCLUSION)
• For Partner Centric territories (where territory version’s CoverageModel =
PARTNER_CENTRIC)
o Dimensional Coverage (RuleTypeCode = PARTNER_REGULAR)
o Included Partners (RuleTypeCode = PARTNER_INCLUSION)
o Excluded Partners (RuleTypeCode = PARTNER_EXCLUSION)
• For territories that inherit from other territories
o Dimensional Override (RuleTypeCode = INHERITANCE_OVERRIDE)
Entity Attributes
Territory Header
TerritoryLevel Identifies the distance of the territory from the top of the territory
hierarchy, ex: the top territory has level = 1, its child territory has
level = 2, etc.
System maintained.
TerrProposalID Identifies the proposal within which the territory version was
created.
EffectiveStartDate The start date of the territory version. Maintained by the system
based on proposal activation date, ex: when a proposal is
activated, territory updates result in new versions whose start dates
are set based on the proposal activation date.
EffectiveEndDate The end date of the territory version. Maintained by the system
based on proposal activation date, ex: when a proposal is
activated, the end dates of previously active versions of updated
territories are set accordingly.
RevisionReason The reason for quota revision. Valid values are in lookup
MOT_QUOTA_REASON. Setup task: Manage Territory Quota Revision
Reasons.
SourceTerrID The source territory, from which this territory is inheriting its
coverage.
Populated for inheriting territories.
SourceTerrLastUpd Keeps track of when the source territory was last updated. System
ateDate maintained.
PartnerID The partner organization associated with the territory. This attribute
is typically populated for territories, whose TypeCode = PARTNER.
OrganizationID Obsolete
OwnerOrgID Obsolete
OrganizationName Obsolete
ApplyOptionalVali Obsolete
dationsFlag
Note: in addition to the attributes supported out of the box, as listed above, the
following attributes are available, if the territory header object has been extended using
Application Composer. The Attribute name of an extended attribute in the service
payload is comprised of the name entered in Application Composer, with the suffix
“_c”, ex: CustomAttribute_c.
Territory Resource
It is optional for a territory to have team members, other than the owner. The owner can
be maintained within the Territory entity, so typically, the use of this entity is necessary
only if there are additional territory team members.
ResourceOrgID Obsolete
OrganizationName Obsolete
Note: in addition to the attributes supported out of the box, as listed above, the
following attributes are available, if the territory resource object has been extended
using Application Composer. The Attribute name of an extended attribute in the service
payload is comprised of the name entered in Application Composer, with the suffix
“_c”, ex: CustomAttribute_c.
It is optional for a territory to have associated lines of business. Lines of business may be
helpful in opportunity or lead assignment.
Territory Rule
If a territory has coverage, then it will have at least one rule record.
This section has a description of the proposal entity and its attributes. The proposal entity
has records of all currently open, pending activation, as well as activated proposals.
List of Entities
Territory Proposal
Territory Proposal
Custom Child
Territory Proposal
The Territory Proposal entity contains all proposals in the system. This includes the
following types of proposals:
• Proposals that are currently open and presumably are being worked on
(StatusCode = DRAFT).
• Proposals that have already been activated (StatusCode = ACTIVATED).
• Proposals that are waiting to be activated, ex: future dated proposals that have
been submitted for activation (StatusCode = PENDING ACTIVATION).
• Proposals that are in the process of being activated (StatusCode = PROCESSING).
Entity Attributes
Proposal
Note: in addition to the attributes supported out of the box, as listed above, the
following attributes are available, if the proposal object has been extended using
Application Composer. The Attribute name of an extended attribute in the service
payload is comprised of the name entered in Application Composer, with the suffix
“_c”, ex: CustomAttribute_c.
This section has a description of the dimension entities and their attributes. The dimension
entity has records for all territory dimensions. The dimension member entity has records
for all dimension members available for use in Territory Management.
List of Entities
Territory Dimension
Territory Dimension
Member
Territory Dimension
This entity contains the list of available territory dimensions. A subset of these may be
active.
Entity Attributes
Territory Dimension
ActiveFlag Identifies whether the dimension is enabled or not. Valid values are
Y and N.
The term “territory object” refers to the attributes of a territory version and related
entities.
Operations
getTerritory
findTerritories
addExistingTerritoryToProposal
Used to perform the Add to Proposal action for an existing territory. This makes it possible
to update territory attributes within the given proposal.
Output N/A
addExistingTerritoryToProposalReturnsTerritory
Used to perform the Add to Proposal action for an existing territory. This makes it possible
to update territory attributes within the given proposal. This operation returns the territory
object.
addNewTerritoryToProposal
updateTerritoryInProposal
Used to make updates to a territory or its child entities within a given proposal.
mergeTerritoryInProposal
Used to create the territory (if it doesn’t exist), or update the territory (if it exists), within a
given proposal. This operation supports the creation of child entity records, which is not
possible using the updateTerritoryInProposal operation.
moveTerritoriesInProposal
deleteTerritoryRule
Used to delete a territory’s coverage of a territory within a given proposal, ex: delete the
dimensional coverage or the included customers coverage of the territory.
Output N/A
deleteTerritoryRuleBoundary
Used to delete all the selected dimension members for a given dimension, from a
territory’s coverage of a territory within a given proposal. As a result, the territory will
cover the entire dimension, i.e., that dimension’s coverage will be “Any”.
Output N/A
deleteTerritoryRuleBndryValue
Output N/A
deleteTerritoryResource
Output N/A
deleteTerritoryLineOfBusiness
Used to delete a territory line of business value of a territory within a given proposal.
Output N/A
deleteTerritoryInheritedDimension (OBSOLETE)
transformTerritoryUserKeysToIDs (OBSOLETE)
processTerritoryRuleBoundaryValue
Used to perform batch processing for a set of dimension members from a territory’s
coverage, of a territory within a given proposal. Currently only the Delete operation is
supported for batch processing.
Output N/A
Operations
getProposal
findProposals
Used to retrieve a list of proposals. This operation only returns details for the proposal
object, i.e., no details of territories that have been added to the proposal.
createProposal
updateProposal
deleteProposal
Output N/A
requestProposalActivation
Used to add a proposal to the activation queue. The proposal will be activated on the
specified date.
Output N/A
reopenProposal
Used to reopen a proposal, ex: change the proposal status from Pending Activation to
Draft.
Output N/A
Operations
getTerritoryDimension
findTerritoryDimension
getTerritoryDimensionMember
findTerritoryDimensionMember
In this section, there are examples of how services can be used to accomplish common
sets of operations.
Example 1
<soap:Body>
<ns1:findTerritories
xmlns:ns1="http://xmlns.oracle.com/apps/sales/territoryMgmt/territories/territoryPublicService/types/"
>
<ns1:findCriteria xmlns:ns2="http://xmlns.oracle.com/adf/svc/types/">
<ns2:findAttribute>Name</ns2:findAttribute>
<ns2:findAttribute>TerritoryVersionId</ns2:findAttribute>
<ns2:findAttribute>TerritoryId</ns2:findAttribute>
<ns2:findAttribute>StatusCode</ns2:findAttribute>
<ns2:findAttribute>EffectiveStartDate</ns2:findAttribute>
<ns2:findAttribute>EffectiveEndDate</ns2:findAttribute>
<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>Name</ns2:attribute>
<ns2:operator>=</ns2:operator>
<ns2:value>Global</ns2:value>
</ns2:item>
<ns2:item>
<ns2:conjunction>And</ns2:conjunction>
<ns2:upperCaseCompare>true</ns2:upperCaseCompare>
<ns2:attribute>StatusCode</ns2:attribute>
<ns2:operator>=</ns2:operator>
<ns2:value>FINALIZED</ns2:value>
</ns2:item>
<ns2:item>
<ns2:conjunction>And</ns2:conjunction>
<ns2:upperCaseCompare>false</ns2:upperCaseCompare>
<ns2:attribute>EffectiveEndDate</ns2:attribute>
<ns2:operator>ONORAFTER</ns2:operator>
<ns2:value>2014-11-26</ns2: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:findTerritories>
</soap:Body>
<ns4:operator>=</ns4:operator>
<ns4:value>Geo</ns4:value>
</ns4:item>
<ns4:item>
<ns4:conjunction>And</ns4:conjunction>
<ns4:upperCaseCompare>true</ns4:upperCaseCompare>
<ns4:attribute>PartitionTypeCode</ns4:attribute>
<ns4:operator>=</ns4:operator>
<ns4:value>PRODUCTION</ns4:value>
</ns4:item>
<ns4:item>
<ns4:conjunction>And</ns4:conjunction>
<ns4:upperCaseCompare>true</ns4:upperCaseCompare>
<ns4:attribute>Name</ns4:attribute>
<ns4:operator>=</ns4:operator>
<ns4:value>California</ns4:value>
</ns4:item>
</ns4:group>
</ns4:filter>
<ns5:excludeAttribute xmlns:ns5="http://xmlns.oracle.com/adf/svc/types/"/>
</ns1:findCriteria>
<ns1:findControl>
<ns6:retrieveAllTranslations
xmlns:ns6="http://xmlns.oracle.com/adf/svc/types/">false</ns6:retrieveAllTranslations>
</ns1:findControl>
</ns1:findTerritoryDimensionMember>
</soap:Body>
• Step 4 - addNewTerritoryToProposal
o Create the territory within the proposal created earlier.
o The payload contains the proposal identifier from step 1 (TerrProposalId),
the territory identifier of the parent territory from step 2 (TerritoryId), and
the dimension member integration identifier (IntegrationId) of ‘California’
from step 3.
o Sample Payload
<soap:Body xmlns:ns1="http://xmlns.oracle.com/apps/sales/territoryMgmt/territories/territoryService/types/">
<ns1:addNewTerritoryToProposal>
<ns1:territoryService
xmlns:ns2="http://xmlns.oracle.com/apps/sales/territoryMgmt/territories/territoryService/">
<ns2:Name>California - Sales</ns2:Name>
<ns2:OwnerResourceId>100010025531616</ns2:OwnerResourceId>
<ns2:ParentTerritoryId>1000</ns2:ParentTerritoryId>
<ns2:TerrProposalId>300100007276385</ns2:TerrProposalId>
<ns2:TerritoryRule>
<ns2:RuleNumber>1</ns2:RuleNumber>
<ns2:RuleOperatorCode>INCLUSION</ns2:RuleOperatorCode>
<ns2:RuleTypeCode>REGULAR</ns2:RuleTypeCode>
<ns2:TerritoryRuleBoundary1>
<ns2:TerrDimensionCode>Geo</ns2:TerrDimensionCode>
<ns2:TerritoryRuleBndryValue1>
<ns2:TerrDimIntgId>999997500682992</ns2:TerrDimIntgId>
<ns2:TerrDimensionCode>Geo</ns2:TerrDimensionCode>
</ns2:TerritoryRuleBndryValue1>
</ns2:TerritoryRuleBoundary1>
</ns2:TerritoryRule>
</ns1:territoryService>
</ns1:addNewTerritoryToProposal>
</soap:Body>
• Step 5 – Update Proposal ( To update the proposal with the activation date on
which the proposal activation is intended)
o Sample Payload
<soap:Body>
<ns1:updateProposal
xmlns:ns1="http://xmlns.oracle.com/apps/sales/territoryMgmt/territories/territoryService/types/">
<ns1:territoryProposal
xmlns:ns2="http://xmlns.oracle.com/apps/sales/territoryMgmt/territories/territoryService/">
<ns2:TerrProposalId>300100036992850</ns2:TerrProposalId>
<ns2:ActivationDate>2014-11-30</ns2:ActivationDate>
</ns1:territoryProposal>
</ns1:updateProposal>
</soap:Body>
Example 2
Requirement: Create a grouping territory (i.e., a territory that has no coverage), and a
child territory under it. The child territory covers a single included customer.
Assumptions:
• Territory structure pre-exists. The parent territory (Global) exists, which will
be the parent of the new (North America – Sales) grouping territory.
• Identifier of the customer (PartyId) to be included in the customer
inclusion is known.
• Identifiers of territory owners are known.
Operations executed:
• Step1 – createProposal
o Sample Payload – Refer to example 1, step 1
• Step 2 – findTerritory (To find the parent Territory identifier of Global territory)
<soap:Body>
<ns1:addNewTerritoryToProposal
xmlns:ns1="http://xmlns.oracle.com/apps/sales/territoryMgmt/territories/territoryService/types/">
<ns1:territoryService xmlns:ns2="http://xmlns.oracle.com/apps/sales/territoryMgmt/territories/territoryService/">
<ns2:Name>North America – Sales</ns2:Name>
<ns2:Description>North America – Sales Grouping Territory </ns2:Description>
<ns2:OwnerResourceId>100010025531616</ns2:OwnerResourceId>
<ns2:ParentTerritoryId>1000</ns2:ParentTerritoryId>
<ns2:TerrProposalId>300100036992836</ns2:TerrProposalId>
<ns2:CoverageModel>SALES_ACCOUNT_CENTRIC</ns2:CoverageModel>
</ns1:territoryService>
</ns1:addNewTerritoryToProposal>
</soap:Body>
• Step 4 – addNewTerritoryToProposal
o Proposal Identifier of the proposal (TerrProposalId) created in step 1,
Territory Identifier (TerritoryId) of the parent territory created in step 3, and
the identifier of customer are passed through the payload.
o Sample Payload – (To add a new territory ‘US – Sales’ as a child territory of
the ‘North America – Sales’ grouping territory)
<soap:Body xmlns:ns1="http://xmlns.oracle.com/apps/sales/territoryMgmt/territories/territoryService/types/">
<ns1:addNewTerritoryToProposal>
<ns1:territoryService
xmlns:ns2="http://xmlns.oracle.com/apps/sales/territoryMgmt/territories/territoryService/">
<ns2:Name>US - Sales</ns2:Name>
<ns2:OwnerResourceId>100010025531616</ns2:OwnerResourceId>
<ns2:ParentTerritoryId>10000000</ns2:ParentTerritoryId>
<ns2:TerrProposalId>300100007276385</ns2:TerrProposalId>
<ns2:TerritoryRule>
<ns2:RuleNumber>1</ns2:RuleNumber>
<ns2:RuleOperatorCode>INCLUSION</ns2:RuleOperatorCode>
<ns2:RuleTypeCode>REGULAR</ns2:RuleTypeCode>
<ns2:TerritoryRuleBoundary1>
<ns2:TerrDimensionCode>Acct</ns2:TerrDimensionCode>
<ns2:TerritoryRuleBndryValue1>
<ns2:TerrDimIntgId>999997500682992</ns2:TerrDimIntgId>
<ns2:TerrDimensionCode>Acct</ns2:TerrDimensionCode>
</ns2:TerritoryRuleBndryValue1>
</ns2:TerritoryRuleBoundary1>
</ns2:TerritoryRule>
</ns1:territoryService>
</ns1:addNewTerritoryToProposal>
</soap:Body>
• Step 5 – Update Proposal (To update the proposal with the activation date on
which the proposal activation is intended)
o Sample Payload – Refer to example 1, step 5
Example 3
Requirement: Get the list of all territories that have been added to a given proposal.
Operations executed:
• findProposal
o Sample Payload (To find the identifier of the proposal)
<soap:Body>
<ns1:findProposals
xmlns:ns1="http://xmlns.oracle.com/apps/sales/territoryMgmt/territories/territoryService/types/">
<ns1:findCriteria xmlns:ns2="http://xmlns.oracle.com/adf/svc/types/">
<ns2:findAttribute>Name</ns2:findAttribute>
<ns2:findAttribute>TerrProposalId</ns2:findAttribute>
<ns2:findAttribute>Owner</ns2:findAttribute>
<ns2:findAttribute>StatusCode</ns2:findAttribute>
<ns2:findAttribute>Description</ns2:findAttribute>
<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>Name</ns2:attribute>
<ns2:operator>=</ns2:operator>
<ns2:value>Proposal To Create California Sales Territory</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:findProposals>
</soap:Body>
• FindTerritories
o Proposal Identifier of the proposal (TerrProposalId) identified in step 1 is
passed through the payload.
o Sample Payload
<soap:Body>
<ns1:findTerritories
xmlns:ns1="http://xmlns.oracle.com/apps/sales/territoryMgmt/territories/territoryService/types/">
<ns1:findCriteria xmlns:ns2="http://xmlns.oracle.com/adf/svc/types/">
<ns2:findAttribute>Name</ns2:findAttribute>
<ns2:findAttribute>TerritoryVersionId</ns2:findAttribute>
<ns2:findAttribute>TerritoryId</ns2:findAttribute>
<ns2:findAttribute>StatusCode</ns2:findAttribute>
<ns2:findAttribute>EffectiveStartDate</ns2:findAttribute>
<ns2:findAttribute>EffectiveEndDate</ns2:findAttribute>
<ns2:findAttribute>LatestVersionFlag</ns2:findAttribute>
<ns2:findAttribute>TerrProposalId</ns2:findAttribute>
<ns2:findAttribute>OwnerResourceId</ns2:findAttribute>
<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>TerrProposalId</ns2:attribute>
<ns2:operator>=</ns2:operator>
<ns2:value>300100009760952</ns2: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:findTerritories>
</soap:Body>
Example 4
Requirement: Update a territory (California – Sales). Update the territory owner and add
two industries into the Industry dimension (i.e., changing Industry from ANY to covering
"Financial Services" and "Wealth Management")
Assumptions:
• Territory structure pre-exists. The California – Sales territory exists.
• The identifier of the owner is known.
Operations executed:
• Step1 – createProposal
o Sample Payload – Refer to example 1, step 1
• Step 2 – findTerritory (To find the Territory identifier of the ‘California – Sales’
territory )
o Sample Payload – (To find the territory identifier of the ‘California –
Sales’ territory, which will be modified.)
<soap:Body>
<ns1:findTerritories
xmlns:ns1="http://xmlns.oracle.com/apps/sales/territoryMgmt/territories/territoryPublicService/types/"
>
<ns1:findCriteria xmlns:ns2="http://xmlns.oracle.com/adf/svc/types/">
<ns2:findAttribute>Name</ns2:findAttribute>
<ns2:findAttribute>TerritoryVersionId</ns2:findAttribute>
<ns2:findAttribute>TerritoryId</ns2:findAttribute>
<ns2:findAttribute>StatusCode</ns2:findAttribute>
<ns2:findAttribute>EffectiveStartDate</ns2:findAttribute>
<ns2:findAttribute>EffectiveEndDate</ns2:findAttribute>
<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>Name</ns2:attribute>
<ns2:operator>=</ns2:operator>
<ns2:value>California - Sales</ns2:value>
</ns2:item>
<ns2:item>
<ns2:conjunction>And</ns2:conjunction>
<ns2:upperCaseCompare>true</ns2:upperCaseCompare>
<ns2:attribute>StatusCode</ns2:attribute>
<ns2:operator>=</ns2:operator>
<ns2:value>FINALIZED</ns2:value>
</ns2:item>
<ns2:item>
<ns2:conjunction>And</ns2:conjunction>
<ns2:upperCaseCompare>false</ns2:upperCaseCompare>
<ns2:attribute>EffectiveEndDate</ns2:attribute>
<ns2:operator>ONORAFTER</ns2:operator>
<ns2:value>2014-11-26</ns2: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:findTerritories>
</soap:Body>
• Step 3 – addExistingTerritoryToProposalReturnsTerritory
o Proposal Identifier of the proposal (TerrProposalId) created in step
1, Territory Identifier (TerritoryId) of the territory in step 2 are passed
through the payload. This operation creates a draft version of the
territory to be updated and returns details of the territory through
the returned territory object.
o Sample Payload
<soap:Body>
<ns1:addExistingTerritoryToProposalReturnsTerritory
xmlns:ns1="http://xmlns.oracle.com/apps/sales/territoryMgmt/territories/territoryService/t
ypes/">
<ns1:territoryId>1000</ns1:territoryId>
<ns1:territoryProposalId>300100036992836</ns1:territoryProposalId>
</ns1:addExistingTerritoryToProposalReturnsTerritory>
</soap:Body>
<soap:Body>
<ns1:findTerritoryDimensionMember
xmlns:ns1="http://xmlns.oracle.com/apps/sales/territoryMgmt/territories/dimensionPublic
Service/types/">
<ns1:findCriteria>
<ns4:filter xmlns:ns4="http://xmlns.oracle.com/adf/svc/types/">
<ns4:conjunction>And</ns4:conjunction>
<ns4:group>
<ns4:conjunction>And</ns4:conjunction>
<ns4:upperCaseCompare>true</ns4:upperCaseCompare>
<ns4:item>
<ns4:conjunction>And</ns4:conjunction>
<ns4:upperCaseCompare>true</ns4:upperCaseCompare>
<ns4:attribute>TerrDimensionCode</ns4:attribute>
<ns4:operator>=</ns4:operator>
<ns4:value>Indst</ns4:value>
</ns4:item>
<ns4:item>
<ns4:conjunction>And</ns4:conjunction>
<ns4:upperCaseCompare>true</ns4:upperCaseCompare>
<ns4:attribute>PartitionTypeCode</ns4:attribute>
<ns4:operator>=</ns4:operator>
<ns4:value>PRODUCTION</ns4:value>
</ns4:item>
</ns4:group>
</ns4:filter>
<ns5:excludeAttribute xmlns:ns5="http://xmlns.oracle.com/adf/svc/types/"/>
</ns1:findCriteria>
<ns1:findControl>
<ns6:retrieveAllTranslations
xmlns:ns6="http://xmlns.oracle.com/adf/svc/types/">false</ns6:retrieveAllTranslations>
</ns1:findControl>
</ns1:findTerritoryDimensionMember>
</soap:Body>
<ns2:TerritoryRule>
<ns2:TerritoryVersionId>300100036992844</ns2:TerritoryVersionId>
<ns2:TerritoryRuleId>300200036992844</ns2:TerritoryRuleId>
<ns2:RuleOperatorCode>INCLUSION</ns2:RuleOperatorCode>
<ns2:RuleTypeCode>INCLUSION</ns2:RuleTypeCode>
<ns2:TerritoryRuleBoundary1>
<ns2:TerritoryRuleId>300200036992844</ns2:TerritoryRuleId>
<ns2:TerrDimensionCode>Indst</ns2:TerrDimensionCode>
<ns2:TerritoryRuleBndryValue1>
<ns2:TerrDimIntgId>ONE VOICE~1</ns2:TerrDimIntgId>
<ns2:TerrDimensionCode>Indst</ns2:TerrDimensionCode>
</ns2:TerritoryRuleBndryValue1>
<ns2:TerritoryRuleBndryValue1>
<ns2:TerrDimIntgId>ONE VOICE~1000</ns2:TerrDimIntgId>
<ns2:TerrDimensionCode>Indst</ns2:TerrDimensionCode>
</ns2:TerritoryRuleBndryValue1>
</ns2:TerritoryRuleBoundary1>
</ns2:TerritoryRule>
</ns1:territoryService>
</ns1:mergeTerritoryInProposal>
</soap:Body>
• Step 4 – Update Proposal (To update the proposal with the activation date
on which the proposal activation is intended)
o Sample Payload – Refer example 1, step 5