This chapter covers the following topics:
Oracle Applications contains the following types of APIs:
Private APIs are for internal, development use only. Details are not provided to anyone outside of the immediate development environment, nor are they intended for use by anyone outside of the Oracle Applications development environment.
Public APIs are designed for customers and Oracle consultants to integrate non-Oracle systems into Oracle Applications or to extend the functionality of the base products. Oracle does not support public APIs unless they are published in a reference manual such as this one. The user accepts all risk and responsibility for working with non-published public APIs.
Public, published APIs are guaranteed by Oracle and that patches will not alter the API behavior. Public, published APIs are supported by Oracle to the same extent as released software.
For non-published APIs, Oracle expressly does not provide any guarantees regarding consistency of naming, usage, or behavior of any API (public or private) between releases. It is also possible that a patch could alter any characteristic of any non-published CRM API. As such, those who choose to use these APIs do so at their own risk. However, Oracle does attempt to minimize all changes to public APIs, even if not published.
Each published API provides an API specification, and definitions as for its parameters, data structures, and status messages. Sample scripts and documented process flow diagrams are included where applicable.
Note: The words procedure and API are used interchangeably in this document.
The specifications for the public APIs provided by Oracle Customer Interaction History define four categories of parameters:
Standard IN
Standard OUT
Procedure specific IN
Procedure specific OUT
Standard IN and OUT parameters are specified by the Oracle Applications business object API Coding Standards, and are discussed in the following sections.
Procedure specific IN and OUT parameter are related to the API being specified, and are discussed with that individual API.
The following table describes standard IN parameters, which are common to all public APIs provided by Oracle Customer Interaction History.
Parameter | Data Type | Required | Description |
---|---|---|---|
p_api_version | NUMBER | Yes | This must match the version number of the API. An unexpected error is returned if the calling program version number is incompatible with the current API version number (provided in the documentation). |
p_init_msg_list | VARCHAR2 | Yes | The valid values for this parameter are:
If set to true, then the API makes a call to fnd_msg_pub.initialize to initialize the message stack. To set to true, use the value, "T". If set to false then the calling program must initialize the message stack. This action is required to be performed only once, even in the case where more than one API is called. To set to false, use the value, "F". |
p_commit | VARCHAR2(1) | No | The valid values for this parameter are:
If set to true, then the API commits before returning to the calling program. To set to true, use the value, "T". If set to false, then it is the calling program's responsibility to commit the transaction. To set to false, use the value, "F". |
The following table describes standard OUT parameters, which are common to all public APIs provided by Oracle Customer Interaction History.
Note: All standard OUT parameters are required.
Parameter | Data Type | Description |
---|---|---|
x_return_status | VARCHAR2(1) | Indicates the return status of the API. The values returned are one of the following:
|
x_msg_count | NUMBER | Holds the number of messages in the message list. |
x_msg_data | VARCHAR2(2000) | Holds the encoded message if x_msg_count is equal to one. |
Verify the size of the column from the base table for that column when passing a parameter of a specific length. For example, if you pass a NUMBER value, first query to find the exact value to pass. An incorrect value can cause the API call to fail.
The following table describes optional IN parameters which are initialized to pre-defined values representing missing constants. These constants are defined for the common PL/SQL data types and should be used in the initialization of the API formal parameters.
Parameter | Type | Initialized Value |
---|---|---|
g_miss_num | CONSTANT | NUMBER:= 9.99E125 |
g_miss_char | CONSTANT | VARCHAR2(1):= chr(0) |
g_miss_date | CONSTANT | DATE:= TO_DATE('1','j'); |
These constants are defined in the package FND_API in the file fndpapis.pls. All columns in a record definition are set to the G_MISS_X constant as defined for the data type.
The following types of parameters are always validated during the API call:
Standard IN
Standard OUT
Mandatory procedure specific IN
Procedure specific OUT
If the API encounters any invalid parameters during the API call, then one of the following actions will occur:
An exception is raised.
An error message identifying the invalid parameter is generated.
All API actions are cancelled.
It is mandatory that every API call pass a version number for that API as its first parameter (p_api_version).
This version number must match the internal version number of that API. An unexpected error is returned if the calling program version number is incompatible with the current API version number.
Caution: The currently supported version at this time is 1.0. Use only this for the API version number.
In addition, the object version number must be input for all update and delete APIs.
If the object_version_number passed by the API matches that of the object in the database, then the update is completed.
If the object_version_number passed by the API does not match that of the object in the database, then an error condition is generated.
Note: It is not required that all status notifications provide a number identifier along with the message, although, in many cases, it is provided.
Every API must return one of the following states as parameter x_return_status after the API is called:
S (Success)
E (Error)
U (Unexpected error)
Each state can be associated with a status message. The following table describes each state.
Status | Description |
---|---|
S | Indicates that the API performed all the operations requested by its caller.
|
E | Indicates that the API failed to perform one or more of the operations requested by its caller. An error return status is accompanied by one or more messages describing the error. |
U | Indicates that the API encountered an error condition it did not expect, or could not handle, and that it is unable to continue with its regular processing.
|
In addition to these three types of possible status messages, you can also code the following additional message types:
Warnings
Information
To create a warning message, perform the following steps:
Create a global variable to be used to signal a warning condition. For example, this could be similar to the following:
G_RET_STS_WARNING := 'W'
This global variable is not part of the FND_API package.
Return this value if the warning condition is encountered. For example, using the same example as in step one, set up the following code in the API to process the warning condition:
x_return_status := G_RET_STS_WARNING
This code replaces the more usual:
x_return_status := fnd_api.g_ret_sts_unexp_error for "U"
If desired, perform a similar procedure to create Information messages.
Oracle Customer Interaction History provides other modules with a common framework for capturing and accessing all customer interaction data associated with customer contacts. Oracle Customer Interaction History provides a central repository for this data and includes APIs for tracking all automated or agent-based customer interactions.
A customer interaction contains up to four unique units of customer information, a media item, a media life cycle, an activity, and an interaction. The following figure illustrates the different units of information that comprise a customer interaction and how they are stored in the Oracle database.
The customer interaction obtains its media item information from the Media Items table.
The customer interaction obtains its media life cycle information from the Media Life cycle table.
The customer interaction obtains its interaction information from the Interactions table.
The customer interaction obtains its activity information from the Media Items table.
Customer Interaction
Media items are inbound and outbound communications that take place between a customer and a human or automated agent, a system or an application. One or more media items can be associated with a single activity. Telephone conversations and email correspondence between customers and agents are examples of media items.Media are the individual communication channels through which media items are delivered. Telephones, fax machines, automatic teller machines (ATMs), and email messages are examples of media.
A Media Lifecycle is a unit of time associated with the handling of a media item. For example, if a customer call passes through four different phone queues for different periods of time contains four segments in its lifecycle.
An activity is a business action performed by an agent as part of a customer interaction using one or more methods of communication called media items. Activities are recorded in Interaction History and can be viewed by using the Interaction History windows accessed from calling applications. Some examples of activities include an agent transferring a call, an agent emailing a marketing brochure, or a customer placing an order.
An interaction is a point of contact or touch point between a human or automated agent and a party such as a customer, a customer system, or a potential customer. An interaction is a timed entity with an outcome and a result that can be tracked. When an interaction is closed, it becomes an historical record that subsequently cannot be altered or modified. Multiple forms of communication or media items between the party and the agent can be included in a single interaction
Interaction History applications must identify customer interaction information stored in different Oracle database tables as part of a single customer interaction. The following figure illustrates how the Interaction History database tables relate to each other using primary and foreign key values.
The Media Items table contains one primary key, media_id.
The Media Lifecycle table contains one primary key, milcs_id and one foreign key, media_id.
The Interactions table contains one primary key, interaction_id.
The Activities table contains one primary key, activity_id and two foreign keys, media_id and interaction_id.
Relating Customer Interaction Tables
All public procedures (APIs) relating to media items, media lifecycles, interactions, and activities are stored in the JTF_IH_PUB package. This package contains three types of Oracle Customer Interaction History APIs: Non-Cached Creation APIs, Cached Creation APIs, and Counting APIs.
The Oracle Customer Interaction History APIs use the following data structures
PL/SQL record types are used in all open, add, and close Interaction History APIs. In certain cases, nested record types are used as well.
For example, in the Create_Interaction API:
Input parameter p_activities is a record of type activity_tbl_type.
In turn, activity_tbl_type contains a record of type activity_rec_type as one of its elements.
Using nested data structures in this fashion enables the calling API to pass one or more activities to an Interaction History creation API.
This composite record type enumerates all the elements that represent an interaction record. This business entity represents a contact point between a customer, customer system, or potential customer and a single human or automated agent.
TYPE interaction_rec_type IS RECORD ( interaction_id NUMBER :=fnd_api.g_miss_num, reference_form VARCHAR2(1000) :=fnd_api.g_miss_char, follow_up_action VARCHAR2(80) :=fnd_api.g_miss_char, duration NUMBER := fnd_api.g_miss_num, end_date_time DATE :=fnd_api.g_miss_date, inter_interaction_duration NUMBER :=fnd_api.g_miss_num, non_productive_time_amount NUMBER :=fnd_api.g_miss_num, preview_time_amount NUMBER :=fnd_api.g_miss_num, productive_time_amount NUMBER :=fnd_api.g_miss_num, start_date_time DATE :=fnd_api.g_miss_date, wrapUp_time_amount NUMBER :=fnd_api.g_miss_num, handler_id NUMBER :=fnd_api.g_miss_num, script_id NUMBER :=fnd_api.g_miss_num, outcome_id NUMBER :=fnd_api.g_miss_num, result_id NUMBER :=fnd_api.g_miss_num, reason_id NUMBER :=fnd_api.g_miss_num, resource_id NUMBER :=fnd_api.g_miss_num, party_id NUMBER :=fnd_api.g_miss_num, parent_id NUMBER :=fnd_api.g_miss_num, object_id NUMBER :=fnd_api.g_miss_num, object_type VARCHAR2(30) :=fnd_api.g_miss_char, source_code_id NUMBER :=fnd_api.g_miss_num, source_code VARCHAR2(100) :=fnd_api.g_miss_char, attribute1 VARCHAR2(150) :=fnd_api.g_miss_char, attribute2 VARCHAR2(150) :=fnd_api.g_miss_char, attribute3 VARCHAR2(150) :=fnd_api.g_miss_char, attribute4 VARCHAR2(150) :=fnd_api.g_miss_char, attribute5 VARCHAR2(150) :=fnd_api.g_miss_char, attribute6 VARCHAR2(150) :=fnd_api.g_miss_char, attribute7 VARCHAR2(150) :=fnd_api.g_miss_char, attribute8 VARCHAR2(150) :=fnd_api.g_miss_char, attribute9 VARCHAR2(150) :=fnd_api.g_miss_char, attribute10 VARCHAR2(150) :=fnd_api.g_miss_char, attribute11 VARCHAR2(150) :=fnd_api.g_miss_char, attribute12 VARCHAR2(150) :=fnd_api.g_miss_char, attribute13 VARCHAR2(150) :=fnd_api.g_miss_char, attribute14 VARCHAR2(150) :=fnd_api.g_miss_char, attribute15 VARCHAR2(150) :=fnd_api.g_miss_char, attribute_category VARCHAR2(30) :=fnd_api.g_miss_char, touchpoint1_type VARCHAR2(30) := 'PARTY', touchpoint2_type VARCHAR2(30) := 'RS_EMPLOYEE', method_code VARCHAR2(30) :=fnd_api.g_miss_char, bulk_writer_code VARCHAR2(240) := fnd_api.g_miss_char, bulk_batch_type VARCHAR2(240) := fnd_api.g_miss_char, bulk_batch_id NUMBER := fnd_api.g_miss_num, bulk_interaction_id NUMBER := fnd_api.g_miss_num, primary_party_id NUMBER := fnd_api.g_miss_num, contact_rel_party_id NUMBER := fnd_api.g_miss_num, contact_party_id NUMBER := fnd_api.g_miss_num );
For validations performed on these record values, see Appendix D, Data Validations.
This composite record type enumerates all elements that represent an activity record. This business entity can be associated with the business functions performed during an interaction.
TYPE activity_rec_type IS RECORD ( activity_id NUMBER := fnd_api.g_miss_num, duration NUMBER := fnd_api.g_miss_num, cust_account_id NUMBER := fnd_api.g_miss_num, cust_org_id NUMBER := fnd_api.g_miss_num, role VARCHAR2(240) := fnd_api.g_miss_char, end_date_time DATE :=fnd_api.g_miss_date, start_date_time DATE :=fnd_api.g_miss_date, task_id NUMBER :=fnd_api.g_miss_num, doc_id NUMBER :=fnd_api.g_miss_num, doc_ref VARCHAR2(30) :=fnd_api.g_miss_char, doc_source_object_name VARCHAR2(80) :=fnd_api.g_miss_char, media_id NUMBER :=fnd_api.g_miss_num, action_item_id NUMBER :=fnd_api.g_miss_num, interaction_id NUMBER :=fnd_api.g_miss_num, outcome_id NUMBER :=fnd_api.g_miss_num, result_id NUMBER :=fnd_api.g_miss_num, reason_id NUMBER :=fnd_api.g_miss_num, description VARCHAR2(1000) :=fnd_api.g_miss_char, action_id NUMBER :=fnd_api.g_miss_num, interaction_action_type VARCHAR2(240) :=fnd_api.g_miss_char, object_id NUMBER :=fnd_api.g_miss_num, object_type VARCHAR2(30) :=fnd_api.g_miss_char, source_code_id NUMBER :=fnd_api.g_miss_num, source_code VARCHAR2(100) :=fnd_api.g_miss_char, script_trans_id NUMBER :=fnd_api.g_miss_num, attribute1 VARCHAR2(150) :=fnd_api.g_miss_char, attribute2 VARCHAR2(150) :=fnd_api.g_miss_char, attribute3 VARCHAR2(150) :=fnd_api.g_miss_char, attribute4 VARCHAR2(150) :=fnd_api.g_miss_char, attribute5 VARCHAR2(150) :=fnd_api.g_miss_char, attribute6 VARCHAR2(150) :=fnd_api.g_miss_char, attribute7 VARCHAR2(150) :=fnd_api.g_miss_char, attribute8 VARCHAR2(150) :=fnd_api.g_miss_char, attribute9 VARCHAR2(150) :=fnd_api.g_miss_char, attribute10 VARCHAR2(150) :=fnd_api.g_miss_char, attribute11 VARCHAR2(150) :=fnd_api.g_miss_char, attribute12 VARCHAR2(150) :=fnd_api.g_miss_char, attribute13 VARCHAR2(150) :=fnd_api.g_miss_char, attribute14 VARCHAR2(150) :=fnd_api.g_miss_char, attribute15 VARCHAR2(150) :=fnd_api.g_miss_char, attribute_category VARCHAR2(30) :=fnd_api.g_miss_char, bulk_writer_code VARCHAR2(240) := fnd_api.g_miss_char, bulk_batch_type VARCHAR2(240) := fnd_api.g_miss_char, bulk_batch_id NUMBER := fnd_api.g_miss_num, bulk_interaction_id NUMBER := fnd_api.g_miss_num, );
This composite record type enumerates all elements that represent a media record. This business entity can be generated by a customer, by the system, or an application.
TYPE media_rec_type IS RECORD ( media_id NUMBER :=fnd_api.g_miss_num, source_id NUMBER :=fnd_api.g_miss_num, direction VARCHAR2(240) :=fnd_api.g_miss_char, duration NUMBER := fnd_api.g_miss_num, end_date_time DATE :=fnd_api.g_miss_date, interaction_performed VARCHAR2(240) :=fnd_api.g_miss_char, start_date_time DATE :=fnd_api.g_miss_date, media_data VARCHAR2(80) :=fnd_api.g_miss_char, source_item_create_date_time DATE :=fnd_api.g_miss_date, source_item_id NUMBER :=fnd_api.g_miss_num, media_item_type VARCHAR2(80) :=fnd_api.g_miss_char, media_item_ref VARCHAR2(240) :=fnd_api.g_miss_char, media_abandon_flag VARCHAR2(1) :=fnd_api.g_miss_char, media_transferred_flag VARCHAR2(1) :=fnd_api.g_miss_char, server_group_id NUMBER :=fnd_api.g_miss_num, dnis VARCHAR2(30) :=fnd_api.g_miss_char, ani VARCHAR2(30) :=fnd_api.g_miss_char, classification VARCHAR2(64) :=fnd_api.g_miss_char, bulk_writer_code VARCHAR2(240) := fnd_api.g_miss_char, bulk_batch_type VARCHAR2(240) := fnd_api.g_miss_char, bulk_batch_id NUMBER := fnd_api.g_miss_num, bulk_interaction_id NUMBER := fnd_api.g_miss_num, address VARCHAR2(2000) := fnd_api.g_miss_char, );
This composite record type enumerates all elements that represent a media lifecycle record. This business entity unit represents a unit of time associated with the handling of a media item.
TYPE media_lc_rec_type IS RECORD ( start_date_time DATE :=fnd_api.g_miss_date, type_type VARCHAR2(80) :=fnd_api.g_miss_char, type_id NUMBER :=fnd_api.g_miss_num, duration NUMBER :=fnd_api.g_miss_num, end_date_time DATE :=fnd_api.g_miss_date, milcs_id NUMBER :=fnd_api.g_miss_num, milcs_type_id NUMBER :=fnd_api.g_miss_num, media_id NUMBER :=fnd_api.g_miss_num, handler_id NUMBER :=fnd_api.g_miss_num, resource_id NUMBER :=fnd_api.g_miss_num, milcs_code VARCHAR2(80) :=fnd_api.g_miss_char, bulk_writer_code VARCHAR2(240) := fnd_api.g_miss_char, bulk_batch_type VARCHAR2(240) := fnd_api.g_miss_char, bulk_batch_id NUMBER := fnd_api.g_miss_num, bulk_interaction_id NUMBER := fnd_api.g_miss_num, );
Applications with rapid transaction requirements, such as predictive dialing products, can take advantage of the following non-cached creation APIs: Create_Interaction, Create_MediaItem, and Create_MediaLifecycle.
Non-cached creation APIs enable a client application to write and close an interaction in a single API call. This action is more efficient than that used for the cached APIs as the record is written and created in one transaction cycle. However, the client application must persist the interaction data during the creation of the interaction, or the entire interaction record can be lost if the data flow is interrupted.
If you use non-cached creation APIs for transactions and communication between the client application and the server is disrupted during creation of the record, then the entire transaction is lost.
The following figure describes a common sequence of operations performed when a calling application invokes non-cached creation APIs. The process flows described in this figure are common but not required since some API calls are optional.
The Create_MediaItem API creates a media item in the Media Items table and passes a unique sequence generated identifier back to the calling application as x_media_id.
When the calling application invokes the Create_MediaLifecycle API, it passes the media item's unique identifier as p_media_id. The Create_MediaLifecycle API then creates a media lifecycle record in the Media Lifecycles table.
Note: Media Item and Media Lifecycle calls are optional since interactions can exist without a media item or its associated media lifecycle record.
When the calling application invokes the Create_Interaction API, the following events occur:
The calling application passes the media item's unique identifier as p_media_id. The Create_Interaction API then creates an interaction in the Interactions table and sets the interaction to inactive so that it can no longer be modified.
The Create_Interaction API then creates one or more activities in the Activities table, associates the activity with the interaction, and sets the activity to inactive so that it can no longer be modified
Non-cached creation API Process Flow
The Create_MediaItem API creates a media item in the Media Items table. This procedure is optional since an interaction can be created without any media items and their associated media lifecycles. Currently some applications create a media item and pass its media_id value to the calling application which subsequently passes it to the Create_Interaction API.
For example, media items are currently created by Advanced Outbound (Predictive Calls), Advanced Inbound (OTM), 1-to-1 Fulfillment, and E-mail Center. In the first two cases the media_id value is passed to the desktop application (Telesales, Customer Care, etc.) which enables these applications to ass.ociate the media item with the activities when they create an interaction and it's associated activities
PROCEDURE create_mediaitem ( p_api_version in number, p_init_msg_list in varchar2 default fnd_api.g_false, p_commit in varchar2 default fnd_api.g_false, p_resp_appl_id in number default null, p_resp_id in number default null, p_user_id in number, p_login_id in number default null, x_return_status out varchar2, x_msg_count out number, x_msg_data out varchar2, p_media in media_rec_type, p_mlcs in mlcs_tbl_type, );
1.0
The Create_MediaItem API sets the value of the input parameter to NULL if the parameter corresponds to the value of the G_MISS_X constant. If the parameter does not correspond to this constant, then the API retains the passed-in value.
The following table describes the IN parameters associated with this API.
Parameter | Data Type | Required | Descriptions and Validations |
---|---|---|---|
p_api_version | NUMBER | Yes | |
p_init_msg_list | VARCHAR2 | Yes | |
p_commit | VARCHAR2 | Yes | |
p_resp_appl_id | NUMBER | No1 The Application ID, Responsibility ID, and User ID determine which profile values are used as defaults. Those items marked with an asterisk also follow these guidelines. |
Application identifier |
p_resp_id | NUMBER | No* | Responsibility identifier |
p_user_id | NUMBER | No* | Corresponds to the column USER_ID in the table FND_USER, and identifies the Oracle Applications user. |
p_login_id | NUMBER | No | Corresponds to the column LOGIN_ID in the table FND_LOGINS, and identifies the login session. |
p_media | media_rec_type | Yes | |
p_mlcs | mlcs_tbl_type | Yes |
1 The Application ID, Responsibility ID, and User ID determine which profile values are used as defaults. Those items marked with an asterisk also follow these guidelines.
The following table describes the OUT parameters associated with this API.
Parameter | Data Type |
---|---|
x_return_status | VARCHAR2 |
x_msg_count | NUMBER |
x_msg_data | VARCHAR2 |
The Create_MediaLifecycle API creates a media lifecycle record in the Media Lifecycle table. This procedure is optional since an interaction can be created without any media items and their associated media lifecycles.
PROCEDURE create_medialifecycle ( p_api_version in number, p_init_msg_list in varchar2 default fnd_api.g_false, p_commit in varchar2 default fnd_api.g_false p_resp_appl_id in number default null, p_resp_id in number default null, p_user_id in number, p_login_id in number default null, x_return_status out varchar2, x_msg_count out number, x_msg_data out varchar2, p_media_lc_rec in media_lc_rec_type );
1.0
The Create_MediaLifecycle API sets the value of the input parameter to NULL if the parameter corresponds to the value of the G_MISS_X constant. If the parameter does not correspond to this constant, then the API retains the passed-in value.
The following table describes the IN parameters associated with this API.
Parameter | Data Type | Required | Descriptions and Validations |
---|---|---|---|
p_api_version | NUMBER | Yes | |
p_init_msg_list | VARCHAR2 | Yes | |
p_commit | VARCHAR2 | Yes | |
p_resp_appl_id | NUMBER | No1 The Application ID, Responsibility ID, and User ID determine which profile values are used as defaults. Those items marked with an asterisk also follow these guidelines. |
Application identifier |
p_resp_id | NUMBER | No* | Responsibility identifier |
p_user_id | NUMBER | No* | Corresponds to the column USER_ID in the table FND_USER, and identifies the Oracle Applications user. |
p_login_id | NUMBER | No | Corresponds to the column LOGIN_ID in the table FND_LOGINS, and identifies the login session. |
p_media_lc_rec | media_lc_rec_type | Yes | This record captures the media lifecycle. The following record parameters are always validated:
If the start_date_time parameter is not supplied, then sysdate is inserted in its place.
|
1 The Application ID, Responsibility ID, and User ID determine which profile values are used as defaults. Those items marked with an asterisk also follow these guidelines.
The following table describes the OUT parameters associated with this API.
Parameter | Data Type |
---|---|
x_return_status | VARCHAR2 |
x_msg_count | NUMBER |
x_msg_data | VARCHAR2 |
The Create_Interaction API creates an interaction record in the Interactions table, associates it with one or more activities in the Activities table and sets the status of the interaction to inactive. You can pass multiple Activity Records in the Create_Interaction API using the p_activities parameter. The data type for this parameter is activity_tlb_type which is a table of activity_rec_type values.
PROCEDURE create_interaction ( p_api_version in number, p_init_msg_list in varchar2 default fnd_api.g_false, p_commit in varchar2 default fnd_api.g_false p_resp_appl_id in number default null, p_resp_id in number default null, p_user_id in number, p_login_id in number default null, x_return_status out varchar2, x_msg_count out number, x_msg_data out varchar2, p_interaction_rec in interaction_rec_type, p_activities in activity_tbl_type );
1.0
The Create_Interaction API sets the value of the input parameter to NULL if the parameter corresponds to the value of the G_MISS_X constant. If the parameter does not correspond to this constant, then the API retains the passed-in value.
The following table describes the IN parameters associated with this API.
Parameter | Data Type | Required | Descriptions and Validations |
---|---|---|---|
p_api_version | NUMBER | Yes | |
p_init_msg_list | VARCHAR2 | Yes | |
p_commit | VARCHAR2 | Yes | |
p_resp_appl_id | NUMBER | No1 | Application identifier |
p_resp_id | NUMBER | No* | Responsibility identifier |
p_user_id | NUMBER | No* | Corresponds to the column USER_ID in the table FND_USER, and identifies the Oracle Applications user. |
p_login_id | NUMBER | No | Corresponds to the column LOGIN_ID in table FND_LOGINS, and identifies the login session. |
p_interaction_rec | INTERACTION_REC_TYPE | Yes | Contains the elements that comprise the interaction record. The following record parameters are always validated:
If the start_date_time parameter is not supplied, then sysdate is inserted in its place.
|
p_activities | activity_tbl_type | Yes | The following record parameters are always validated:
If the start_date_time parameter is not supplied, then sysdate is inserted in its place.
|
1 The Application ID, Responsibility ID, and the User ID determine which profile values are used as defaults. Those items marked with an asterisk also follow these guidelines.
The following table describes the OUT parameters associated with this API.
Parameter | Data Type |
---|---|
x_return_status | VARCHAR2 |
x_msg_count | NUMBER |
x_msg_data | VARCHAR2 |
Desktop applications, such as a service request system, that must retain interaction information even when transactions are broken as well as the ability to associate multiple media items and activities with a single interaction can take advantage of cached creation APIs.
Cached creation APIs enable Interaction History clients to create and update interactions on the server prior to closing the interaction, before the interaction becomes an historical record which cannot be updated or deleted. In this case, a partial interaction record is stored on the server and updated as required until the final Close_Interaction API call makes it a historical record. This mechanism provides some level of fault-tolerance and recovery to client applications creating the interactions but also provides slower performance than non-cached creation APIs. Unlike the non-cached creation APIs, the cached creation APIs require several procedures to create a single media item, media lifecycle, activity, or interaction. Cached creation APIs can also have one set of APIs nested within another.
If you use cached creation APIs for transactions and communication between the client application and the server is disrupted, all information captured up to the point of disruption can be recovered.
Because cached creation APIs perform their operations in a specific sequence, APIs that perform an update function cannot be invoked unless a corresponding API that performs an open or add function has first been invoked. For example, the Update_Interaction API cannot be invoked unless the corresponding Open_Interaction API has first been invoked. The API cannot be invoked unless the corresponding Create_Interaction_Activity API has first been invoked. Similarly an update API cannot be invoked for a record that has already been closed. For example, after you invoke the Close_Interaction API you cannot invoke the Update_Interaction API for the same record.
The following figure provides an overview of a common process flow for cached creation APIs. The process flows described in this figure are common but not required since some API calls are optional.
The calling application executes the first of three steps required to create a media item, by invoking the Open_MediaItem API. This API inserts generic values in the Media Items table of the Oracle database.
The calling application executes the second of three step required to create a media item, by invoking the Update_MediaItem API. This API updates the Media Items table with values supplied by the calling application.
Note: If a media lifecycle record is added to the media item, this must occur before closing the media item record. Once the media item record is closed it cannot be modified.
Before the media item becomes an historical record in the database, it can optionally contain an associated media lifecycle record. The calling application executes the first of two steps required to create a media lifecycle record by invoking the Add_MediaLifecycle API. This API inserts generic values in the Media Lifecycles table.
The calling application executes the second of two steps to create a media lifecycle record by invoking the Update_MediaLifecycle API. This API updates the media lifecycle record with values supplied by the calling application.
The calling application executes the third of three steps required to create a media item by invoking the Close_MediaItem API. This API performs all required validations to make the media item and its associated media lifecycle record, historical records.
Note: Media Item and Media Lifecycle calls are optional since interactions can exist without a media item or its associated media lifecycle record.
The calling application executes the first of three steps required to create an interaction record by invoking the Open_Interaction API. This API inserts generic values in the Interactions table.
The calling application executes the second of three steps required to create an interaction by invoking the Update_Interaction API. This API updates the Interactions table with values supplied by the calling application.
Note: One or more activities must be created and associated with the interaction before closing the interaction record. Once the interaction record is closed it cannot be modified.
The calling application executes the first of three steps required to create an activity that is associated with the interaction by invoking the Create_Interaction_Activity API. This API inserts generic values in the Activities table.
The calling application executes the second of three steps required to create an activity that is associated with an interaction by invoking the API. This API updates the Activities table with values supplied by the calling application.
The calling application executes the third of three steps required to create an activity that is associated with an interaction by invoking the Duration API. This API updates the current activity's duration with values supplied by the calling application.
The calling application performs the third of three steps required to create an interaction by invoking the Close_Interaction API. This API performs all required validations to make the interaction and its associated activity historical records in the Oracle database.
Cached Creation API Process Flow Overview
The following figure provides a detailed explanation of the first five steps required to create a customer Interaction using the cached creation APIs. The process flows described in this figure are common but not required since some API calls are optional.
The Open_MediaItem API inserts generic records in the Media Items table of the Oracle database, sets the media item's status to active so that it can be updated, and returns a sequence generated identifier to the calling application as x_media_id.
The Update_MediaItem API updates the Media Items table with values supplied by the calling application and retains the media item's active status.
The calling application optionally associates a media lifecycle record with the media item by invoking the Add_MediaLifecycle API. The calling application inputs the media items's sequence generated identifier as p_media_id, inserts generic values in the Media Lifecycles table and sets the status of the media lifecycle to active so that it can be updated.
The Update_MediaLifecycle API updates the media lifecycle record with values supplied by the calling application and retains its active status.
The Close_MediaItem API sets the status of the media item and its associated media lifecycle record to inactive so that they can no longer be updated, and performs validations to verify that the media item and media lifecycle record are associated with each other.
Note: The process of creating a customer interaction record using the cached creation APIs is not yet complete. This process is continued in steps 6 -11 as illustrated in the following figure.
Cached Creation API Process Flow: Steps 1 - 5
The preceding figure provides a detailed explanation of the remaining six steps required to create a customer Interaction using the cached creation APIs.
The Open_Interaction API inserts generic records in the Interactions table, sets the interaction's status to active so that it can be updated, and returns a sequence generated identifier to the calling application as x_interaction_id.
The Update_Interaction API updates the Interactions table with values supplied by the calling application and retains the interaction's active status.
Note: One or more activities must be created and associated with the interaction before closing the interaction record. Once the interaction record is closed it cannot be modified.
The calling application invokes the Create_Interaction_Activity API, inputs the media item's unique identifier as p_media_id, and inputs the interaction's unique identifier as p_interaction_id. The API sends a sequence generated identifier to the calling application as x_activity_id, inserts generic records in the Activities table, and sets the activity status to active so that it can be updated.
The API updates the Activities table with values supplied by the calling application and retains the activity's active status.
The Duration API updates the Activities table 's END_DATE_TIME and DURATION fields with values supplied by the calling application, and retains the activity's active status so that it can still be modified.
The Create_Interaction API sets the status of the interaction and its associated activity to inactive so that they can no longer be updated, and performs validations to verify that the interaction and activity are associated with each other.
Cached Creation API Process Flow: Steps 6 -1 1
The Open_MediaItem API creates a media item in the Media Items table, sets the status of the media item to active, and returns a sequence generated media identification number as p_media_id.
PROCEDURE Open_MediaItem ( p_api_version in number, p_init_msg_list in varchar2 default fnd_api.g_false, p_commit in varchar2 default fnd_api.g_false p_resp_appl_id in number default null, p_resp_id in number default null, p_user_id in number, p_login_id in number default null, x_return_status out varchar2, x_msg_count out number, x_msg_data out varchar2, p_media_rec in media_rec_type, x_media_id out number );
1.0
The following table describes the IN parameters associated with this API.
Parameter | Data Type | Required | Descriptions and Validations |
---|---|---|---|
p_api_version | NUMBER | Yes | |
p_init_msg_list | VARCHAR2 | Yes | |
p_commit | VARCHAR2 | Yes | |
p_resp_appl_id | NUMBER | No1 | Application identifier |
p_resp_id | NUMBER | No* | Responsibility identifier |
p_user_id | NUMBER | No* | Corresponds to the column USER_ID in table FND_USER, and identifies the Oracle Applications user. |
p_login_id | NUMBER | No | Corresponds to the column LOGIN_ID in table FND_LOGINS, and identifies the login session. |
p_media | media_rec_type | Enumerates the elements that comprise a media record. The following record parameters are always validated:
If the start_date_time parameter is not supplied, then sysdate is inserted in its place.
|
1 The Application ID, Responsibility ID, and User ID determine which profile values are used as defaults. Those items marked with an asterisk also follow these guidelines.
The following table describes the OUT parameters associated with this API.
Parameter | Data Type | Description |
---|---|---|
x_return_status | VARCHAR2 | |
x_msg_count | NUMBER | |
x_msg_data | VARCHAR2 | |
x_media_id | NUMBER | The record number for the created media item. It is automatically generated by sequence JTF_IH_MEDIA_ITEMS_S1. |
The Update_MediaItem API updates the current Media Item with values supplied by the calling application and sets the status of the media item to active.
PROCEDURE Update_MediaItem ( p_api_version in number, p_init_msg_list in varchar2 default fnd_api.g_false, p_commit in varchar2 default fnd_api.g_false p_resp_appl_id in number default null, p_resp_id in number default null, p_user_id in number, p_login_id in number default null, x_return_status out varchar2, x_msg_count out number, x_msg_data out varchar2, p_media_rec in media_rec_type );
PROCEDURE
);
1.0
The Update_MediaItem API does not update columns which have passed-in values corresponding to the G_MISS_X constants.
The following table describes the IN parameters associated with this API.
Parameter | Data Type | Required | Descriptions and Validations |
---|---|---|---|
p_api_version | NUMBER | Yes | |
p_init_msg_list | VARCHAR2 | Yes | |
p_commit | VARCHAR2 | Yes | |
p_resp_appl_id | NUMBER | No1 | Application identifier |
p_resp_id | NUMBER | No* | Responsibility identifier |
p_user_id | NUMBER | No | Corresponds to the column USER_ID in the table FND_USER, and identifies the Oracle Applications user. |
p_login_id | NUMBER | No* | Corresponds to the column LOGIN_ID in table FND_LOGINS, and identifies the login session. |
p_media_rec | media_rec_type | Enumerates the elements that comprise a media record. The following record parameters are always validated:
If the start_date_time parameter is not supplied, then sysdate is inserted in its place.
|
1 The Application ID, Responsibility ID, and User ID determine which profile values are used as defaults. Those items marked with an asterisk also follow these guidelines.
The following table describes the OUT parameters associated with this API.
Parameter | Data Type |
---|---|
x_return_status | VARCHAR2 |
x_msg_count | NUMBER |
x_msg_data | VARCHAR2 |
The Add_MediaLifecycle API creates a media lifecycle record in the Media Lifecycle table, associates it with a Media Item passed by the calling application, and returns a sequence generated milcs_id number. The status of the media item and its associated media lifecycle remain active.
PROCEDURE Add_MediaLifecycle ( p_api_version in number, p_init_msg_list in varchar2 default fnd_api.g_false, p_commit in varchar2 default fnd_api.g_false p_resp_appl_id in number default null, p_resp_id in number default null, p_user_id in number, p_login_id in number default null, x_return_status out varchar2, x_msg_count out number, x_msg_data out varchar2, p_media_lc_rec in media_lc_rec_type, x_milcs_id out number );
1.0
The following table describes the IN parameters associated with this API.
Parameter | Data Type | Required | Descriptions and Validations |
---|---|---|---|
p_api_version | NUMBER | Yes | |
p_init_msg_list | VARCHAR2 | Yes | |
p_commit | VARCHAR2 | Yes | |
p_resp_appl_id | NUMBER | No1 The Application ID, Responsibility ID, and User ID determine which profile values are used as defaults. Those items marked with an asterisk also follow these guidelines. |
Application identifier |
p_resp_id | NUMBER | No* | Responsibility identifier |
p_user_id | NUMBER | No* | Corresponds to the column USER_ID in table FND_USER, and identifies the Oracle Applications user. |
p_login_id | NUMBER | No | Corresponds to the column LOGIN_ID in table FND_LOGINS, and identifies the login session. |
p_media_lc_rec | media_lc_rec_type | Composite record that enumerates the elements that comprise a media lifecycle. The following record parameters are always validated:
If the start_date_time parameter is not supplied, then sysdate is inserted in its place.
|
1 The Application ID, Responsibility ID, and User ID determine which profile values are used as defaults. Those items marked with an asterisk also follow these guidelines.
The following table describes the OUT parameters associated with this API.
Parameter | Data Type | Description |
---|---|---|
x_return_status | VARCHAR2 | |
x_msg_count | NUMBER | |
x_msg_data | VARCHAR2 | |
x_milcs_id | NUMBER | Corresponds to the sequence generated media lifecycle identifier for the record created. |
The Update_MediaLifecycle API updates the current media lifecycle record with values supplied by the calling application. The status of the media lifecycle remains active.
PROCEDURE Update_MediaLifecycle ( p_api_version in number, p_init_msg_list in varchar2 default fnd_api.g_false, p_commit in varchar2 default fnd_api.g_false p_resp_appl_id in number default null, p_resp_id in number default null, p_user_id in number, p_login_id in number default null, x_return_status out varchar2, x_msg_count out number, x_msg_data out varchar2, p_media_lc_rec in media_lc_rec_type );
1.0
The Update_MediaLifecycle API does not update columns with pass-in values that correspond to the G_MISS_X constants.
The following table describes the IN parameters associated with this API.
Parameter | Data Type | Required | Descriptions and Validations |
---|---|---|---|
p_api_version | NUMBER | Yes | |
p_init_msg_list | VARCHAR2 | Yes | |
p_commit | VARCHAR2 | Yes | |
p_resp_appl_id | NUMBER | No1 The Application ID, Responsibility ID, and User ID determine which profile values are used as defaults. Those items marked with an asterisk also follow these guidelines. |
Application identifier |
p_resp_id | NUMBER | No* | Responsibility identifier |
p_user_id | NUMBER | No* | Corresponds to the column USER_ID in table FND_USER, and identifies the Oracle Applications user. |
p_login_id | NUMBER | No | Corresponds to the column LOGIN_ID in table FND_LOGINS, and identifies the login session. |
p_media_lc_rec | media_lc_rec_type | Yes | Composite record that enumerates the elements that comprise a media lifecycle. The following record parameters are always validated:
If the start_date_time parameter is not supplied, then sysdate is inserted in its place.
|
1 The Application ID, Responsibility ID, and User ID determine which profile values are used as defaults. Those items marked with an asterisk also follow these guidelines.
The table describes the OUT parameters associated with this API.
Parameter | Data Type |
---|---|
x_return_status | VARCHAR2 |
x_msg_count | NUMBER |
x_msg_data | VARCHAR2 |
The Close_MediaItem API sets the status of the media item and its associated media lifecycle to inactive so that it can no longer be updated.
PROCEDURE Close_MediaItem ( p_api_version in number, p_init_msg_list in varchar2 default fnd_api.g_false, p_commit in varchar2 default fnd_api.g_false p_resp_appl_id in number default null, p_resp_id in number default null, p_user_id in number, p_login_id in number default null, x_return_status out varchar2, x_msg_count out number, x_msg_data out varchar2, p_media_rec in media_rec_type );
1.0
The following table describes the IN parameters associated with this API.
Parameter | Data Type | Required | Descriptions and Validations |
---|---|---|---|
p_api_version | NUMBER | Yes | |
p_init_msg_list | VARCHAR2 | Yes | |
p_commit | VARCHAR2 | Yes | |
p_resp_appl_id | NUMBER | No1 The Application ID, Responsibility ID, and User ID determine which profile values are used as defaults. Those items marked with an asterisk also follow these guidelines. |
Application identifier |
p_resp_id | NUMBER | No* | Responsibility identifier |
p_user_id | NUMBER | No* | Corresponds to the column USER_ID in table FND_USER, and identifies the Oracle Applications user. |
p_login_id | NUMBER | No | Corresponds to the column LOGIN_ID in table FND_LOGINS, and identifies the login session. |
p_media_rec | media_rec_type | Yes | Enumerates the elements that comprise a media record. The following record parameters are always validated:
If the start_date_time parameter is not supplied, then sysdate is inserted in its place.
If the end_date_time parameter is not supplied at the time that the Close_MediaItem API is invoked, then sysdate is inserted in its place. |
1 The Application ID, Responsibility ID, and User ID determine which profile values are used as defaults. Those items marked with an asterisk also follow these guidelines.
The following table describes the OUT parameters associated with this API.
Parameter | Data Type |
---|---|
x_return_status | VARCHAR2 |
x_msg_count | NUMBER |
x_msg_data | VARCHAR2 |
The Open_Interaction API creates an interaction in the Interactions table, sets the status of the interaction to active, and returns a sequence generated interaction_id number.
PROCEDURE Open_Interaction ( p_api_version in number, p_init_msg_list in varchar2 default fnd_api.g_false, p_commit in varchar2 default fnd_api.g_false p_resp_appl_id in number default null, p_resp_id in number default null, p_user_id in number, p_login_id in number default null, x_return_status out varchar2, x_msg_count out number, x_msg_data out varchar2, p_media_rec in media_rec_type );
1.0
The following table describes the IN parameters associated with this API.
Parameter | Data Type | Required | Descriptions and Validations |
---|---|---|---|
p_api_version | NUMBER | Yes | |
p_init_msg_list | VARCHAR2 | Yes | |
p_commit | VARCHAR2 | Yes | |
p_resp_appl_id | NUMBER | No1 The Application ID, Responsibility ID, and User ID determine which profile values are used as defaults. Those items marked with an asterisk also follow these guidelines. |
Application identifier |
p_resp_id | NUMBER | No* | Responsibility identifier |
p_user_id | NUMBER | No* | Corresponds to the column USER_ID in table FND_USER, and identifies the Oracle Applications user. |
p_login_id | NUMBER | No | Corresponds to the column LOGIN_ID in table FND_LOGINS, and identifies the login session. |
p_interaction_rec | interaction_rec_type | Yes | Contains the elements that comprise the interaction record. The following record parameters are always validated:
If the start_date_time parameter is not supplied, then sysdate is inserted in its place.
|
1 The Application ID, Responsibility ID, and User ID determine which profile values are used as defaults. Those items marked with an asterisk also follow these guidelines.
The following table describes the OUT parameters associated with this API.
Parameter | Data Type | Description |
---|---|---|
x_return_status | VARCHAR2 | |
x_msg_count | NUMBER | |
x_msg_data | VARCHAR2 | |
x_interaction_id | NUMBER | Corresponds to a sequence generated reference for the interaction record. |
The Update_Interaction API updates the current interaction with values supplied by the calling application. The state of the interaction remains open.
PROCEDURE update_interaction ( p_api_version in number, p_init_msg_list in varchar2 default fnd_api.g_false, p_commit in varchar2 default fnd_api.g_false p_resp_appl_id in number default null, p_resp_id in number default null, p_user_id in number, p_login_id in number default null, x_return_status out varchar2, x_msg_count out number, x_msg_data out varchar2, p_interaction_rec in interaction_rec_type );
1.1
Note: Calling with p_api_version of 1.0 performs single-party validation. Calling with p_api_version of 1.1 performs multiparty validation.
The Update_Interaction API does not update columns that have passed-in values corresponding to the G_MISS_X constants
The following table describes the IN parameters associated with this API.
Parameter | Date Type | Required | Descriptions and Validations |
---|---|---|---|
p_api_version | NUMBER | Yes | |
p_init_msg_list | VARCHAR2 | Yes | |
p_commit | VARCHAR2 | Yes | |
p_resp_appl_id | NUMBER | No1 The Application ID, Responsibility ID, and User ID determine which profile values are used as defaults. Those items marked with an asterisk also follow these guidelines. |
Application identifier |
p_resp_id | NUMBER | No* | Responsibility identifier |
p_user_id | NUMBER | No | Corresponds to the column USER_ID in table FND_USER, and identifies the Oracle Applications user. |
p_login_id | NUMBER | No | Corresponds to the column LOGIN_ID in table FND_LOGINS, and identifies the login session. |
p_interaction_rec | interaction_rec_type | Yes | Used in updating the interaction record. The following record parameters are always validated:
If the start_date_time parameter is not supplied, then sysdate is inserted in its place.
|
1 The Application ID, Responsibility ID, and User ID determine which profile values are used as defaults. Those items marked with an asterisk also follow these guidelines.
The following table describes the OUT parameters associated with this API.
Parameter | Data Type |
---|---|
x_return_status | VARCHAR2 |
x_msg_count | NUMBER |
x_msg_data | VARCHAR2 |
The Create_Interaction_Activity API creates an activity in the Activities table, associates it with the interaction passed by the calling application, and returns a sequence generated activity_id number. The status of the interaction and associated activity remain active.
PROCEDURE Create_Interaction_Activity ( p_api_version in number, p_init_msg_list in varchar2 default fnd_api.g_false, p_commit in varchar2 default fnd_api.g_false p_resp_appl_id in number default null, p_resp_id in number default null, p_user_id in number, p_login_id in number default null, x_return_status out varchar2, x_msg_count out number, x_msg_data out varchar2, p_activity_rec in activity_rec_type, x_activity_id out number );
1.0
The following table describes the IN parameters associated with this API.
Parameter | Data Type | Required | Descriptions and Validations |
---|---|---|---|
p_api_version | NUMBER | Yes | |
p_init_msg_list | VARCHAR2 | Yes | |
p_commit | VARCHAR2 | Yes | |
p_resp_appl_id | NUMBER | No1 The Application ID, Responsibility ID, and User ID determine which profile values are used as defaults. Those items marked with an asterisk also follow these guidelines. |
Application identifier |
p_resp_id | NUMBER | No* | Responsibility identifier |
p_user_id | NUMBER | No* | Corresponds to the column USER_ID in table FND_USER, and identifies the Oracle Applications user. |
p_login_id | NUMBER | No | Corresponds to the column LOGIN_ID in table FND_LOGINS, and identifies the login session. |
p_activity_rec | activity_rec_type | Yes | Used in updating the interaction record. The following record parameters are always validated:
If the start_date_time parameter is not supplied, then sysdate is inserted in its place.
|
1 The Application ID, Responsibility ID, and User ID determine which profile values are used as defaults. Those items marked with an asterisk also follow these guidelines.
The following table describes the OUT parameters associated with this API.
Parameter | Data Type | Description |
---|---|---|
x_return_status | VARCHAR2 | |
x_msg_count | NUMBER | |
x_msg_data | VARCHAR2 | |
x_activity_id | NUMBER | Corresponds to the sequence generated activity identifier for the record created. |
The Update_Interaction_Activity API updates the current activity with values supplied by the calling application. The status of the activity remains active.
PROCEDURE Update_Interaction_Activity ( p_api_version in number, p_init_msg_list in varchar2 default fnd_api.g_false, p_commit in varchar2 default fnd_api.g_false p_resp_appl_id in number default null, p_resp_id in number default null, p_user_id in number, p_login_id in number default null, x_return_status out varchar2, x_msg_count out number, x_msg_data out varchar2, p_activity_rec in activity_rec_type );
1.0
The Update_Interaction_Activity API does not update columns which have passed-in values corresponding to the G_MISS_X constants.
The following table describes the IN parameters associated with this API.
Parameter | Data Type | Required | Descriptions and Validations |
---|---|---|---|
p_api_version | NUMBER | Yes | |
p_init_msg_list | VARCHAR2 | Yes | |
p_commit | VARCHAR2 | Yes | |
p_resp_appl_id | NUMBER | No1 The Application ID, Responsibility ID, and User ID determine which profile values are used as defaults. Those items marked with an asterisk also follow these guidelines. |
Application identifier |
p_resp_id | NUMBER | No* | Responsibility identifier |
p_user_id | NUMBER | No* | Corresponds to the column USER_ID in table FND_USER, and identifies the Oracle Applications user. |
p_login_id | NUMBER | No | Corresponds to the column LOGIN_ID in table FND_LOGINS, and identifies the login session. |
p_activity_rec | activity_rec_type | Yes | Used in updating the interaction record. The following record parameters are always validated:
If the start_date_time parameter is not supplied, then sysdate is inserted in its place.
|
1 The Application ID, Responsibility ID, and User ID determine which profile values are used as defaults. Those items marked with an asterisk also follow these guidelines.
The following table describes the OUT parameters associated with this API.
Parameter | Data Type |
---|---|
x_return_status | VARCHAR2 |
x_msg_count | NUMBER |
x_msg_data | VARCHAR2 |
The Update_ActivityDuration API updates the current activity's end_date_time and duration fields with values supplied by the calling application.
PROCEDURE Update_ActivityDuration ( p_api_version in number, p_init_msg_list in varchar2 default fnd_api.g_false, p_commit in varchar2 default fnd_api.g_false p_resp_appl_id in number default null, p_resp_id in number default null, p_user_id in number, p_login_id in number default null, x_return_status out varchar2, x_msg_count out number, x_msg_data out varchar2, p_activity_id in number p_end_date_time in date, p_duration in number );
1.0
The Update_ActivityDuration API does not update columns which have passed-in values corresponding to the G_MISS_X constants.
The following table describes the IN parameters associated with this API.
Parameter | Data Type | Required | Descriptions and Validations |
---|---|---|---|
p_api_version | NUMBER | Yes | |
p_init_msg_list | VARCHAR2 | Yes | |
p_commit | VARCHAR2 | Yes | |
p_resp_appl_id | NUMBER | No1 | Application identifier |
p_resp_id | NUMBER | Optional* | Responsibility identifier |
p_user_id | NUMBER | Optional* | Corresponds to the column USER_ID in table FND_USER, and identifies the Oracle Applications user. |
p_login_id | NUMBER | No | Corresponds to the column LOGIN_ID in table FND_LOGINS, and identifies the login session. |
p_activity_id | NUMBER | Activity identifier. This number corresponds to a certain activity. | |
p_end_date_time | DATE | End date time. Time in date format at the end of the transaction. | |
p_duration | NUMBER | Duration. Time difference between the end_date_time and the start_date_time converted to seconds. |
1 The Application ID, Responsibility ID, and User ID determine which profile values are used as defaults. Those items marked with an asterisk also follow these guidelines.
The following table describes the OUT parameters associated with this API.
Parameter | Data Type |
---|---|
x_return_status | VARCHAR2 |
x_msg_count | NUMBER |
x_msg_data | VARCHAR2 |
The Close_Interaction API sets the status of the interaction and its associated activities to inactive so that they can no longer be updated.
PROCEDURE Close_Interaction ( p_api_version in number, p_init_msg_list in varchar2 default fnd_api.g_false, p_commit in varchar2 default fnd_api.g_false p_resp_appl_id in number default null, p_resp_id in number default null, p_user_id in number, p_login_id in number default null, x_return_status out varchar2, x_msg_count out number, x_msg_data out varchar2, p_interaction_rec in interaction_rec_type );
1.1
Note: Calling with p_api_version of 1.0 performs single-party validation. Calling with p_api_version of 1.1 performs multi-party validation.
The following table describes the IN parameters associated with this API.
Parameter | Data Type | Required | Descriptions and Validations |
---|---|---|---|
p_api_version | NUMBER | Yes | |
p_init_msg_list | VARCHAR2 | Yes | |
p_commit | VARCHAR2 | Yes | |
p_resp_appl_id | NUMBER | No1 The Application ID, Responsibility ID, and User ID determine which profile values are used as defaults. Those items marked with an asterisk also follow these guidelines. |
Application identifier |
p_resp_id | NUMBER | No* | Responsibility identifier |
p_user_id | NUMBER | No* | Corresponds to the column USER_ID in table FND_USER, and identifies the Oracle Applications user. |
p_login_id | NUMBER | No | Corresponds to the column LOGIN_ID in table FND_LOGINS, and identifies the login session. |
p_interaction_rec | interaction_rec_type | Yes | Contains the elements that comprise the interaction record. The following record parameters are always validated:
If the start_date_time parameter is not supplied, then sysdate is inserted in its place.
If the end_date_time parameter is not supplied at the time that the Close_Interaction API is invoked, then sysdate is inserted in its place.
|
1 The Application ID, Responsibility ID, and User ID determine which profile values are used as defaults. Those items marked with an asterisk also follow these guidelines.
The following table describes the OUT parameters associated with this API.
Parameter | Data Type |
---|---|
x_return_status | VARCHAR2 |
x_msg_count | NUMBER |
x_msg_data | VARCHAR2 |
The following are counting APIs:
The counting APIs are classified as selector methods. They return the count of an interaction or an activity based on filtering parameter values that are passed by the calling application.
Procedure | Description |
---|---|
Get_InteractionCount | Retrieves the interaction count from Interaction table. |
The Get_InteractionCount API retrieves the interaction count from table JTF_IH_INTERACTIONS based on the input parameters.
PROCEDURE Get_InteractionCount ( p_api_version in number, p_init_msg_list in varchar2 default fnd_api.g_false, p_resp_appl_id in number default null, p_resp_id in number default null, p_user_id in number, p_login_id in number default null, x_return_status out varchar2, x_msg_count out number, x_msg_data out varchar2, p_outcome_id in number, p_result_id in number, p_reason_id in number, p_attribute1 in varchar2 default null, p_attribute2 in varchar2 default null, p_attribute3 in varchar2 default null, p_attribute4 in varchar2 default null, p_attribute5 in varchar2 default null, p_attribute6 in varchar2 default null, p_attribute7 in varchar2 default null, p_attribute8 in varchar2 default null, p_attribute9 in varchar2 default null, p_attribute10 in varchar2 default null, p_attribute11 in varchar2 default null, p_attribute12 in varchar2 default null, p_attribute13 in varchar2 default null, p_attribute14 in varchar2 default null, p_attribute15 in varchar2 default null, p_attribute_category in varchar2 default null, x_interaction_count out number );
1.0
The following table describes the IN parameters associated with this API.
Parameter | Data Type | Required | Descriptions and Validations |
---|---|---|---|
p_api_version | NUMBER | Yes | |
p_init_msg_list | VARCHAR2 | Yes | |
p_resp_appl_id | NUMBER | No1 The Application ID, Responsibility ID, and User ID determine which profile values are used as defaults. Those items marked with an asterisk also follow these guidelines. |
Application identifier |
p_resp_id | NUMBER | No* | Responsibility identifier |
p_user_id | NUMBER | No* | Corresponds to the column USER_ID in table FND_USER, and identifies the Oracle Applications user. |
p_login_id | NUMBER | No | Corresponds to the column LOGIN_ID in table FND_LOGINS, and identifies the login session. |
p_outcome_id | NUMBER | No | Outcome identifier. The number corresponds to a certain outcome. |
p_result_id | NUMBER | No | Result identifier. The number corresponds to a certain result. |
p_reason_id | NUMBER | No | Reason identifier. The number corresponds to certain reasons. |
p_attribute1 | VARCHAR2(150) | No2 You must pass in segment IDs for none or all descriptive flexfield columns that might be used in the descriptive flexfield. Those items marked with two asterisks also follow these guidelines. |
Customer flex field segment. |
p_attribute2 | VARCHAR2(150) | No** | Customer flex field segment. |
p_attribute3 | VARCHAR2(150) | No** | Customer flex field segment. |
p_attribute4 | VARCHAR2(150) | No** | Customer flex field segment. |
p_attribute5 | VARCHAR2(150) | No** | Customer flex field segment. |
p_attribute6 | VARCHAR2(150) | No** | Customer flex field segment. |
p_attribute7 | VARCHAR2(150) | No** | Customer flex field segment. |
p_attribute8 | VARCHAR2(150) | No** | Customer flex field segment. |
p_attribute9 | VARCHAR2(150) | No** | Customer flex field segment. |
p_attribute10 | VARCHAR2(150) | No** | Customer flex field segment. |
p_attribute11 | VARCHAR2(150) | No** | Customer flex field segment. |
p_attribute12 | VARCHAR2(150) | No** | Customer flex field segment. |
p_attribute13 | VARCHAR2(150) | No** | Customer flex field segment. |
p_attribute14 | VARCHAR2(150) | No** | Customer flex field segment. |
p_attribute15 | VARCHAR2(150) | No** | Customer flex field segment. |
p_attribute_category | VARCHAR2(30) | No |
1 The Application ID, Responsibility ID, and User ID determine which profile values are used as defaults. Those items marked with an asterisk also follow these guidelines.
2 You must pass in segment IDs for none or all descriptive flexfield columns that might be used in the descriptive flexfield. Those items marked with two asterisks also follow these guidelines.
The following table describes the OUT parameters associated with this API.
Parameter | Data Type | Description |
---|---|---|
x_return_status | VARCHAR2 | |
x_msg_count | NUMBER | |
x_msg_data | VARCHAR2 | |
x_interaction_count | NUMBER | Corresponds to the number of interactions found. |
The following APIs contained in package JTF_IH_PUB generate messages and notifications as required:
The following table lists the messages and notifications generated by the Create_Interaction API.
Type | Name | Text |
---|---|---|
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Create_Interaction): The value <parameter value> for party_id touchpoint1_type is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Create_Interaction): The value <parameter value> for resource_id touchpoint1_type is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Create_Interaction): The value <parameter value> for party_id touchpoint2_type is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Create_Interaction): The value <parameter value> for resource_id touchpoint2_type is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Create_Interaction): The value <parameter value> for handler_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Create_Interaction): The value <parameter value> for outcome_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Create_Interaction): The value <parameter value> for result_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Create_Interaction): The value <parameter value> for reason_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Create_Interaction): The value <parameter value> for action_item_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Create_Interaction): The value <parameter value> for action_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Create_Interaction): The value <parameter value> for script_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Create_Interaction): The value <parameter value> for source_code_id set and source_code not set is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Create_Interaction): The value <parameter value> for source_code set and source_code_id not set is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Create_Interaction): The value <parameter value> for end_date_time is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Create_Interaction): The value <parameter value> for interaction_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Create_Interaction): The value <parameter value> for non_production_time_amount. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Create_Interaction): The value <parameter value> for interaction is not active. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Create_Interaction): The value <parameter value> for activity_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Create_Interaction): The value <parameter value> for action_item_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Create_Interaction): The value <parameter value> for action_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Create_Interaction): The value <parameter value> for activity is not active. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Create_Interaction): The value <parameter value> for cust_account_id is invalid. |
The following table lists the messages and notifications generated by the Open_MediaItem API.
Type | Name | Text |
---|---|---|
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Open_MediaItem): The value <parameter value> for end_date_time is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB. Open_MediaItem): The value <parameter value> for media_item_type is invalid. |
The following table lists the messages and notifications generated by the Update_MediaItem API.
Type | Name | Text |
---|---|---|
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Update_MediaItem): The value <parameter value> for end_date_time is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB. Update_MediaItem): The value <parameter value> for media_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB. Update_MediaItem): The value <parameter value> for media_item_type is invalid. |
The following table lists the messages and notifications generated by the Add_MediaLifecycle API.
Type | Name | Text |
---|---|---|
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Add_Medialifecycle): The value <parameter value> for end_date_time is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB. Add_Medialifecycle): The value <parameter value> for milcs_code is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB. Add_Medialifecycle): The value <parameter value> for milcs_type_id is invalid. |
The following table lists the messages and notifications generated by the Close_MediaItem API.
Type | Name | Text |
---|---|---|
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Close_MediaItem): The value <parameter value> for end_date_time is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB. Close_MediaItem): The value <parameter value> for media_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB. Close_MediaItem): The value <parameter value> for media_item_type is invalid. |
The following table lists the messages and notifications generated by the Open_Interaction API.
Type | Name | Text |
---|---|---|
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Open_Interaction): The value <parameter value> for party_id touchpoint1_type is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Open_Interaction): The value <parameter value> for resource_id touchpoint1_type is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Open_Interaction): The value <parameter value> for party_id touchpoint2_type is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Open_Interaction): The value <parameter value> for resource_id touchpoint2_type is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Open_Interaction): The value <parameter value> for handler_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Open_Interaction): The value <parameter value> for outcome_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Open_Interaction): The value <parameter value> for result_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Open_Interaction): The value <parameter value> for reason_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Open_Interaction): The value <parameter value> for action_item_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Open_Interaction): The value <parameter value> for action_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Open_Interaction): The value <parameter value> for script_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Open_Interaction): The value <parameter value> for source_code_id set and source_code not set is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Open_Interaction): The value <parameter value> for source_code set and source_code_id not set is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Open_Interaction): The value <parameter value> for end_date_time is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Open_Interaction): The value <parameter value> for interaction_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Open_Interaction): The value <parameter value> for non_production_time_amount. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Open_Interaction): The value <parameter value> for interaction is not active. |
The following table lists the messages and notifications generated by the Update_Interaction API.
Type | Name | Text |
---|---|---|
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Update_Interaction): The value <parameter value> for party_id touchpoint1_type is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Update_Interaction): The value <parameter value> for resource_id touchpoint1_type is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Update_Interaction): The value <parameter value> for party_id touchpoint2_type is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Update_Interaction): The value <parameter value> for resource_id touchpoint2_type is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Update_Interaction): The value <parameter value> for handler_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Update_Interaction): The value <parameter value> for outcome_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Update_Interaction): The value <parameter value> for result_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Update_Interaction): The value <parameter value> for reason_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Update_Interaction): The value <parameter value> for action_item_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Update_Interaction): The value <parameter value> for action_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Update_Interaction): The value <parameter value> for script_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Update_Interaction): The value <parameter value> for source_code_id set and source_code not set is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Update_Interaction): The value <parameter value> for source_code set and source_code_id not set is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Update_Interaction): The value <parameter value> for end_date_time is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Update_Interaction): The value <parameter value> for interaction_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Update_Interaction): The value <parameter value> for non_production_time_amount. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Update_Interaction): The value <parameter value> for interaction is not active. |
The following table lists the messages and notifications generated by the Add_Activity API.
Type | Name | Text |
---|---|---|
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Add_Activity): The value <parameter value> for outcome_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Add_Activity): The value <parameter value> for result_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Add_Activity): The value <parameter value> for reason_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Add_Activity): The value <parameter value> for action_item_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Add_Activity): The value <parameter value> for action_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Add_Activity): The value <parameter value> for source_code_id set and source_code not set is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Add_Activity): The value <parameter value> for source_code set and source_code_id not set is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Add_Activity): The value <parameter value> for end_date_time is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Add_Activity): The value <parameter value> for activity_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Add_Activity): The value <parameter value> for cust_account_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Add_Activity): The value <parameter value> for active is not active. |
The following table lists the messages and notifications generated by the Update_Interaction_Activity API.
Type | Name | Text |
---|---|---|
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Update_Interaction_Activity): The value <parameter value> for outcome_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Update_Interaction_Activity): The value <parameter value> for result_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Update_Interaction_Activity): The value <parameter value> for reason_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Update_Interaction_Activity): The value <parameter value> for action_item_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Update_Interaction_Activity): The value <parameter value> for action_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Update_Interaction_Activity): The value <parameter value> for source_code_id set and source_code not set is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Update_Interaction_Activity): The value <parameter value> for source_code set and source_code_id not set is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Update_Interaction_Activity): The value <parameter value> for end_date_time is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Update_Interaction_Activity): The value <parameter value> for activity_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Update_Interaction_Activity): The value <parameter value> for cust_account_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Update_Interaction_Activity): The value <parameter value> for active is not active. |
The following table lists the messages and notifications generated by the Close_Interaction API.
Type | Name | Text |
---|---|---|
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Close_Interaction): The value <parameter value> for party_id touchpoint1_type is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Close_Interaction): The value <parameter value> for resource_id touchpoint1_type is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Close_Interaction): The value <parameter value> for party_id touchpoint2_type is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Close_Interaction): The value <parameter value> for resource_id touchpoint2_type is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Close_Interaction): The value <parameter value> for handler_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Close_Interaction): The value <parameter value> for outcome_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Close_Interaction): The value <parameter value> for result_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Close_Interaction): The value <parameter value> for reason_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Close_Interaction): The value <parameter value> for action_item_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Close_Interaction): The value <parameter value> for action_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Close_Interaction): The value <parameter value> for script_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Close_Interaction): The value <parameter value> for source_code_id set and source_code not set is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Close_Interaction): The value <parameter value> for source_code set and source_code_id not set is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Close_Interaction): The value <parameter value> for end_date_time is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Close_Interaction): The value <parameter value> for interaction_id is invalid. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Close_Interaction): The value <parameter value> for non_production_time_amount. |
E | JTF_API_ALL_INVALID_ARGUMENT | API Programming Error (JTF_IH_PUB.Close_Interaction): The value <parameter value> for interaction is not active. |
This section contains SQL scripts that call the following types of Interaction History public APIs contained in the JTF_IH_PUB package and insert values as required:
The SQL scripts in this section build a customer interaction record by calling the non-cached creation APIs in succession and by providing them with the required values.
This script calls the Create_MediaItem API and provides the following values using the Create_MediaItem IN parameters:
p_api_version: 1.0
p_init_msg_list: T indicates that this parameter is set to true
p_commit: T indicates that this parameter is set to true
p_resp_appl_id: the application identifier is 690
p_resp_id: the responsibility identifier is -1
p_user_id: the user identifier is 2877
p_login_id: the login identifier is -1
p_media: the record type, media_rec_type contained in the JTF_IH_PUB and identified here as l_media
p_mlcs: the record type, mlcs_tbl_type contained in the JTF_IH_PUB and identified here as l_mlcs
set serveroutput on; declare l_return_status VARCHAR2(30); l_msg_count NUMBER; l_msg_data VARCHAR2(200); l_interaction_rec APPS.JTF_IH_PUB.interaction_rec_type; l_interaction_id NUMBER; l_jtf_note_id NUMBER; m_count NUMBER := 0; m_active VARCHAR2(1); p_interaction_id NUMBER; l_activity_rec APPS.JTF_IH_PUB.activity_rec_type; l_activity_id_1 NUMBER; l_activity_id_2 NUMBER; m_activitycount NUMBER := 0; m_activityactive VARCHAR2(1); l_startdatecheck VARCHAR2(30); l_enddatecheck VARCHAR2(30); l_data VARCHAR2(8000); l_msg_index_out NUMBER; xInteraction_Count NUMBER := 2; cInteraction_Count VARCHAR2(80); xparty_id NUMBER := 1000; cparty_id VARCHAR2(80); xresource_id NUMBER := 10039; cresource_id VARCHAR2(80); status NUMBER; end_time_runDATE; begin_time_runDATE; total_time_runNUMBER; nDbl NUMBER := 1; l_activity_tbl JTF_IH_PUB.activity_tbl_type; l_media APPS.JTF_IH_PUB.media_rec_type; l_media_lc_rec APPS.JTF_IH_PUB.media_lc_rec_type; l_media_id NUMBER; l_mlcs APPS.JTF_IH_PUB.mlcs_tbl_type; l_milcs_id NUMBER; l_activity_count NUMBER; l_interaction_count NUMBER; l_interaction_id_2 NUMBER; begin DBMS_SESSION.SET_SQL_TRACE(TRUE); DBMS_TRACE.SET_PLSQL_TRACE(DBMS_TRACE.TRACE_ALL_CALLS+ DBMS_TRACE.TRACE_ALL_EXCEPTIONS+ DBMS_TRACE.TRACE_RESUME); -- obtain loop parameter values DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT_LINE('Interaction History (IH) Test Script'); DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT_LINE('Author: Author's Name Here.'); DBMS_OUTPUT.PUT_LINE('Version 1.0 - Initial Version - 06.27.2001'); DBMS_OUTPUT.PUT_LINE(' '); xInteraction_Count := &xInteraction_Count; xparty_id := &xparty_id; xresource_id := &xresource_id; -- begin major loop begin_time_run := sysdate; DBMS_OUTPUT.PUT_LINE('Start Time := ' || TO_CHAR(begin_time_run, 'DD-MON-YYYY:HH:MI:SS')); -- Test: Create_MediaItem, l_media.media_id := NULL; l_media.source_id := NULL; l_media.direction := NULL; --l_media.duration := null; --l_media.end_date_time := null; l_media.interaction_performed := NULL; l_media.start_date_time := SYSDATE; l_media.media_data := 'N'; l_media.source_item_id := NULL; l_media.media_item_type := 'VM'; l_media.media_item_ref := NULL; l_media.media_abandon_flag := NULL; l_media.media_transferred_flag := NULL; JTF_IH_PUB.Create_MediaItem ( 1.0, 'T', 'T', 690, -1, 2877, -1, l_return_status, l_msg_count, l_msg_data, l_media, l_mlcs ); IF l_return_status != 'S' THEN --Display all the error messages FOR j in 1..FND_MSG_PUB.Count_Msg LOOP dbms_output.put_line(j); l_msg_data := FND_MSG_PUB.Get(p_msg_index => j, p_encoded=>'F'); DBMS_OUTPUT.PUT_LINE('Message(' || j ||'):= ' ||l_msg_data); END LOOP; END IF; DBMS_OUTPUT.PUT_LINE('PAST Create_MediaItem Method - II'); DBMS_OUTPUT.PUT_LINE('Create_MediaItem Method - II - l_return_status: '||l_return_status);
This script calls the Create_MediaLifecycle API and provides the following values using the Create_MediaLifecycle IN parameters:
p_api_version: 1.0
p_init_msg_list: T indicates that this parameter is set to true
p_commit: T indicates that this parameter is set to true
p_resp_appl_id: the application identifier is 690
p_resp_id: the responsibility identifier is -1
p_user_id: the user identifier is 2877
p_login_id: the login identifier is -1
p_media_lc_rec: the record type, media_lc_rec_type contained in the JTF_IH_PUB and identified here as l_media_lc_rec
set serveroutput on; declare l_return_status VARCHAR2(30); l_msg_count NUMBER; l_msg_data VARCHAR2(200); l_interaction_rec APPS.JTF_IH_PUB.interaction_rec_type; l_interaction_id NUMBER; l_jtf_note_id NUMBER; m_count NUMBER := 0; m_active VARCHAR2(1); p_interaction_id NUMBER; l_activity_rec APPS.JTF_IH_PUB.activity_rec_type; l_activity_id_1 NUMBER; l_activity_id_2 NUMBER; m_activitycount NUMBER := 0; m_activityactive VARCHAR2(1); l_startdatecheck VARCHAR2(30); l_enddatecheck VARCHAR2(30); l_data VARCHAR2(8000); l_msg_index_out NUMBER; xInteraction_Count NUMBER := 2; cInteraction_Count VARCHAR2(80); xparty_id NUMBER := 1000; cparty_id VARCHAR2(80); xresource_id NUMBER := 10039; cresource_id VARCHAR2(80); status NUMBER; end_time_runDATE; begin_time_runDATE; total_time_runNUMBER; nDbl NUMBER := 1; l_activity_tbl JTF_IH_PUB.activity_tbl_type; l_media APPS.JTF_IH_PUB.media_rec_type; l_media_lc_rec APPS.JTF_IH_PUB.media_lc_rec_type; l_media_id NUMBER; l_mlcs APPS.JTF_IH_PUB.mlcs_tbl_type; l_milcs_id NUMBER; l_activity_count NUMBER; l_interaction_count NUMBER; l_interaction_id_2 NUMBER; begin DBMS_SESSION.SET_SQL_TRACE(TRUE); DBMS_TRACE.SET_PLSQL_TRACE(DBMS_TRACE.TRACE_ALL_CALLS+ DBMS_TRACE.TRACE_ALL_EXCEPTIONS+ DBMS_TRACE.TRACE_RESUME); -- obtain loop parameter values DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT_LINE('Interaction History (IH) Test Script'); DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT_LINE('Author: Author's Name Here.'); DBMS_OUTPUT.PUT_LINE('Version 1.0 - Initial Version - 06.27.2001'); DBMS_OUTPUT.PUT_LINE(' '); xInteraction_Count := &xInteraction_Count; xparty_id := &xparty_id; xresource_id := &xresource_id; -- begin major loop begin_time_run := sysdate; DBMS_OUTPUT.PUT_LINE('Start Time := ' || TO_CHAR(begin_time_run, 'DD-MON-YYYY:HH:MI:SS')); l_media_lc_rec.media_id := l_media_id; l_media_lc_rec.start_date_time := sysdate; l_media_lc_rec.handler_id := 690; l_media_lc_rec.resource_id := xresource_id; l_media_lc_rec.milcs_type_id := 9; jtf_ih_pub.Create_MediaLifecycle( 1.0, 'T', 'T', 690, -1, 2877, -1, l_return_status, l_msg_count, l_msg_data, l_media_lc_rec); IF l_return_status != 'S' THEN --Display all the error messages FOR j in 1..FND_MSG_PUB.Count_Msg LOOP dbms_output.put_line(j); l_msg_data := FND_MSG_PUB.Get(p_msg_index => j, p_encoded=>'F'); DBMS_OUTPUT.PUT_LINE('Message(' || j ||'):= ' ||l_msg_data); END LOOP; END IF; DBMS_OUTPUT.PUT_LINE('PAST Create_MediaLifecycle '); DBMS_OUTPUT.PUT_LINE('Create_MediaLifecycle - l_return_status: '||l_return_status);
This script calls the Create_Interaction API and provides the following values using the Create_Interaction IN parameters:
p_api_version: 1.0
p_init_msg_list: T indicates that this parameter is set to true
p_commit: T indicates that this parameter is set to true
p_resp_appl_id: the application identifier is 690
p_resp_id: the responsibility identifier is -1
p_user_id: the user identifier is 2877
p_login_id: the login identifier is -1
p_interaction_rec: the record type, interaction_rec_type contained in the JTF_IH_PUB and identified here as l_interaction_rec
p_activity: the record type, activity_tbl_type contained in the JTF_IH_PUB and identified here as l_activity_tbl
set serveroutput on; declare l_return_status VARCHAR2(30); l_msg_count NUMBER; l_msg_data VARCHAR2(200); l_interaction_rec APPS.JTF_IH_PUB.interaction_rec_type; l_interaction_id NUMBER; l_jtf_note_id NUMBER; m_count NUMBER := 0; m_active VARCHAR2(1); p_interaction_id NUMBER; l_activity_rec APPS.JTF_IH_PUB.activity_rec_type; l_activity_id_1 NUMBER; l_activity_id_2 NUMBER; m_activitycount NUMBER := 0; m_activityactive VARCHAR2(1); l_startdatecheck VARCHAR2(30); l_enddatecheck VARCHAR2(30); l_data VARCHAR2(8000); l_msg_index_out NUMBER; xInteraction_Count NUMBER := 2; cInteraction_Count VARCHAR2(80); xparty_id NUMBER := 1000; cparty_id VARCHAR2(80); xresource_id NUMBER := 10039; cresource_id VARCHAR2(80); status NUMBER; end_time_runDATE; begin_time_runDATE; total_time_runNUMBER; nDbl NUMBER := 1; l_activity_tbl JTF_IH_PUB.activity_tbl_type; l_media APPS.JTF_IH_PUB.media_rec_type; l_media_lc_rec APPS.JTF_IH_PUB.media_lc_rec_type; l_media_id NUMBER; l_mlcs APPS.JTF_IH_PUB.mlcs_tbl_type; l_milcs_id NUMBER; l_activity_count NUMBER; l_interaction_count NUMBER; l_interaction_id_2 NUMBER; begin DBMS_SESSION.SET_SQL_TRACE(TRUE); DBMS_TRACE.SET_PLSQL_TRACE(DBMS_TRACE.TRACE_ALL_CALLS+ DBMS_TRACE.TRACE_ALL_EXCEPTIONS+ DBMS_TRACE.TRACE_RESUME); -- obtain loop parameter values DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT_LINE('Interaction History (IH) Test Script'); DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT_LINE('Author: Author's Name Here.'); DBMS_OUTPUT.PUT_LINE('Version 1.0 - Initial Version - 06.27.2001'); DBMS_OUTPUT.PUT_LINE(' '); xInteraction_Count := &xInteraction_Count; xparty_id := &xparty_id; xresource_id := &xresource_id; -- begin major loop begin_time_run := sysdate; DBMS_OUTPUT.PUT_LINE('Start Time := ' || TO_CHAR(begin_time_run, 'DD-MON-YYYY:HH:MI:SS')); FOR K in 1..xInteraction_Count LOOP --Create interaction l_interaction_rec.interaction_id := NULL; l_interaction_rec.reference_form := 'Test for Create Interaction'; l_interaction_rec.follow_up_action := 'No FollowUp'; -- l_interaction_rec.duration := 15; -- l_interaction_rec.start_date_time := to_date('23-OCT-2000', 'DD-MON-YYYY'); l_interaction_rec.start_date_time := sysdate; -- l_interaction_rec.end_date_time := to_date('31-OCT-2000', 'DD-MON-YYYY'); -- l_interaction_rec.end_date_time := NULL; -- l_interaction_rec.inter_interaction_duration := 12; l_interaction_rec.non_productive_time_amount := NULL; l_interaction_rec.preview_time_amount := 2; l_interaction_rec.productive_time_amount := 12; l_interaction_rec.wrapup_time_amount := 1; l_interaction_rec.handler_id := 690; -- Customers: please validate for your environment l_interaction_rec.script_id := NULL; l_interaction_rec.outcome_id := 4; l_interaction_rec.result_id := 2; l_interaction_rec.reason_id := 2; l_interaction_rec.resource_id := xresource_id; -- A environment l_interaction_rec.party_id := xparty_id; -- B environment l_interaction_rec.parent_id := NULL; -- --add an activities -- for idx in 1..xparty_id loop l_activity_rec.activity_id := NULL; l_activity_rec.duration := NULL; l_activity_rec.cust_account_id := NULL; --checked l_activity_rec.cust_org_id := null; l_activity_rec.role := 1; l_activity_rec.script_trans_id := NULL; l_activity_rec.start_date_time := sysdate; l_activity_rec.end_date_time := NULL; l_activity_rec.media_id := NULL; l_activity_rec.action_item_id := 17; l_activity_rec.interaction_id := NULL; l_activity_rec.outcome_id := 7; l_activity_rec.result_id := 7; l_activity_rec.reason_id := 8; l_activity_rec.description := 'test Activity 1'; l_activity_rec.interaction_action_type := 'unknown'; if nDbl = 1 then l_activity_rec.action_id := 14; nDbl := 2; else l_activity_rec.action_id := 13; nDbl := 1; end if; l_activity_tbl(idx) := l_activity_rec; end loop; APPS.JTF_IH_PUB.Create_Interaction ( 1.0, 'T', 'T', 690, -1, 2877, -1, l_return_status, l_msg_count, l_msg_data, l_interaction_rec, l_activity_tbl ); IF l_return_status != 'S' THEN --Display all the error messages FOR j in 1..FND_MSG_PUB.Count_Msg LOOP dbms_output.put_line(j); l_msg_data := FND_MSG_PUB.Get(p_msg_index => j, p_encoded=>'F'); DBMS_OUTPUT.PUT_LINE('Message(' || j ||'):= ' ||l_msg_data); END LOOP; END IF; END LOOP; DBMS_OUTPUT.PUT_LINE('PAST Create_Interaction ');
The SQL scripts in this section build a customer interaction record by calling the cached creation APIs in succession and by providing them with the required values.
This script calls the Open_MediaItem API and provides the following values using the Open_MediaItem IN parameters:
p_api_version: 1.0
p_init_msg_list: T indicates that this parameter is set to true
p_commit: T indicates that this parameter is set to true
p_resp_appl_id: the application identifier is 690
p_resp_id: the responsibility identifier is -1
p_user_id: the user identifier is 2877
p_login_id: the login identifier is -1
p_media: the record type, media_rec_type contained in the JTF_IH_PUB and identified here as l_media
p_media_rec: the record type, mlcs_tbl_type contained in the JTF_IH_PUB and identified here as l_mlcs
set serveroutput on; declare l_return_status VARCHAR2(30); l_msg_count NUMBER; l_msg_data VARCHAR2(200); l_interaction_rec APPS.JTF_IH_PUB.interaction_rec_type; l_interaction_id NUMBER; l_jtf_note_id NUMBER; m_count NUMBER := 0; m_active VARCHAR2(1); p_interaction_id NUMBER; l_activity_rec APPS.JTF_IH_PUB.activity_rec_type; l_activity_id_1 NUMBER; l_activity_id_2 NUMBER; m_activitycount NUMBER := 0; m_activityactive VARCHAR2(1); l_startdatecheck VARCHAR2(30); l_enddatecheck VARCHAR2(30); l_data VARCHAR2(8000); l_msg_index_out NUMBER; xInteraction_Count NUMBER := 2; cInteraction_Count VARCHAR2(80); xparty_id NUMBER := 1000; cparty_id VARCHAR2(80); xresource_id NUMBER := 10039; cresource_id VARCHAR2(80); status NUMBER; end_time_runDATE; begin_time_runDATE; total_time_runNUMBER; nDbl NUMBER := 1; l_activity_tbl JTF_IH_PUB.activity_tbl_type; l_media APPS.JTF_IH_PUB.media_rec_type; l_media_lc_rec APPS.JTF_IH_PUB.media_lc_rec_type; l_media_id NUMBER; l_mlcs APPS.JTF_IH_PUB.mlcs_tbl_type; l_milcs_id NUMBER; l_activity_count NUMBER; l_interaction_count NUMBER; l_interaction_id_2 NUMBER; begin DBMS_SESSION.SET_SQL_TRACE(TRUE); DBMS_TRACE.SET_PLSQL_TRACE(DBMS_TRACE.TRACE_ALL_CALLS+ DBMS_TRACE.TRACE_ALL_EXCEPTIONS+ DBMS_TRACE.TRACE_RESUME); -- obtain loop parameter values DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT_LINE('Interaction History (IH) Test Script'); DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT_LINE('Author: Author's Name Here.'); DBMS_OUTPUT.PUT_LINE('Version 1.0 - Initial Version - 06.27.2001'); DBMS_OUTPUT.PUT_LINE(' '); xInteraction_Count := &xInteraction_Count; xparty_id := &xparty_id; xresource_id := &xresource_id; -- begin major loop begin_time_run := sysdate; DBMS_OUTPUT.PUT_LINE('Start Time := ' || TO_CHAR(begin_time_run, 'DD-MON-YYYY:HH:MI:SS')); JTF_IH_PUB.Open_MediaItem ( 1.0, 'T', 'T', 690, -1, 2877, -1, l_return_status, l_msg_count, l_msg_data, l_media, l_media_id ); if l_return_status != 'S' then /* JTF_IH_PUB.Add_MediaLifecycle ( 1.0, 'T', 'T', 690, -1, 2877, -1, l_return_status, l_msg_count, l_msg_data, l_mlcs, l_milcs_id); if l_return_status != 'S' then FOR j in 1..FND_MSG_PUB.Count_Msg LOOP dbms_output.put_line(j); l_msg_data := FND_MSG_PUB.Get(p_msg_index => j, p_encoded=>'F'); DBMS_OUTPUT.PUT_LINE('Message(' || j ||'):= ' ||l_msg_data); END LOOP; end if; else*/ FOR j in 1..FND_MSG_PUB.Count_Msg LOOP dbms_output.put_line(j); l_msg_data := FND_MSG_PUB.Get(p_msg_index => j, p_encoded=>'F'); DBMS_OUTPUT.PUT_LINE('Message(' || j ||'):= ' ||l_msg_data); END LOOP; end if; dbms_output.put_line(l_return_status); dbms_output.put_line(l_msg_count); dbms_output.put_line(l_media_id); end;
This script calls the Update_MediaItem API and provides the following values using the Update_MediaItem IN parameters:
p_api_version: 1.0
p_init_msg_list: T indicates that this parameter is set to true
p_commit: T indicates that this parameter is set to true
p_resp_appl_id: the application identifier is 690
p_resp_id: the responsibility identifier is -1
p_user_id: the user identifier is 2877
p_login_id: the login identifier is -1
p_media_rec: the record type, media_rec_type contained in the JTF_IH_PUB and identified here as l_media. The the media_id field of this record type has been modified to l_media_id, and the direction field has been modified as Updated media_id.
set serveroutput on; declare l_return_status VARCHAR2(30); l_msg_count NUMBER; l_msg_data VARCHAR2(200); l_interaction_rec APPS.JTF_IH_PUB.interaction_rec_type; l_interaction_id NUMBER; l_jtf_note_id NUMBER; m_count NUMBER := 0; m_active VARCHAR2(1); p_interaction_id NUMBER; l_activity_rec APPS.JTF_IH_PUB.activity_rec_type; l_activity_id_1 NUMBER; l_activity_id_2 NUMBER; m_activitycount NUMBER := 0; m_activityactive VARCHAR2(1); l_startdatecheck VARCHAR2(30); l_enddatecheck VARCHAR2(30); l_data VARCHAR2(8000); l_msg_index_out NUMBER; xInteraction_Count NUMBER := 2; cInteraction_Count VARCHAR2(80); xparty_id NUMBER := 1000; cparty_id VARCHAR2(80); xresource_id NUMBER := 10039; cresource_id VARCHAR2(80); status NUMBER; end_time_runDATE; begin_time_runDATE; total_time_runNUMBER; nDbl NUMBER := 1; l_activity_tbl JTF_IH_PUB.activity_tbl_type; l_media APPS.JTF_IH_PUB.media_rec_type; l_media_lc_rec APPS.JTF_IH_PUB.media_lc_rec_type; l_media_id NUMBER; l_mlcs APPS.JTF_IH_PUB.mlcs_tbl_type; l_milcs_id NUMBER; l_activity_count NUMBER; l_interaction_count NUMBER; l_interaction_id_2 NUMBER; begin DBMS_SESSION.SET_SQL_TRACE(TRUE); DBMS_TRACE.SET_PLSQL_TRACE(DBMS_TRACE.TRACE_ALL_CALLS+ DBMS_TRACE.TRACE_ALL_EXCEPTIONS+ DBMS_TRACE.TRACE_RESUME); -- obtain loop parameter values DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT_LINE('Interaction History (IH) Test Script'); DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT_LINE('Author: Author's Name Here.'); DBMS_OUTPUT.PUT_LINE('Version 1.0 - Initial Version - 06.27.2001'); DBMS_OUTPUT.PUT_LINE(' '); xInteraction_Count := &xInteraction_Count; xparty_id := &xparty_id; xresource_id := &xresource_id; -- begin major loop begin_time_run := sysdate; DBMS_OUTPUT.PUT_LINE('Start Time := ' || TO_CHAR(begin_time_run, 'DD-MON-YYYY:HH:MI:SS')); FOR K in 1..xInteraction_Count LOOP l_media.media_id := l_media_id; l_media.direction := 'Updated Media_ID'; JTF_IH_PUB.Update_MediaItem ( 1.0, 'T', 'T', 690, -1, 2877, -1, l_return_status, l_msg_count, l_msg_data, l_media ); IF l_return_status != 'S' THEN --Display all the error messages FOR j in 1..FND_MSG_PUB.Count_Msg LOOP dbms_output.put_line(j); l_msg_data := FND_MSG_PUB.Get(p_msg_index => j, p_encoded=>'F'); DBMS_OUTPUT.PUT_LINE('Message(' || j ||'):= ' ||l_msg_data); END LOOP; END IF; DBMS_OUTPUT.PUT_LINE('PAST Update_MediaItem '); DBMS_OUTPUT.PUT_LINE('Update_MediaItem - l_return_status: '||l_return_status);
This script calls the Add_MediaLifecycle API and provides the following values using the Add_MediaLifecycle IN parameters:
p_api_version: 1.0
p_init_msg_list: T indicates that this parameter is set to true
p_commit: T indicates that this parameter is set to true
p_resp_appl_id: the application identifier is 690
p_resp_id: the responsibility identifier is -1
p_user_id: the user identifier is 2877
p_login_id: the login identifier is -1
l_media_lc_rec: the record type, media_lc_rec_type contained in the JTF_IH_PUB and identified here as l_media_lc_rec
set serveroutput on; declare l_return_status VARCHAR2(30); l_msg_count NUMBER; l_msg_data VARCHAR2(200); l_interaction_rec APPS.JTF_IH_PUB.interaction_rec_type; l_interaction_id NUMBER; l_jtf_note_id NUMBER; m_count NUMBER := 0; m_active VARCHAR2(1); p_interaction_id NUMBER; l_activity_rec APPS.JTF_IH_PUB.activity_rec_type; l_activity_id_1 NUMBER; l_activity_id_2 NUMBER; m_activitycount NUMBER := 0; m_activityactive VARCHAR2(1); l_startdatecheck VARCHAR2(30); l_enddatecheck VARCHAR2(30); l_data VARCHAR2(8000); l_msg_index_out NUMBER; xInteraction_Count NUMBER := 2; cInteraction_Count VARCHAR2(80); xparty_id NUMBER := 1000; cparty_id VARCHAR2(80); xresource_id NUMBER := 10039; cresource_id VARCHAR2(80); status NUMBER; end_time_runDATE; begin_time_runDATE; total_time_runNUMBER; nDbl NUMBER := 1; l_activity_tbl JTF_IH_PUB.activity_tbl_type; l_media APPS.JTF_IH_PUB.media_rec_type; l_media_lc_rec APPS.JTF_IH_PUB.media_lc_rec_type; l_media_id NUMBER; l_mlcs APPS.JTF_IH_PUB.mlcs_tbl_type; l_milcs_id NUMBER; l_activity_count NUMBER; l_interaction_count NUMBER; l_interaction_id_2 NUMBER; begin DBMS_SESSION.SET_SQL_TRACE(TRUE); DBMS_TRACE.SET_PLSQL_TRACE(DBMS_TRACE.TRACE_ALL_CALLS+ DBMS_TRACE.TRACE_ALL_EXCEPTIONS+ DBMS_TRACE.TRACE_RESUME); -- obtain loop parameter values DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT_LINE('Interaction History (IH) Test Script'); DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT_LINE('Author: Author's Name Here.'); DBMS_OUTPUT.PUT_LINE('Version 1.0 - Initial Version - 06.27.2001'); DBMS_OUTPUT.PUT_LINE(' '); xInteraction_Count := &xInteraction_Count; xparty_id := &xparty_id; xresource_id := &xresource_id; -- begin major loop begin_time_run := sysdate; DBMS_OUTPUT.PUT_LINE('Start Time := ' || TO_CHAR(begin_time_run, 'DD-MON-YYYY:HH:MI:SS')); JTF_IH_Pub.Add_MediaLifecycle ( 1.0, 'T', 'T', 680, -1, 2877, -1, l_return_status, l_msg_count, l_msg_data, l_media_lc_rec, l_milcs_id); IF l_return_status != 'S' THEN --Display all the error messages FOR j in 1..FND_MSG_PUB.Count_Msg LOOP dbms_output.put_line(j); l_msg_data := FND_MSG_PUB.Get(p_msg_index => j, p_encoded=>'F'); DBMS_OUTPUT.PUT_LINE('Message(' || j ||'):= ' ||l_msg_data); END LOOP; END IF; DBMS_OUTPUT.PUT_LINE('PAST Add_MediaLifecycle '); DBMS_OUTPUT.PUT_LINE('Add_MediaLifecycle - l_return_status: '||l_return_status);
This script calls the Update_MediaLifecycle API and provides the following values using the Update_MediaLifecycle IN parameters:
p_api_version: 1.0
p_init_msg_list: T indicates that this parameter is set to true
p_commit: T indicates that this parameter is set to true
p_resp_appl_id: the application identifier is 690
p_resp_id: the responsibility identifier is -1
p_user_id: the user identifier is 2877
p_login_id: the login identifier is -1
l_media_lc_rec: the record type, media_lc_rec_type contained in the JTF_IH_PUB and identified here as l_media_lc_rec. The milcs_id field of this record type has been modified as l_milcs_id.
set serveroutput on; declare l_return_status VARCHAR2(30); l_msg_count NUMBER; l_msg_data VARCHAR2(200); l_interaction_rec APPS.JTF_IH_PUB.interaction_rec_type; l_interaction_id NUMBER; l_jtf_note_id NUMBER; m_count NUMBER := 0; m_active VARCHAR2(1); p_interaction_id NUMBER; l_activity_rec APPS.JTF_IH_PUB.activity_rec_type; l_activity_id_1 NUMBER; l_activity_id_2 NUMBER; m_activitycount NUMBER := 0; m_activityactive VARCHAR2(1); l_startdatecheck VARCHAR2(30); l_enddatecheck VARCHAR2(30); l_data VARCHAR2(8000); l_msg_index_out NUMBER; xInteraction_Count NUMBER := 2; cInteraction_Count VARCHAR2(80); xparty_id NUMBER := 1000; cparty_id VARCHAR2(80); xresource_id NUMBER := 10039; cresource_id VARCHAR2(80); status NUMBER; end_time_runDATE; begin_time_runDATE; total_time_runNUMBER; nDbl NUMBER := 1; l_activity_tbl JTF_IH_PUB.activity_tbl_type; l_media APPS.JTF_IH_PUB.media_rec_type; l_media_lc_rec APPS.JTF_IH_PUB.media_lc_rec_type; l_media_id NUMBER; l_mlcs APPS.JTF_IH_PUB.mlcs_tbl_type; l_milcs_id NUMBER; l_activity_count NUMBER; l_interaction_count NUMBER; l_interaction_id_2 NUMBER; begin DBMS_SESSION.SET_SQL_TRACE(TRUE); DBMS_TRACE.SET_PLSQL_TRACE(DBMS_TRACE.TRACE_ALL_CALLS+ DBMS_TRACE.TRACE_ALL_EXCEPTIONS+ DBMS_TRACE.TRACE_RESUME); -- obtain loop parameter values DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT_LINE('Interaction History (IH) Test Script'); DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT_LINE('Author: Author's Name Here.'); DBMS_OUTPUT.PUT_LINE('Version 1.0 - Initial Version - 06.27.2001'); DBMS_OUTPUT.PUT_LINE(' '); xInteraction_Count := &xInteraction_Count; xparty_id := &xparty_id; xresource_id := &xresource_id; -- begin major loop begin_time_run := sysdate; DBMS_OUTPUT.PUT_LINE('Start Time := ' || TO_CHAR(begin_time_run, 'DD-MON-YYYY:HH:MI:SS')); l_media_lc_rec.milcs_id := l_milcs_id; JTF_IH_PUB.Update_MediaLifecycle ( 1.0, 'T', 'T', 690, -1, 2877, -1, l_return_status, l_msg_count, l_msg_data, l_media_lc_rec); IF l_return_status != 'S' THEN --Display all the error messages FOR j in 1..FND_MSG_PUB.Count_Msg LOOP dbms_output.put_line(j); l_msg_data := FND_MSG_PUB.Get(p_msg_index => j, p_encoded=>'F'); DBMS_OUTPUT.PUT_LINE('Message(' || j ||'):= ' ||l_msg_data); END LOOP; END IF; DBMS_OUTPUT.PUT_LINE('PAST Update_MediaLifecycle '); DBMS_OUTPUT.PUT_LINE('Update_MediaLifecycle - l_return_status: '||l_return_status);
This script calls the Close_MediaItem API and provides the following values using the Close_MediaItem IN parameters:
p_api_version: 1.0
p_init_msg_list: T indicates that this parameter is set to true
p_commit: T indicates that this parameter is set to true
p_resp_appl_id: the application identifier is 690
p_resp_id: the responsibility identifier is -1
p_user_id: the user identifier is 2877
p_login_id: the login identifier is -1
p_media_rec: the record type, media_rec_type contained in the JTF_IH_PUB and identified here as l_media. The media_id field of this record type has been modified as l_media_id.
set serveroutput on; declare l_return_status VARCHAR2(30); l_msg_count NUMBER; l_msg_data VARCHAR2(200); l_interaction_rec APPS.JTF_IH_PUB.interaction_rec_type; l_interaction_id NUMBER; l_jtf_note_id NUMBER; m_count NUMBER := 0; m_active VARCHAR2(1); p_interaction_id NUMBER; l_activity_rec APPS.JTF_IH_PUB.activity_rec_type; l_activity_id_1 NUMBER; l_activity_id_2 NUMBER; m_activitycount NUMBER := 0; m_activityactive VARCHAR2(1); l_startdatecheck VARCHAR2(30); l_enddatecheck VARCHAR2(30); l_data VARCHAR2(8000); l_msg_index_out NUMBER; xInteraction_Count NUMBER := 2; cInteraction_Count VARCHAR2(80); xparty_id NUMBER := 1000; cparty_id VARCHAR2(80); xresource_id NUMBER := 10039; cresource_id VARCHAR2(80); status NUMBER; end_time_runDATE; begin_time_runDATE; total_time_runNUMBER; nDbl NUMBER := 1; l_activity_tbl JTF_IH_PUB.activity_tbl_type; l_media APPS.JTF_IH_PUB.media_rec_type; l_media_lc_rec APPS.JTF_IH_PUB.media_lc_rec_type; l_media_id NUMBER; l_mlcs APPS.JTF_IH_PUB.mlcs_tbl_type; l_milcs_id NUMBER; l_activity_count NUMBER; l_interaction_count NUMBER; l_interaction_id_2 NUMBER; begin DBMS_SESSION.SET_SQL_TRACE(TRUE); DBMS_TRACE.SET_PLSQL_TRACE(DBMS_TRACE.TRACE_ALL_CALLS+ DBMS_TRACE.TRACE_ALL_EXCEPTIONS+ DBMS_TRACE.TRACE_RESUME); -- obtain loop parameter values DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT_LINE('Interaction History (IH) Test Script'); DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT_LINE('Author: Author's Name Here.'); DBMS_OUTPUT.PUT_LINE('Version 1.0 - Initial Version - 06.27.2001'); DBMS_OUTPUT.PUT_LINE(' '); xInteraction_Count := &xInteraction_Count; xparty_id := &xparty_id; xresource_id := &xresource_id; -- begin major loop begin_time_run := sysdate; DBMS_OUTPUT.PUT_LINE('Start Time := ' || TO_CHAR(begin_time_run, 'DD-MON-YYYY:HH:MI:SS')); l_media.media_id := l_media_id; JTF_IH_PUB.Close_MediaItem ( 1.0, 'T', 'T', 690, -1, 2877, -1, l_return_status, l_msg_count, l_msg_data, l_media ); IF l_return_status != 'S' THEN --Display all the error messages FOR j in 1..FND_MSG_PUB.Count_Msg LOOP dbms_output.put_line(j); l_msg_data := FND_MSG_PUB.Get(p_msg_index => j, p_encoded=>'F'); DBMS_OUTPUT.PUT_LINE('Message(' || j ||'):= ' ||l_msg_data); END LOOP; END IF; DBMS_OUTPUT.PUT_LINE('PAST Close_MediaItem '); DBMS_OUTPUT.PUT_LINE('Close_MediaItemv - l_return_status: '||l_return_status); DBMS_SESSION.SET_SQL_TRACE(FALSE); end; /
This script calls the Open_Interaction API and provides the following values using the Open_Interaction IN parameters:
p_api_version: 1.0
p_init_msg_list: T indicates that this parameter is set to true
p_commit: T indicates that this parameter is set to true
p_resp_appl_id: the application identifier is 690
p_resp_id: the responsibility identifier is -1
p_user_id: the user identifier is 2877
p_login_id: the login identifier is -1
p_interaction_rec: the record type, interaction_rec_type contained in the JTF_IH_PUB and identified here as l_interaction_rec
set serveroutput on; declare l_return_status VARCHAR2(30); l_msg_count NUMBER; l_msg_data VARCHAR2(200); l_interaction_rec APPS.JTF_IH_PUB.interaction_rec_type; l_interaction_id NUMBER; l_jtf_note_id NUMBER; m_count NUMBER := 0; m_active VARCHAR2(1); p_interaction_id NUMBER; l_activity_rec APPS.JTF_IH_PUB.activity_rec_type; l_activity_id_1 NUMBER; l_activity_id_2 NUMBER; m_activitycount NUMBER := 0; m_activityactive VARCHAR2(1); l_startdatecheck VARCHAR2(30); l_enddatecheck VARCHAR2(30); l_data VARCHAR2(8000); l_msg_index_out NUMBER; xInteraction_Count NUMBER := 2; cInteraction_Count VARCHAR2(80); xparty_id NUMBER := 1000; cparty_id VARCHAR2(80); xresource_id NUMBER := 10039; cresource_id VARCHAR2(80); status NUMBER; end_time_runDATE; begin_time_runDATE; total_time_runNUMBER; nDbl NUMBER := 1; l_activity_tbl JTF_IH_PUB.activity_tbl_type; l_media APPS.JTF_IH_PUB.media_rec_type; l_media_lc_rec APPS.JTF_IH_PUB.media_lc_rec_type; l_media_id NUMBER; l_mlcs APPS.JTF_IH_PUB.mlcs_tbl_type; l_milcs_id NUMBER; l_activity_count NUMBER; l_interaction_count NUMBER; l_interaction_id_2 NUMBER; begin DBMS_SESSION.SET_SQL_TRACE(TRUE); DBMS_TRACE.SET_PLSQL_TRACE(DBMS_TRACE.TRACE_ALL_CALLS+ DBMS_TRACE.TRACE_ALL_EXCEPTIONS+ DBMS_TRACE.TRACE_RESUME); -- obtain loop parameter values DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT_LINE('Interaction History (IH) Test Script'); DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT_LINE('Author: Author's Name Here.'); DBMS_OUTPUT.PUT_LINE('Version 1.0 - Initial Version - 06.27.2001'); DBMS_OUTPUT.PUT_LINE(' '); xInteraction_Count := &xInteraction_Count; xparty_id := &xparty_id; xresource_id := &xresource_id; -- begin major loop begin_time_run := sysdate; DBMS_OUTPUT.PUT_LINE('Start Time := ' || TO_CHAR(begin_time_run, 'DD-MON-YYYY:HH:MI:SS')); l_interaction_rec.interaction_id := NULL; l_interaction_rec.reference_form := 'Test for JTF Open Interaction (Will close by Method 2)'; l_interaction_rec.start_date_time := sysdate; l_interaction_rec.start_date_time := sysdate; l_interaction_rec.handler_id := 690; -- Bell South: please validate for your environment l_interaction_rec.script_id := NULL; l_interaction_rec.outcome_id := 4; l_interaction_rec.result_id := 2; l_interaction_rec.reason_id := 2; l_interaction_rec.resource_id := xresource_id; -- jtfdom environment l_interaction_rec.party_id := xparty_id; -- JTFTECH environment l_interaction_rec.parent_id := NULL; JTF_IH_PUB.Open_Interaction( 1.0, 'T', 'T', 690, -1, 2877, -1, l_return_status, l_msg_count, l_msg_data, l_interaction_rec, l_interaction_id ); IF l_return_status != 'S' THEN --Display all the error messages FOR j in 1..FND_MSG_PUB.Count_Msg LOOP dbms_output.put_line(j); l_msg_data := FND_MSG_PUB.Get(p_msg_index => j, p_encoded=>'F'); DBMS_OUTPUT.PUT_LINE('Message(' || j ||'):= ' ||l_msg_data); END LOOP; END IF; DBMS_OUTPUT.PUT_LINE('PAST Open_Interaction '); DBMS_OUTPUT.PUT_LINE('Open_Interaction - l_return_status: '||l_return_status); -- --Interaction implicit notes bind -- jtf_notes_pub.create_note( p_api_version => 1.0, p_source_object_id => l_interaction_id, p_source_object_code => 'JTF_INTERACTION', p_notes => 'Service Request Interaction - Note 1 - Customer claims that automatic water softener is non-functional. Request full refund.', p_entered_by => 2877, p_entered_date => sysdate, p_last_update_date => sysdate, p_last_updated_by => 2877, p_creation_date => sysdate, x_jtf_note_id => l_jtf_note_id, x_msg_count => l_msg_count, x_msg_data => l_msg_data, x_return_status => l_return_status); IF l_return_status != 'S' THEN --Display all the error messages FOR j in 1..FND_MSG_PUB.Count_Msg LOOP dbms_output.put_line(j); l_msg_data := FND_MSG_PUB.Get(p_msg_index => j, p_encoded=>'F'); DBMS_OUTPUT.PUT_LINE('Message(' || j ||'):= ' ||l_msg_data); END LOOP; END IF; DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT('return_jtf_note_id: ' || l_jtf_note_id); IF (l_msg_count >= 1) THEN --Only one error FND_MSG_PUB.Get(p_msg_index => FND_MSG_PUB.G_FIRST, p_encoded=>'F', p_data=>l_data, p_msg_index_out=>l_msg_index_out); DBMS_OUTPUT.PUT_LINE('Message(' || 1 ||'):= ' || l_data); IF (l_msg_count > 1) THEN --Display all the error messages FOR j in 2..FND_MSG_PUB.Count_Msg LOOP FND_MSG_PUB.Get(p_msg_index => FND_MSG_PUB.G_NEXT, p_encoded=>'F', p_data=>l_data, p_msg_index_out=>l_msg_index_out); DBMS_OUTPUT.PUT_LINE('Message(' || j ||'):= ' || l_data); END LOOP; END IF; END IF; DBMS_OUTPUT.PUT_LINE(' '); l_interaction_rec.reference_form := 'Test for JTF Open Interaction'; JTF_IH_PUB.Open_Interaction( 1.0, 'T', 'T', 690, -1, 2877, -1, l_return_status, l_msg_count, l_msg_data, l_interaction_rec, l_interaction_id_2 ); IF l_return_status != 'S' THEN --Display all the error messages FOR j in 1..FND_MSG_PUB.Count_Msg LOOP dbms_output.put_line(j); l_msg_data := FND_MSG_PUB.Get(p_msg_index => j, p_encoded=>'F'); DBMS_OUTPUT.PUT_LINE('Message(' || j ||'):= ' ||l_msg_data); END LOOP; END IF; DBMS_OUTPUT.PUT_LINE('PAST Open_Interaction '); DBMS_OUTPUT.PUT_LINE('PAST Open_Interaction - l_return_status: '||l_return_status);
This script calls the Update_Interaction API and provides the following values using the Update_Interaction IN parameters:
p_api_version: 1.0
p_init_msg_list: T indicates that this parameter is set to true
p_commit: T indicates that this parameter is set to true
p_resp_appl_id: the application identifier is 690
p_resp_id: the responsibility identifier is -1
p_user_id: the user identifier is 2877
p_login_id: the login identifier is -1
p_interaction_rec: the record type, interaction_rec_type contained in the JTF_IH_PUB and identified here as l_interaction_rec
set serveroutput on; declare l_return_status VARCHAR2(30); l_msg_count NUMBER; l_msg_data VARCHAR2(200); l_interaction_rec APPS.JTF_IH_PUB.interaction_rec_type; l_interaction_id NUMBER; l_jtf_note_id NUMBER; m_count NUMBER := 0; m_active VARCHAR2(1); p_interaction_id NUMBER; l_activity_rec APPS.JTF_IH_PUB.activity_rec_type; l_activity_id_1 NUMBER; l_activity_id_2 NUMBER; m_activitycount NUMBER := 0; m_activityactive VARCHAR2(1); l_startdatecheck VARCHAR2(30); l_enddatecheck VARCHAR2(30); l_data VARCHAR2(8000); l_msg_index_out NUMBER; xInteraction_Count NUMBER := 2; cInteraction_Count VARCHAR2(80); xparty_id NUMBER := 1000; cparty_id VARCHAR2(80); xresource_id NUMBER := 10039; cresource_id VARCHAR2(80); status NUMBER; end_time_runDATE; begin_time_runDATE; total_time_runNUMBER; nDbl NUMBER := 1; l_activity_tbl JTF_IH_PUB.activity_tbl_type; l_media APPS.JTF_IH_PUB.media_rec_type; l_media_lc_rec APPS.JTF_IH_PUB.media_lc_rec_type; l_media_id NUMBER; l_mlcs APPS.JTF_IH_PUB.mlcs_tbl_type; l_milcs_id NUMBER; l_activity_count NUMBER; l_interaction_count NUMBER; l_interaction_id_2 NUMBER; begin DBMS_SESSION.SET_SQL_TRACE(TRUE); DBMS_TRACE.SET_PLSQL_TRACE(DBMS_TRACE.TRACE_ALL_CALLS+ DBMS_TRACE.TRACE_ALL_EXCEPTIONS+ DBMS_TRACE.TRACE_RESUME); -- obtain loop parameter values DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT_LINE('Interaction History (IH) Test Script'); DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT_LINE('Author: Author's Name Here.'); DBMS_OUTPUT.PUT_LINE('Version 1.0 - Initial Version - 06.27.2001'); DBMS_OUTPUT.PUT_LINE(' '); xInteraction_Count := &xInteraction_Count; xparty_id := &xparty_id; xresource_id := &xresource_id; -- begin major loop begin_time_run := sysdate; DBMS_OUTPUT.PUT_LINE('Start Time := ' || TO_CHAR(begin_time_run, 'DD-MON-YYYY:HH:MI:SS')); l_interaction_rec.interaction_id := l_interaction_id; l_interaction_rec.reference_form := 'Test for Update Interaction'; JTF_IH_PUB.Update_Interaction( 1.0, 'T', 'T', 690, -1, 2877, -1, l_return_status, l_msg_count, l_msg_data, l_interaction_rec ); IF l_return_status != 'S' THEN --Display all the error messages FOR j in 1..FND_MSG_PUB.Count_Msg LOOP dbms_output.put_line(j); l_msg_data := FND_MSG_PUB.Get(p_msg_index => j, p_encoded=>'F'); DBMS_OUTPUT.PUT_LINE('Message(' || j ||'):= ' ||l_msg_data); END LOOP; END IF; DBMS_OUTPUT.PUT_LINE('PAST Update_Interaction '); DBMS_OUTPUT.PUT_LINE('Update_Interaction - l_return_status: '||l_return_status); --
This script calls the Add_Activity API and provides the following values using the
Add_Activity IN parameters:
p_api_version: 1.0
p_init_msg_list: T indicates that this parameter is set to true
p_commit: T indicates that this parameter is set to true
p_resp_appl_id: the application identifier is 690
p_resp_id: the responsibility identifier is -1
p_user_id: the user identifier is 2877
p_login_id: the login identifier is -1
p_activity_rec: the record type, activity_rec_type contained in the JTF_IH_PUB and identified here as l_activity_rec
set serveroutput on; declare l_return_status VARCHAR2(30); l_msg_count NUMBER; l_msg_data VARCHAR2(200); l_interaction_rec APPS.JTF_IH_PUB.interaction_rec_type; l_interaction_id NUMBER; l_jtf_note_id NUMBER; m_count NUMBER := 0; m_active VARCHAR2(1); p_interaction_id NUMBER; l_activity_rec APPS.JTF_IH_PUB.activity_rec_type; l_activity_id_1 NUMBER; l_activity_id_2 NUMBER; m_activitycount NUMBER := 0; m_activityactive VARCHAR2(1); l_startdatecheck VARCHAR2(30); l_enddatecheck VARCHAR2(30); l_data VARCHAR2(8000); l_msg_index_out NUMBER; xInteraction_Count NUMBER := 2; cInteraction_Count VARCHAR2(80); xparty_id NUMBER := 1000; cparty_id VARCHAR2(80); xresource_id NUMBER := 10039; cresource_id VARCHAR2(80); status NUMBER; end_time_runDATE; begin_time_runDATE; total_time_runNUMBER; nDbl NUMBER := 1; l_activity_tbl JTF_IH_PUB.activity_tbl_type; l_media APPS.JTF_IH_PUB.media_rec_type; l_media_lc_rec APPS.JTF_IH_PUB.media_lc_rec_type; l_media_id NUMBER; l_mlcs APPS.JTF_IH_PUB.mlcs_tbl_type; l_milcs_id NUMBER; l_activity_count NUMBER; l_interaction_count NUMBER; l_interaction_id_2 NUMBER; begin DBMS_SESSION.SET_SQL_TRACE(TRUE); DBMS_TRACE.SET_PLSQL_TRACE(DBMS_TRACE.TRACE_ALL_CALLS+ DBMS_TRACE.TRACE_ALL_EXCEPTIONS+ DBMS_TRACE.TRACE_RESUME); -- obtain loop parameter values DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT_LINE('Interaction History (IH) Test Script'); DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT_LINE('Author: Author's Name Here.'); DBMS_OUTPUT.PUT_LINE('Version 1.0 - Initial Version - 06.27.2001'); DBMS_OUTPUT.PUT_LINE(' '); xInteraction_Count := &xInteraction_Count; xparty_id := &xparty_id; xresource_id := &xresource_id; -- begin major loop begin_time_run := sysdate; DBMS_OUTPUT.PUT_LINE('Start Time := ' || TO_CHAR(begin_time_run, 'DD-MON-YYYY:HH:MI:SS')); l_activity_rec.activity_id := NULL; l_activity_rec.duration := NULL; l_activity_rec.cust_account_id := NULL; --checked l_activity_rec.cust_org_id := null; l_activity_rec.role := 1; l_activity_rec.script_trans_id := fnd_api.g_miss_num; l_activity_rec.start_date_time := sysdate; -- l_activity_rec.start_date_time := to_date('29-SEP-2000 13:00:00', 'DD-MON-YYYY HH24:MI:SS'); l_activity_rec.end_date_time := NULL; -- l_activity_rec.end_date_time := to_date('26-JUL-2000 13:11:25', 'DD-MON-YYYY HH24:MI:SS'); -- l_activity_rec.end_date_time := to_date('29-SEP-2000 13:11:25', 'DD-MON-YYYY HH24:MI:SS'); -- l_activity_rec.task_id := 30; -- l_activity_rec.doc_id := 1; -- l_activity_rec.doc_ref := 1; l_activity_rec.media_id := NULL; l_activity_rec.action_item_id := 17; l_activity_rec.interaction_id := l_interaction_id; l_activity_rec.outcome_id := 7; l_activity_rec.result_id := 7; l_activity_rec.reason_id := 8; l_activity_rec.description := 'test Add Activity'; l_activity_rec.action_id := 13; l_activity_rec.interaction_action_type := 'unknown'; -- l_activity_rec.object_id := 1; -- l_activity_rec.object_type := 'JEZHU_Type_1'; -- l_activity_rec.source_code_id := 10000; -- l_activity_rec.source_code := 'EEXHB10000'; JTF_IH_PUB.Add_Activity(1.0, 'T', 'T', -1, 690, 2877, -1, l_return_status, l_msg_count, l_msg_data, l_activity_rec, l_activity_id_1); IF l_return_status != 'S' THEN --Display all the error messages FOR j in 1..FND_MSG_PUB.Count_Msg LOOP dbms_output.put_line(j); l_msg_data := FND_MSG_PUB.Get(p_msg_index => j, p_encoded=>'F'); DBMS_OUTPUT.PUT_LINE('Message(' || j ||'):= ' ||l_msg_data); END LOOP; END IF; DBMS_OUTPUT.PUT_LINE('PAST Add_Activity '); DBMS_OUTPUT.PUT_LINE('Add_Activity - l_return_status: '||l_return_status); IF (l_msg_count >= 1) THEN --Only one error FND_MSG_PUB.Get(p_msg_index => FND_MSG_PUB.G_FIRST, p_encoded=>'F', p_data=>l_data, p_msg_index_out=>l_msg_index_out); DBMS_OUTPUT.PUT_LINE('Message(' || 1 ||'):= ' || l_data); IF (l_msg_count > 1) THEN --Display all the error messages FOR j in 2..FND_MSG_PUB.Count_Msg LOOP FND_MSG_PUB.Get(p_msg_index => FND_MSG_PUB.G_NEXT, p_encoded=>'F', p_data=>l_data, p_msg_index_out=>l_msg_index_out); DBMS_OUTPUT.PUT_LINE('Message(' || j ||'):= ' || l_data); END LOOP; END IF; END IF; DBMS_OUTPUT.PUT_LINE(' '); -- --Activity implicit notes bind -- jtf_notes_pub.create_note( p_api_version => 1.0, p_source_object_id => l_activity_id_1, p_source_object_code => 'JTF_ACTIVITY', p_notes => 'Service Request Activity 1 - Note 1 - Customer is angry. Rust color water.', p_entered_by => 2877, p_entered_date => sysdate, p_last_update_date => sysdate, p_last_updated_by => 2877, p_creation_date => sysdate, x_jtf_note_id => l_jtf_note_id, x_msg_count => l_msg_count, x_msg_data => l_msg_data, x_return_status => l_return_status); DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT('return_jtf_note_id: ' || l_jtf_note_id); DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT('Activity 1 Implicit Note return_status: ' || l_return_status); DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT('msg_count: ' || l_msg_count); DBMS_OUTPUT.PUT_LINE(' '); IF (l_msg_count >= 1) THEN --Only one error FND_MSG_PUB.Get(p_msg_index => FND_MSG_PUB.G_FIRST, p_encoded=>'F', p_data=>l_data, p_msg_index_out=>l_msg_index_out); DBMS_OUTPUT.PUT_LINE('Message(' || 1 ||'):= ' || l_data); IF (l_msg_count > 1) THEN --Display all the error messages FOR j in 2..FND_MSG_PUB.Count_Msg LOOP FND_MSG_PUB.Get(p_msg_index => FND_MSG_PUB.G_NEXT, p_encoded=>'F', p_data=>l_data, p_msg_index_out=>l_msg_index_out); DBMS_OUTPUT.PUT_LINE('Message(' || j ||'):= ' || l_data); END LOOP; END IF; END IF; DBMS_OUTPUT.PUT_LINE(' ');
This script calls the Update_Interaction_Activity API and provides the following values using the Update_Interaction_Activity IN parameters:
p_api_version: 1.0
p_init_msg_list: T indicates that this parameter is set to true
p_commit: T indicates that this parameter is set to true
p_resp_appl_id: the application identifier is 690
p_resp_id: the responsibility identifier is -1
p_user_id: the user identifier is 2877
p_login_id: the login identifier is -1
p_activity_rec: the record type, activity_rec_type contained in the JTF_IH_PUB and identified here as l_activity_rec. The activity_id field for this record type has been changed to l_activity_id_1 and the description field has been changed to "test update activity".
set serveroutput on; declare l_return_status VARCHAR2(30); l_msg_count NUMBER; l_msg_data VARCHAR2(200); l_interaction_rec APPS.JTF_IH_PUB.interaction_rec_type; l_interaction_id NUMBER; l_jtf_note_id NUMBER; m_count NUMBER := 0; m_active VARCHAR2(1); p_interaction_id NUMBER; l_activity_rec APPS.JTF_IH_PUB.activity_rec_type; l_activity_id_1 NUMBER; l_activity_id_2 NUMBER; m_activitycount NUMBER := 0; m_activityactive VARCHAR2(1); l_startdatecheck VARCHAR2(30); l_enddatecheck VARCHAR2(30); l_data VARCHAR2(8000); l_msg_index_out NUMBER; xInteraction_Count NUMBER := 2; cInteraction_Count VARCHAR2(80); xparty_id NUMBER := 1000; cparty_id VARCHAR2(80); xresource_id NUMBER := 10039; cresource_id VARCHAR2(80); status NUMBER; end_time_runDATE; begin_time_runDATE; total_time_runNUMBER; nDbl NUMBER := 1; l_activity_tbl JTF_IH_PUB.activity_tbl_type; l_media APPS.JTF_IH_PUB.media_rec_type; l_media_lc_rec APPS.JTF_IH_PUB.media_lc_rec_type; l_media_id NUMBER; l_mlcs APPS.JTF_IH_PUB.mlcs_tbl_type; l_milcs_id NUMBER; l_activity_count NUMBER; l_interaction_count NUMBER; l_interaction_id_2 NUMBER; begin DBMS_SESSION.SET_SQL_TRACE(TRUE); DBMS_TRACE.SET_PLSQL_TRACE(DBMS_TRACE.TRACE_ALL_CALLS+ DBMS_TRACE.TRACE_ALL_EXCEPTIONS+ DBMS_TRACE.TRACE_RESUME); -- obtain loop parameter values DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT_LINE('Interaction History (IH) Test Script'); DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT_LINE('Author: Author's Name Here.'); DBMS_OUTPUT.PUT_LINE('Version 1.0 - Initial Version - 06.27.2001'); DBMS_OUTPUT.PUT_LINE(' '); xInteraction_Count := &xInteraction_Count; xparty_id := &xparty_id; xresource_id := &xresource_id; -- begin major loop begin_time_run := sysdate; DBMS_OUTPUT.PUT_LINE('Start Time := ' || TO_CHAR(begin_time_run, 'DD-MON-YYYY:HH:MI:SS')); l_activity_rec.activity_id := 1_activity_id1; l_activity_rec.description := 'Test Update Activity'; JTF_IH_PUB.Update_Interaction_Activity(1.0, 'T', 'T', -1, 690, 2877, -1, l_return_status, l_msg_count, l_msg_data, l_activity_rec, l_activity_id_1); IF l_return_status != 'S' THEN --Display all the error messages FOR j in 1..FND_MSG_PUB.Count_Msg LOOP dbms_output.put_line(j); l_msg_data := FND_MSG_PUB.Get(p_msg_index => j, p_encoded=>'F'); DBMS_OUTPUT.PUT_LINE('Message(' || j ||'):= ' ||l_msg_data); END LOOP; END IF;
This script calls the Update_ActivityDuration API and provides the following
values using the Update_ActivityDuration IN parameters:
p_api_version: 1.0
p_init_msg_list: T indicates that this parameter is set to true
p_commit: T indicates that this parameter is set to true
p_resp_appl_id: the application identifier is 690
p_resp_id: the responsibility identifier is -1
p_user_id: the user identifier is 2877
p_login_id: the login identifier is -1
p_activity_id: the activity identifier is l_activity_id_1
p_end_date_time: the end date and time is determined using the SYSDATE SQL command
p_duration: the activity duration is 1 second
set serveroutput on; declare l_return_status VARCHAR2(30); l_msg_count NUMBER; l_msg_data VARCHAR2(200); l_interaction_rec APPS.JTF_IH_PUB.interaction_rec_type; l_interaction_id NUMBER; l_jtf_note_id NUMBER; m_count NUMBER := 0; m_active VARCHAR2(1); p_interaction_id NUMBER; l_activity_rec APPS.JTF_IH_PUB.activity_rec_type; l_activity_id_1 NUMBER; l_activity_id_2 NUMBER; m_activitycount NUMBER := 0; m_activityactive VARCHAR2(1); l_startdatecheck VARCHAR2(30); l_enddatecheck VARCHAR2(30); l_data VARCHAR2(8000); l_msg_index_out NUMBER; xInteraction_Count NUMBER := 2; cInteraction_Count VARCHAR2(80); xparty_id NUMBER := 1000; cparty_id VARCHAR2(80); xresource_id NUMBER := 10039; cresource_id VARCHAR2(80); status NUMBER; end_time_runDATE; begin_time_runDATE; total_time_runNUMBER; nDbl NUMBER := 1; l_activity_tbl JTF_IH_PUB.activity_tbl_type; l_media APPS.JTF_IH_PUB.media_rec_type; l_media_lc_rec APPS.JTF_IH_PUB.media_lc_rec_type; l_media_id NUMBER; l_mlcs APPS.JTF_IH_PUB.mlcs_tbl_type; l_milcs_id NUMBER; l_activity_count NUMBER; l_interaction_count NUMBER; l_interaction_id_2 NUMBER; begin DBMS_SESSION.SET_SQL_TRACE(TRUE); DBMS_TRACE.SET_PLSQL_TRACE(DBMS_TRACE.TRACE_ALL_CALLS+ DBMS_TRACE.TRACE_ALL_EXCEPTIONS+ DBMS_TRACE.TRACE_RESUME); -- obtain loop parameter values DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT_LINE('Interaction History (IH) Test Script'); DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT_LINE('Author: Author's Name Here.'); DBMS_OUTPUT.PUT_LINE('Version 1.0 - Initial Version - 06.27.2001'); DBMS_OUTPUT.PUT_LINE(' '); xInteraction_Count := &xInteraction_Count; xparty_id := &xparty_id; xresource_id := &xresource_id; -- begin major loop begin_time_run := sysdate; DBMS_OUTPUT.PUT_LINE('Start Time := ' || TO_CHAR(begin_time_run, 'DD-MON-YYYY:HH:MI:SS')); JTF_IH_PUB.Update_ActivityDuration (1.0, 'T', 'T', -1, 690, 2877, -1, l_return_status, l_msg_count, l_msg_data, l_activity_rec, l_activity_id_1); sysdate, 1 ); IF l_return_status != 'S' THEN --Display all the error messages FOR j in 1..FND_MSG_PUB.Count_Msg LOOP dbms_output.put_line(j); l_msg_data := FND_MSG_PUB.Get(p_msg_index => j, p_encoded=>'F'); DBMS_OUTPUT.PUT_LINE('Message(' || j ||'):= ' ||l_msg_data); END LOOP; END IF; DBMS_OUTPUT.PUT_LINE('PAST Update_ActivityDuration ');
This script contains two different methods for calling the Close_Interaction API and for providing the following values using the Close_Interaction IN parameters:
p_api_version: 1.0
p_init_msg_list: T indicates that this parameter is set to true
p_commit: T indicates that this parameter is set to true
p_resp_appl_id: the application identifier is 690
p_resp_id: the responsibility identifier is -1
p_user_id: the user identifier is 2877
p_login_id: the login identifier is -1
p_interaction_rec: the record type, interaction_rec_type contained in the JTF_IH_PUB and identified as l_interaction_rec for method 1 and l_interaction_id_2 for method 2
set serveroutput on; declare l_return_status VARCHAR2(30); l_msg_count NUMBER; l_msg_data VARCHAR2(200); l_interaction_rec APPS.JTF_IH_PUB.interaction_rec_type; l_interaction_id NUMBER; l_jtf_note_id NUMBER; m_count NUMBER := 0; m_active VARCHAR2(1); p_interaction_id NUMBER; l_activity_rec APPS.JTF_IH_PUB.activity_rec_type; l_activity_id_1 NUMBER; l_activity_id_2 NUMBER; m_activitycount NUMBER := 0; m_activityactive VARCHAR2(1); l_startdatecheck VARCHAR2(30); l_enddatecheck VARCHAR2(30); l_data VARCHAR2(8000); l_msg_index_out NUMBER; xInteraction_Count NUMBER := 2; cInteraction_Count VARCHAR2(80); xparty_id NUMBER := 1000; cparty_id VARCHAR2(80); xresource_id NUMBER := 10039; cresource_id VARCHAR2(80); status NUMBER; end_time_runDATE; begin_time_runDATE; total_time_runNUMBER; nDbl NUMBER := 1; l_activity_tbl JTF_IH_PUB.activity_tbl_type; l_media APPS.JTF_IH_PUB.media_rec_type; l_media_lc_rec APPS.JTF_IH_PUB.media_lc_rec_type; l_media_id NUMBER; l_mlcs APPS.JTF_IH_PUB.mlcs_tbl_type; l_milcs_id NUMBER; l_activity_count NUMBER; l_interaction_count NUMBER; l_interaction_id_2 NUMBER; begin DBMS_SESSION.SET_SQL_TRACE(TRUE); DBMS_TRACE.SET_PLSQL_TRACE(DBMS_TRACE.TRACE_ALL_CALLS+ DBMS_TRACE.TRACE_ALL_EXCEPTIONS+ DBMS_TRACE.TRACE_RESUME); -- obtain loop parameter values DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT_LINE('Interaction History (IH) Test Script'); DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT_LINE('Author: Author's Name Here.'); DBMS_OUTPUT.PUT_LINE('Version 1.0 - Initial Version - 06.27.2001'); DBMS_OUTPUT.PUT_LINE(' '); xInteraction_Count := &xInteraction_Count; xparty_id := &xparty_id; xresource_id := &xresource_id; -- begin major loop begin_time_run := sysdate; DBMS_OUTPUT.PUT_LINE('Start Time := ' || TO_CHAR(begin_time_run, 'DD-MON-YYYY:HH:MI:SS')); -- -- Method - I -- l_interaction_rec.interaction_id := l_interaction_id; JTF_IH_PUB.Close_Interaction( 1.0, 'T', 'T', 690, -1, 2877, null, l_return_status, l_msg_count, l_msg_data, l_interaction_rec); IF l_return_status != 'S' THEN --Display all the error messages FOR j in 1..FND_MSG_PUB.Count_Msg LOOP dbms_output.put_line(j); l_msg_data := FND_MSG_PUB.Get(p_msg_index => j, p_encoded=>'F'); DBMS_OUTPUT.PUT_LINE('Message(' || j ||'):= ' ||l_msg_data); END LOOP; END IF; DBMS_OUTPUT.PUT_LINE('PAST Close_Interaction Method 1 '); DBMS_OUTPUT.PUT_LINE('Close_Interaction - l_return_status: '||l_return_status); -- -- Method - II -- JTF_IH_PUB.Close_Interaction( 1.0, 'T', 'T', 690, -1, 2877, null, l_return_status, l_msg_count, l_msg_data, l_interaction_id_2 ); IF l_return_status != 'S' THEN --Display all the error messages FOR j in 1..FND_MSG_PUB.Count_Msg LOOP dbms_output.put_line(j); l_msg_data := FND_MSG_PUB.Get(p_msg_index => j, p_encoded=>'F'); DBMS_OUTPUT.PUT_LINE('Message(' || j ||'):= ' ||l_msg_data); END LOOP; END IF; DBMS_OUTPUT.PUT_LINE('PAST Close_Interaction Method 2'); DBMS_OUTPUT.PUT_LINE('Close_Interaction - l_return_status: '||l_return_status); -- -- Close_MediaItem -- l_media.media_id := l_media_id; JTF_IH_PUB.Close_MediaItem ( 1.0, 'T', 'T', 690, -1, 2877, -1, l_return_status, l_msg_count, l_msg_data, l_media ); IF l_return_status != 'S' THEN --Display all the error messages FOR j in 1..FND_MSG_PUB.Count_Msg LOOP dbms_output.put_line(j); l_msg_data := FND_MSG_PUB.Get(p_msg_index => j, p_encoded=>'F'); DBMS_OUTPUT.PUT_LINE('Message(' || j ||'):= ' ||l_msg_data); END LOOP; END IF; DBMS_OUTPUT.PUT_LINE('PAST Close_MediaItem '); DBMS_OUTPUT.PUT_LINE('Close_MediaItemv - l_return_status: '||l_return_status); DBMS_SESSION.SET_SQL_TRACE(FALSE); end; /
This script calls the Get_InteractionActivityCount API and provides the following filtering parameters using the Get_InteractionActivityCount IN parameters:
p_api_version: 1.0
p_init_msg_list: T indicates that this parameter is set to true
p_resp_appl_id: the application identifier is 690
p_resp_id: the responsibility identifier is -1
p_user_id: the user identifier is 2877
p_login_id: the login identifier is -1
p_outcome_id: the activity's outcome identifier is l_activity_rec.outcome_id
p_result_id: the activity's result identifier is l_activity_rec.result_id
p_reason_id: the activity's reason identifier is l_activity_rec.reason_id
p_script_id: the interaction's script identifier is l_interaction_rec.script_id
p_media_id: the activity's media identifier is l_activity_rec.media_id
set serveroutput on; declare l_return_status VARCHAR2(30); l_msg_count NUMBER; l_msg_data VARCHAR2(200); l_interaction_rec APPS.JTF_IH_PUB.interaction_rec_type; l_interaction_id NUMBER; l_jtf_note_id NUMBER; m_count NUMBER := 0; m_active VARCHAR2(1); p_interaction_id NUMBER; l_activity_rec APPS.JTF_IH_PUB.activity_rec_type; l_activity_id_1 NUMBER; l_activity_id_2 NUMBER; m_activitycount NUMBER := 0; m_activityactive VARCHAR2(1); l_startdatecheck VARCHAR2(30); l_enddatecheck VARCHAR2(30); l_data VARCHAR2(8000); l_msg_index_out NUMBER; xInteraction_Count NUMBER := 2; cInteraction_Count VARCHAR2(80); xparty_id NUMBER := 1000; cparty_id VARCHAR2(80); xresource_id NUMBER := 10039; cresource_id VARCHAR2(80); status NUMBER; end_time_runDATE; begin_time_runDATE; total_time_runNUMBER; nDbl NUMBER := 1; l_activity_tbl JTF_IH_PUB.activity_tbl_type; l_media APPS.JTF_IH_PUB.media_rec_type; l_media_lc_rec APPS.JTF_IH_PUB.media_lc_rec_type; l_media_id NUMBER; l_mlcs APPS.JTF_IH_PUB.mlcs_tbl_type; l_milcs_id NUMBER; l_activity_count NUMBER; l_interaction_count NUMBER; l_interaction_id_2 NUMBER; begin DBMS_SESSION.SET_SQL_TRACE(TRUE); DBMS_TRACE.SET_PLSQL_TRACE(DBMS_TRACE.TRACE_ALL_CALLS+ DBMS_TRACE.TRACE_ALL_EXCEPTIONS+ DBMS_TRACE.TRACE_RESUME); -- obtain loop parameter values DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT_LINE('Interaction History (IH) Test Script'); DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT_LINE('Author: Author's Name Here.'); DBMS_OUTPUT.PUT_LINE('Version 1.0 - Initial Version - 06.27.2001'); DBMS_OUTPUT.PUT_LINE(' '); xInteraction_Count := &xInteraction_Count; xparty_id := &xparty_id; xresource_id := &xresource_id; -- begin major loop begin_time_run := sysdate; DBMS_OUTPUT.PUT_LINE('Start Time := ' || TO_CHAR(begin_time_run, 'DD-MON-YYYY:HH:MI:SS')); JTF_IH_PUB.Get_InteractionActivityCount ( 1.0, 'T', 690, -1, 2877, -1, l_return_status, l_msg_count, l_msg_data, l_activity_rec.outcome_id, l_activity_rec.result_id, l_activity_rec.reason_id, l_interaction_rec.script_id, l_activity_rec.media_id, l_activity_count ); IF l_return_status != 'S' THEN --Display all the error messages FOR j in 1..FND_MSG_PUB.Count_Msg LOOP dbms_output.put_line(j); l_msg_data := FND_MSG_PUB.Get(p_msg_index => j, p_encoded=>'F'); DBMS_OUTPUT.PUT_LINE('Message(' || j ||'):= ' ||l_msg_data); END LOOP; END IF; DBMS_OUTPUT.PUT_LINE('PAST Get_InteractionActivityCount '); DBMS_OUTPUT.PUT_LINE('Get_InteractionActivityCount - l_return_status: '||l_return_status); DBMS_OUTPUT.PUT_LINE('l_activity_count - '|| to_char(l_activity_count));
This script calls the Get_InteractionCount API and provides the following input parameters using the Get_InteractionCount IN parameters, to derive an interaction
count:
p_api_version: 1.0
p_init_msg_list: T indicates that this parameter is set to true
p_resp_appl_id: the application identifier is 690
p_resp_id: the responsibility identifier is -1
p_user_id: the user identifier is 2877
p_login_id: the login identifier is -1
p_outcome_id: the interaction's outcome identifier is l_interaction_rec.outcome_id
p_result_id: the interaction's result identifier is l_interaction_rec.result_id
p_reason_id: the interaction's reason identifier is l_interaction_rec.reason_id
set serveroutput on; declare l_return_status VARCHAR2(30); l_msg_count NUMBER; l_msg_data VARCHAR2(200); l_interaction_rec APPS.JTF_IH_PUB.interaction_rec_type; l_interaction_id NUMBER; l_jtf_note_id NUMBER; m_count NUMBER := 0; m_active VARCHAR2(1); p_interaction_id NUMBER; l_activity_rec APPS.JTF_IH_PUB.activity_rec_type; l_activity_id_1 NUMBER; l_activity_id_2 NUMBER; m_activitycount NUMBER := 0; m_activityactive VARCHAR2(1); l_startdatecheck VARCHAR2(30); l_enddatecheck VARCHAR2(30); l_data VARCHAR2(8000); l_msg_index_out NUMBER; xInteraction_Count NUMBER := 2; cInteraction_Count VARCHAR2(80); xparty_id NUMBER := 1000; cparty_id VARCHAR2(80); xresource_id NUMBER := 10039; cresource_id VARCHAR2(80); status NUMBER; end_time_runDATE; begin_time_runDATE; total_time_runNUMBER; nDbl NUMBER := 1; l_activity_tbl JTF_IH_PUB.activity_tbl_type; l_media APPS.JTF_IH_PUB.media_rec_type; l_media_lc_rec APPS.JTF_IH_PUB.media_lc_rec_type; l_media_id NUMBER; l_mlcs APPS.JTF_IH_PUB.mlcs_tbl_type; l_milcs_id NUMBER; l_activity_count NUMBER; l_interaction_count NUMBER; l_interaction_id_2 NUMBER; begin DBMS_SESSION.SET_SQL_TRACE(TRUE); DBMS_TRACE.SET_PLSQL_TRACE(DBMS_TRACE.TRACE_ALL_CALLS+ DBMS_TRACE.TRACE_ALL_EXCEPTIONS+ DBMS_TRACE.TRACE_RESUME); -- obtain loop parameter values DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT_LINE('Interaction History (IH) Test Script'); DBMS_OUTPUT.PUT_LINE(' '); DBMS_OUTPUT.PUT_LINE('Author: Author's Name Here.'); DBMS_OUTPUT.PUT_LINE('Version 1.0 - Initial Version - 06.27.2001'); DBMS_OUTPUT.PUT_LINE(' '); xInteraction_Count := &xInteraction_Count; xparty_id := &xparty_id; xresource_id := &xresource_id; -- begin major loop begin_time_run := sysdate; DBMS_OUTPUT.PUT_LINE('Start Time := ' || TO_CHAR(begin_time_run, 'DD-MON-YYYY:HH:MI:SS')); JTF_IH_PUB.Get_InteractionCount( 1.0, 'T', 690, -1, 2877, -1, l_return_status, l_msg_count, l_msg_data, l_interaction_rec.outcome_id, l_interaction_rec.result_id, l_interaction_rec.reason_id, x_interaction_count => l_interaction_count); IF l_return_status != 'S' THEN --Display all the error messages FOR j in 1..FND_MSG_PUB.Count_Msg LOOP dbms_output.put_line(j); l_msg_data := FND_MSG_PUB.Get(p_msg_index => j, p_encoded=>'F'); DBMS_OUTPUT.PUT_LINE('Message(' || j ||'):= ' ||l_msg_data); END LOOP; END IF; DBMS_OUTPUT.PUT_LINE('PAST Get_InteractionCount '); DBMS_OUTPUT.PUT_LINE('Get_InteractionCount - l_return_status: '||l_return_status); DBMS_OUTPUT.PUT_LINE('l_interaction_count - '|| to_char(l_interaction_count));