Oracle Service Agreements Conversion: Author: Ritu Malhotra, Gautam P October 2006
Oracle Service Agreements Conversion: Author: Ritu Malhotra, Gautam P October 2006
1. Executive Summary.......................................................................................3
2. Overview of Contracts ...................................................................................5
2.1. Types of Contracts .....................................................................................5
2.2. Structure.....................................................................................................5
3. Key Decisions ................................................................................................7
4. Methodology ................................................................................................10
4.1. Design ......................................................................................................10
4.2. Design Tips ..............................................................................................10
4.3. Pre Conversion Requirement ...................................................................11
4.4. Process Flow............................................................................................12
4.5. Verification of Migrated contracts .............................................................13
5. Oracle API’s.................................................................................................15
5.1. Contract Header Creation ........................................................................15
5.2. Line Creation............................................................................................15
5.3. Sub Line Creation ....................................................................................15
5.4. Billing Schedule Creation and Update......................................................15
5.5. Contract Security Access .........................................................................16
5.6. Price reflection at Service Line.................................................................16
5.7. Security Description and Text ..................................................................16
5.8. Sales Credit..............................................................................................16
5.9. Standard APIs in SC Module....................................................................16
5.10. Core Tables ..........................................................................................17
6. Key Challenges............................................................................................18
6.1. Performance.............................................................................................18
6.2. Tips for Improving Performance ...............................................................18
6.3. Tax Structure Setup .................................................................................18
6.4. Billing Schedules Creation and Update....................................................19
Briefly, the contracts cycle consists of the following steps. When goods are
purchased by a customer, there could be associated services bundled with the
goods purchased. The purchased item is tracked in IB and the agreement to
provide the service for a fee is tracked in a contract. Contract would track the
party with which the agreement is signed and agreed upon terms, conditions,
prices, discounts, billing schedule payment terms, renewal options, and
fulfillment. Based on the billing schedules customer invoices would be sent out.
Oracle Service Contracts enables users to design, manage, and bill for service
offerings tailored to their customers’ needs. A contract provides complete
solution to manage warranties, subscription and usages. It makes it possible to
manage the entire contract life cycle, including contract creation, renewal, and
termination. All contracts are held centrally. There are three types of contract:
2.2. Structure
Each contract will have Lines that would represent service, usage or subscription
item etc that is covered. Types of Lines are:
o Usage: charges customer based on usage. For e.g.: photo copier machine
usage
o Subscription: This covers subscriptions made by customer. For e.g.:
yearly subscription of magazine or collateral material send through email.
o Service: this type of line covers broad category of items that can include
activities like installation of items, repair.
Each line would have Sub lines that would specify exactly what service covers or
the counters when it is usage line. The types of Sub Lines are:
o Usage: This type of sub lines specifies the counter which is used for
usage tracking.
o Subscription: It doesn’t allow having any sub lines
o Service: This type of line covers: Party, Customer, Site, System, Product
and Item.
3. Key Decisions
There are certain businesses decisions need to be taken before designing the
conversion process. A few of them are discussed below:
3.2. Contracts which are not in Active and Signed status need not to be
migrated if volume of data is huge. But for legal issues, terminated and
expired contracts might need to be migrated.
3.3. This is the stage where data can be cleaned as much as possible. If
inactive contacts information is present in ACTIVE contract, we don’t need
to migrate this instead migrate the correct and active contact information.
On similar lines, inactive sales person information can be dropped.
3.4. Older version of contracts and notes information which is no more relevant
can be dropped off.
3.5. If active contract is having terminated lines or expired lines even these can
be dropped off after considering the legal formalities.
3.6. Any contract attachments which no longer holds good can also be
dropped off. If Legacy system is not being dismantled then this can be
used for reference.
3.7. Pricing policies - Whether items price would be overridden to the price in
the price list. If items price needs to be overridden in contract while
migrating them then couple of profile option should be set as given below.
o OKS: Use Advanced Pricing for Manual Adjustment: should be set
to No.
o OKC: Allow Manual Price Adjustment: should be left as blank.
o OKC: Enable Advanced Pricing: Should be set to yes
3.11. Need to decide on invoicing rule, accounting rule and payment terms
depending on when amount needs to be interfaced to AR and when
revenue should be recognized. For e.g.: If the customer needs to be billed
at the start of each month, choose Advance Invoice as the Invoicing Rule
for the contract.
3.15. The level of coverage to use depends on the type of service customer are
selling and on the different needs of enterprise. Type of line and sub lines
gets decided based on this. For e.g. If customer covers a broad category
of items that can include activities such as field service, depot repair, call
center, technical support, or any other user-defined business activities
then type of line would be “Service”. The following table provides
suggested guidelines. It lists some of the main business uses and lists the
recommended covered levels for each.
4.1.2. Create Staging tables to hold legacy data. Additional columns can be
created to hold ids for the same columns. Stamping id’s for the columns
during the validate process will give improvement in performance.
4.1.3. Create a validation process which will ensure validity and integrity of
inbound data. This process can include a set of programs that will validate
and additionally stamp the column id’s that are derived for validation. This
id’s will be used by Oracle Service Contracts APIs. The errors
encountered during the validation phase can be captured in the same
staging table itself or separate custom error processing table.
4.1.4. Once the validation process is completed, the same program will pass the
validated data/id to the appropriate Service Contracts APIs, which then
create service agreements in Service Contracts module. The errors
encountered during the process can also be recorded into the staging
table itself or Custom Error processing tables.
4.2.2. Additional information at line, sub line level can be captured by defining
context sensitive DFF.
4.2.3. Security level additional information can be stored at security text and
description.
4.2.5. Billing schedules can be created by using Billing profile options or by using
billing streams. Use first method for setting up simple periodic billing
schedules, for example, when a customer orders a year of service and
wishes to be billed monthly or quarterly. Using second method would allow
creating complex billing schedules or billing schedules with irregular
periods, for example, when a customer orders additional service in the
middle of a billing period or requires service only intermittently. And
moreover, a billing stream is designed to speed up the creation of a set of
regular billing periods.
4.2.6. OKS: Billing Schedule Level profile option must be set to Billing type which
would be used. It can be either ‘Top Line’ or ‘Equal Amount’.
4.2.7. Sales Credits either at header level or line level is mandatory. If Data
extract doesn’t provide then default it to sales person of the Vendor.
4.3.2. Legacy/Oracle Older version items and install base records should have
been imported in install base. Items are “Service Contract Enabled”.
4.3.3. All the legacy /Oracle Older version ‘Systems’ should be defined in Oracle
installed Base.
4.4.1. Schematic
1. Pick contract header record from staging table and create header record.
While header record is created, we can also take care of below
requirements:
a) Create sales credit at contract header level
b) Add contacts to vendor and customer both party levels.
c) Add contract created to different security groups and resources.
2. If header record is created successfully then pick first line and create it.
While line record is created, we can also take care of below requirements:
a) Line level bill to account and ship to account can be overridden. We
can use other values of bill to and ship to account apart from the
values which are entered at header level.
b) Sales credits at service line level can be created.
3. Pick up first sub line which needs to be created under above service line
created and create a sub line. While creating sub line, we can associate IB
instances also. It depends on the type of sub line. Sub lines specify what
service covers or counters where usage is tracked. If line is of type
Service then type of sub lines which can be created are:
a) Party
b) Customer
c) Site
d) System: This type of sub line covers the complete system.
e) Product: This type of sub line needs an association with IB.
f) Item
Process all the sub lines for line created above.
4. Create or update billing schedule for the line created successfully in step
2.
Once contracts are successfully migrated, they need to be validated and verified.
It can be done by:
3. Run Service contracts main billing program and Master auto invoice
import program on few of the contracts for a customer. Verify created AR
transactions manually for Revenue recognized, monthly amount for the
customer and GL dates.
7. Run standard and custom reports on contracts and verify the results with
legacy system reports output data.
5. Oracle API’s
This section talks about main and important Oracle APIs which would be called
for migration.
If Item is IB track able then we can create covered product sub line with IB link
established. API is:
OKS_CONTRACTS_PUB.CREATE_COVERED_LINE
If item is non IB track able then we can create sub line of Item type. For creating
covered customer sub line, there is no single API which can be invoked. We
need to invoke group of APIs as listed below:
OKC_CONTRACT_PUB.CREATE_CONTRACT_LINE
OKS_TAX_UTIL_PVT.GET_TAX
OKS_CONTRACT_LINE_PUB.CREATE_LINE
OKC_CONTRACT_ITEM_PUB.CREATE_CONTRACT_ITEM
This is the area where there is least documentation available and it is the most
important part of a Service contract. Once all sub lines are created for a
particular line, we need to create billing schedules. API is:
OKS_CONTRACTS_PUB.CREATE_BILL_SCHEDULE. This API creates billing schedules
for both sub line and service line. It creates billing streams and individual billing
lines.
For updating billing schedules, there is no API. We can use below API:
OKS_BILL_SCH.CREATE_BILL_SCH_RULES.
This API also creates billing schedules for both sub line and service line. It
creates billing streams and individual billing lines both. But this API deletes all the
billing streams and individual billing first if already present and then creates new
ones. Please note that there is no separate public API to create billing schedules
just for sub line. This API creates/updates billing schedules for both lines: at sub
line and service line.
To add contract created to different security groups and resources API is:
OKC_CONTRACT_PUB.CREATE_CONTRACT_ACCESS.
The API which creates sub lines doesn’t update amount at line automatically. It
needs to be done explicitly by calling API: Oks_Qp_Int_Pvt.COMPUTE_PRICE.
This API computes the price and updates the price at service line. Depending on
the input parameter Intent, this API decides how price is computed at service
line. For Intent values refer Appendix.
To add security description and text under Contracts header Security /Text tab as
shown in below screen shot, there is no API. We will have to call direct update
statement to update these fields when contract header is created. Refer
appendix for update statement.
This is the biggest challenge for contracts conversion. There is no bulk API’s to
be used. So, one need to be very careful while deciding the methodology of
conversion.
If needed billing stream amounts can be stamped in staging table as and when
sub line is created. This approach improves performance drastically if contract is
for long duration and with lot of IB associations. We can even create billing
schedule once when first sub line is created and then create all sub lines and in
the end call update billing schedule API. This approach avoids calculating of all
id’s and parameters which are needed for creating billing schedules. It’s like you
have parameters, so create billing schedules once. And in the end when all sub
lines are created for a particular service line then update billing schedules.
Update API doesn’t need as many input parameters as Create billing schedule
needs.
6.2.3. Deciding on what data can be dropped off can even give performance
improvement such as dropping of attachments.
6.2.5. Billing history is being brought forward in new system or not. Reducing the
contract duration by not bringing in schedules for past duration would help
in drastic performance improvement.
This is the area where there is least documentation available and it is the most
important part of a Service contract. Once all sub lines are created for a
particular line, we need to create billing schedules through the API:
OKS_CONTRACTS_PUB.CREATE_BILL_SCHEDULE.
This API creates billing schedules for both sub line and service line. It creates
billing streams and individual billing lines.
The only difference between the two API’s is that the second API always deletes
already existing billing schedules if present and then creates fresh ones. When
schedule is already created and if you call
OKS_BILL_SCH.CREATE_BILL_SCH_RULES for updating then what would
happen is it would create additional billing streams and one would get to see two
billing streams instead of a single one.
Appendix 1 - Contract Structure and Mapping to Tables
The diagram below shows the contract table names and how they are linked to
each other.
ID ID ID
CHR_ID CLE_I CLE_ID
ID
RGP_ID
Rules
OKC_RULES_B
OKC_K_HEADERS_V
OKC_K_PARTY_ROLES
OKC_CONTACTS
OKC_RULES_B
• OKC_K_PARTY_ROLES_B
• If JTOT_OBJECT1_CODE = ‘OKX_PARTY’ join to HZ_PARTIES
• If JTOT_OBJECT1_CODE = ‘OKX_OPERUNIT’ join to
HR_ORGANIZATIONS
• OKC_RULES_B
• JTOT_OBJECT1_CODE, OBJECT1_ID1, OBJECT1_ID2 store
information on the rules that are stored in other tables (eg. Price
List)
• RULE_INFORMATION1 to RULE_INFORMATION15 store specific
details about a rule that is not available in other tables (eg.
Estimated Percent)
2. Contract Lines and Sub Lines Screen shot and its related tables:
OKC_K_LINES_V
OKC_K_ITEMS
OKC_K_LINES_V
OKC_K_ITEMS
Appendix 3 - Strategy for Rollback and Commit
We can have different approaches for commit and rollback. Strategy selected
controls performance also to some extend. Best recommended way would be to
commit only if the complete contract is created successfully. Header, all its lines
and all its sub lines are created successfully then commit for a particular contract.
If any one of them fails it would be best to rollback. This helps in achieving
maximum integrity of data created or migrated.
Appendix 4 - Price reflection at Line
The API which creates sub lines doesn’t update amount at line automatically. It
needs to be done explicitly by calling API: Oks_Qp_Int_Pvt.COMPUTE_PRICE.
Depending on the input parameter Intent, this API decides how price is computed
at service line.
Intent can take below values:
a. HP: Header Pricing. When intent is HP, it calculates the price for complete
contract at header level.
b. LP: Top Line Pricing. This computes price at line level. Service line id
would need to be passed as input parameter.
c. SP: Sub Line Pricing. This computes price at sub line level. Sub line id
would need to be passed as input parameter.
d. OA: Override Pricing. This would be used, when we are overriding price of
price provided in price list. It’s like sub line Sub total is overridden and
price needs to be computed at its line level, then this intent would need to
be passed.
e. SB_P: Subscription Pricing
f. SB_O: Subscription Override Pricing.
Appendix 5 - Security Description & Text
There is no API to populate Security Description and text. Direct update
statement would be required, such as:
UPDATE okc_k_headers_tl
SET description = Security Description from data extract,
Comments = Security Text from data extract
Where ID = ID of contract created.
Appendix 6 – Inventory of Oracle Standard API’s
No. Oracle Standard API Description Comments
OKS_TAX_UTIL_PVT.GET_TAX,
OKS_CONTRACT_LINE_PUB.CREA
TE_LINE,
OKC_CONTRACT_ITEM_PUB.CRE
ATE_CONTRACT_ITEM
6 OKS_CONTRACTS_PUB.CREATE_ To Create Billing
BILL_SCHEDULE Schedule
Appendix 7 – Inventory of Affected Base Tables
1 Check
Check the UOMs OKX_UNITS_OF_MEASURE_V for
UOM ( Day ,Month , Each )
2 Verify Contract Header Status OKC_STATUSES_TL
WHERE UPPER(MEANING)
=
UPPER(l_contract_header_status)
3 Verify the Contract Group FROM OKC_K_GROUPS_V
WHERE UPPER(NAME) =
UPPER(l_contract_group);
4 Verify the Currency Code SELECT 1
FROM FND_CURRENCIES
WHERE
UPPER(CURRENCY_CODE) =
UPPER(l_currency_code);
5 Verify the Workflow Process FROM OKC_PROCESS_DEFS_B
WHERE
UPPER(WF_PROCESS_NA
ME) = UPPER(l_workflow_process);
6 Verify the Price List FROM QP_LIST_HEADERS_tl a,
QP_LIST_HEADERS_b b
WHERE UPPER(a.NAME) =
UPPER(trim(l_pricelist_name))
7 Verify the Accounting Rules FROM RA_RULES
WHERE UPPER(NAME) =
UPPER(l_accounting_rule)
8 Verify the Invoicing Rules FROM RA_RULES
WHERE UPPER(NAME) =
UPPER(l_invoicing_rule)
9 Verify the Payment Terms FROM RA_TERMS
WHERE NAME =
l_payment_terms;
10 Verify the Customer FROM HZ_PARTIES
WHERE UPPER(PARTY_NAME) =
UPPER(l_customer_name)
11 Verify the Renewal Type FROM FND_LOOKUPS
WHERE LOOKUP_TYPE =
'OKC_RENEWAL_TYPE'
AND MEANING= _renewal_type;
12 Verify Line Renewal Type FROM FND_LOOKUPS
WHERE LOOKUP_TYPE =
'OKC_LINE_RENEWAL_TYPE'
AND MEANING= l_renewal_type;
13 Verify Contract Line Status FROM OKC_STATUSES_TL
WHEREUPPER(MEANING) =
UPPER(l_contract_line_status)
No. Validation Column Name Comments
14 FROM okx_salesreps_v
Check Sales Person WHERE NAME IN(l_sales_rep)
About Trianz
Trianz is a global consulting and professional services firm that helps leaders
successfully execute on business and technology initiatives to achieve results as
measured from a top management perspective. We provide a wide range of
management consulting, technology and engineering and operations outsourcing
services for a diversified global client base.
• Operations Consulting
• Enterprise Applications Services
• Software Product Engineering
• Transformational Outsourcing
Copyright in whole and in part of this document belongs to Trianz, Inc. This work has
been provided for informational purposes only, and may be copied for personal use only.
This work may not be used, sold, transferred, adapted, abridged, copied, or reproduced in
whole or in part, in any media, by enterprises, without the prior written permission of
Trianz, AND an acknowledgement of "Trianz" as the source of the content. All trademarks
and copyrights mentioned in this white paper are the property of their respective owners.
Neither the author nor Trianz bears any responsibility for damage resulting from the use of
the information contained herein.
For more information about Trianz and its capabilities, visit 'www.trianz.com'