1 PACKAGE CS_Interaction_PVT AUTHID CURRENT_USER AS
2 /* $Header: csvcis.pls 115.0 99/07/16 09:05:13 porting s $ */
3
4 /****************************************************************************
5 * Global constants *
6 ****************************************************************************/
7
8 -- Pre-defined validation level:
9 -- INT : Validate attributes specific to Customer Interaction. If
10 -- p_validation_level is set to G_VALID_LEVEL_INT, only the
11 -- following attributes are not validated:
12 -- p_user_id, p_login_id, p_org_id, p_customer_id,
13 -- p_contact_id, p_employee_id
14
15 G_VALID_LEVEL_INT CONSTANT NUMBER := 50;
16
17 /****************************************************************************
18 * API Specification *
19 ****************************************************************************/
20
21 -- Start of comments
22 -- Procedure : Create_Interaction
23 -- Type : Private API
24 -- Usage : Creates a customer interaction record in the table
25 -- CS_INTERACTIONS
26 -- Pre-reqs : None
27 --
28 -- Standard IN Parameters:
29 -- p_api_version IN NUMBER Required
30 -- p_init_msg_list IN VARCHAR2(1) Optional
31 -- Default = FND_API.G_FALSE
32 -- p_commit IN VARCHAR2(1) Optional
33 -- Default = FND_API.G_FALSE
34 -- p_validation_level IN NUMBER Optional(1)
35 -- Default = FND_API.G_VALID_LEVEL_FULL
36 --
37 -- Standard OUT Parameters:
38 -- x_return_status OUT VARCHAR2(1)
39 -- x_msg_count OUT NUMBER
40 -- x_msg_data OUT VARCHAR2(2000)
41 --
42 -- Customer Interaction IN Parameters:
43 -- p_resp_appl_id IN NUMBER Optional(2)
44 -- Application identifier
45 -- p_resp_id IN NUMBER Optional(2)
46 -- Responsibility identifier
47 -- p_user_id IN NUMBER Required
48 -- Corresponds to the column USER_ID in the table FND_USER, and
49 -- identifies the Oracle Applications user
50 -- p_login_id IN NUMBER Optional
51 -- Corresponds to the column LOGIN_ID in the table FND_LOGINS,
52 -- and identifies the login session
53 -- p_org_id IN NUMBER Optional
54 -- Operating unit identifier of this interaction record
55 -- p_customer_id IN NUMBER Required
56 -- Corresponds to the column CUSTOMER_ID in the table
57 -- RA_CUSTOMERS, and identifies the customer who is the subject
58 -- of this interaction
59 -- p_contact_id IN NUMBER Optional(3)
60 -- Corresponds to the column CONTACT_ID in the table RA_CONTACTS,
61 -- and identifies the contact who interacted on behalf of the
62 -- customer
63 -- p_contact_lastname IN VARCHAR2(50) Optional(3)
64 -- Last name of the contact who interacted on behalf of the
65 -- customer
66 -- p_contact_firstname IN VARCHAR2(40) Optional(3)
67 -- First name of the contact who interacted on behalf of the
68 -- customer
69 -- p_phone_area_code IN VARCHAR2(10) Optional(4)
70 -- Area code of contact's phone number
71 -- p_phone_number IN VARCHAR2(25) Optional(4)
72 -- Contact's phone number
73 -- p_phone_extension IN VARCHAR2(20) Optional(4)
74 -- Extension of contact's phone number
75 -- p_fax_area_code IN VARCHAR2(10) Optional(4)
76 -- Area code of contact's fax number
77 -- p_fax_number IN VARCHAR2(25) Optional(4)
78 -- Contact's fax number
79 -- p_email_address IN VARCHAR2(240) Optional(4)
80 -- Contact's email address
81 -- p_interaction_type_code IN VARCHAR2(30) Required
82 -- Lookup code for interaction type
83 -- p_interaction_category_code IN VARCHAR2(30) Required
84 -- Lookup code for interaction category
85 -- p_interaction_method_code IN VARCHAR2(30) Required
86 -- Lookup code for interaction method
87 -- p_interaction_date IN DATE Required
88 -- Date and time this interaction occurred
89 -- p_interaction_document_code IN VARCHAR2(30) Optional
90 -- Lookup code for interaction document type
91 -- p_source_document_id IN NUMBER Optional(5)
92 -- Internal identifier of the reference document
93 -- p_source_document_name IN VARCHAR2(80) Optional(4,5)
94 -- User-visible identifier of the reference document
95 -- p_reference_form IN VARCHAR2(2000) Optional(4,5,6)
96 -- Oracle Applications internal function name of a form and any
97 -- optional form parameters
98 -- p_source_document_status IN VARCHAR2(80) Optional(4,5)
99 -- Status of the reference document
100 -- p_employee_id IN NUMBER Optional
101 -- Corresponds to the column PERSON_ID in the table
102 -- PER_ALL_PEOPLE_F, and identifies the employee who interacted
103 -- with the customer or contact
104 -- p_public_flag IN VARCHAR2(1) Optional
105 -- Indicates whether this interaction is public ('Y') or private
106 -- ('N')
107 -- p_follow_up_action IN VARCHAR2(80) Optional(4)
108 -- Follow-up action for this interaction
109 -- p_notes IN VARCHAR2(2000) Optional(4)
110 -- Explanations, comments, or claims regarding this interaction
111 -- p_parent_interaction_id IN NUMBER Optional(7)
112 -- Identifier of the parent interaction that resulted in this
113 -- interaction
114 -- Default = x_interaction_id
115 -- p_attribute1 IN VARCHAR2(150) Optional(8)
116 -- Customer interaction descriptive flexfield segments 1-15
117 -- p_attribute2 IN VARCHAR2(150) Optional(8)
118 -- p_attribute3 IN VARCHAR2(150) Optional(8)
119 -- p_attribute4 IN VARCHAR2(150) Optional(8)
120 -- p_attribute5 IN VARCHAR2(150) Optional(8)
121 -- p_attribute6 IN VARCHAR2(150) Optional(8)
122 -- p_attribute7 IN VARCHAR2(150) Optional(8)
123 -- p_attribute8 IN VARCHAR2(150) Optional(8)
124 -- p_attribute9 IN VARCHAR2(150) Optional(8)
125 -- p_attribute10 IN VARCHAR2(150) Optional(8)
126 -- p_attribute11 IN VARCHAR2(150) Optional(8)
127 -- p_attribute12 IN VARCHAR2(150) Optional(8)
128 -- p_attribute13 IN VARCHAR2(150) Optional(8)
129 -- p_attribute14 IN VARCHAR2(150) Optional(8)
130 -- p_attribute15 IN VARCHAR2(150) Optional(8)
131 -- p_attribute_category IN VARCHAR2(30) Optional(8)
132 -- Descriptive flexfield structure defining column
133 --
134 -- Customer Interaction OUT Parameters
135 -- x_interaction_id OUT NUMBER
136 -- System generated identifier of the customer interaction record
137 --
138 -- Version : Initial version 1.0
139 --
140 -- Notes :
141 -- (1) The validation level determines which validation steps are
142 -- executed and which steps are skipped. Valid values are:
143 -- FND_API.G_VALID_LEVEL_FULL => Perform all validation steps
144 -- CS_Interaction_GRP.G_VALID_LEVEL_INT =>
145 -- Skip validation steps for non-Service attributes (see
146 -- above)
147 -- FND_API.G_VALID_LEVEL_NONE => Perform no validation steps
148 -- (2) The application ID, responsibility ID, and user ID are used for
149 -- validation.
150 -- (3) You may pass in either a valid contact ID, or you may pass in a
151 -- last name and first name if the contact is not in the RA_CONTACTS
152 -- table.
153 -- (4) For value parameters that are stored in the database directly,
154 -- without validation, this API checks to ensure that the passed
155 -- string's length does not exceed the length of its destination
156 -- column. If the check fails, the value truncates and a warning is
157 -- appended to the message list.
158 -- (5) If you do not pass in an interaction document type, the source
159 -- document ID, name, status, and reference form are ignored. If you
160 -- do not pass in a source document name, the reference form and
161 -- source document status are ignored.
162 -- (6) The value must be passed in using the following format:
163 -- function_name:parameter1=value1 ... parameterN=valueN
164 -- where valueN can be a text string enclosed in double quotes, or a
165 -- token substituted with the p_source_document_id or
166 -- p_source_document_name parameter in the following ways:
167 -- parameterN="&ID"
168 -- parameterN="&NAME"
169 -- where &ID represents the value of p_source_document_id, and &NAME
170 -- represents the value of p_source_document_name.
171 -- The reference form is passed to the Customer Interactions form to
172 -- let a user drill down to the form to see additional information
173 -- related to the interaction.
174 -- (7) If you do not pass in a parent interaction ID, the system-
175 -- generated interaction ID is inserted as the parent interaction ID.
176 -- (8) You must pass in segment IDs for none or all descriptive flexfield
177 -- columns that might be used in the descriptive flexfield.
178 --
179 -- End of comments
180
181 PROCEDURE Create_Interaction
182 ( p_api_version IN NUMBER,
183 p_init_msg_list IN VARCHAR2 DEFAULT FND_API.G_FALSE,
184 p_commit IN VARCHAR2 DEFAULT FND_API.G_FALSE,
185 p_validation_level IN NUMBER DEFAULT FND_API.G_VALID_LEVEL_FULL,
186 x_return_status OUT VARCHAR2,
187 x_msg_count OUT NUMBER,
188 x_msg_data OUT VARCHAR2,
189 p_resp_appl_id IN NUMBER DEFAULT NULL,
190 p_resp_id IN NUMBER DEFAULT NULL,
191 p_user_id IN NUMBER,
192 p_login_id IN NUMBER DEFAULT NULL,
193 p_org_id IN NUMBER DEFAULT NULL,
194 p_customer_id IN NUMBER,
195 p_contact_id IN NUMBER DEFAULT NULL,
196 p_contact_lastname IN VARCHAR2 DEFAULT NULL,
197 p_contact_firstname IN VARCHAR2 DEFAULT NULL,
198 p_phone_area_code IN VARCHAR2 DEFAULT NULL,
199 p_phone_number IN VARCHAR2 DEFAULT NULL,
200 p_phone_extension IN VARCHAR2 DEFAULT NULL,
201 p_fax_area_code IN VARCHAR2 DEFAULT NULL,
202 p_fax_number IN VARCHAR2 DEFAULT NULL,
203 p_email_address IN VARCHAR2 DEFAULT NULL,
204 p_interaction_type_code IN VARCHAR2,
205 p_interaction_category_code IN VARCHAR2,
206 p_interaction_method_code IN VARCHAR2,
207 p_interaction_date IN DATE,
208 p_interaction_document_code IN VARCHAR2 DEFAULT NULL,
209 p_source_document_id IN NUMBER DEFAULT NULL,
210 p_source_document_name IN VARCHAR2 DEFAULT NULL,
211 p_reference_form IN VARCHAR2 DEFAULT NULL,
212 p_source_document_status IN VARCHAR2 DEFAULT NULL,
213 p_employee_id IN NUMBER DEFAULT NULL,
214 p_public_flag IN VARCHAR2 DEFAULT NULL,
215 p_follow_up_action IN VARCHAR2 DEFAULT NULL,
216 p_notes IN VARCHAR2 DEFAULT NULL,
217 p_parent_interaction_id IN NUMBER DEFAULT NULL,
218 p_attribute1 IN VARCHAR2 DEFAULT NULL,
219 p_attribute2 IN VARCHAR2 DEFAULT NULL,
220 p_attribute3 IN VARCHAR2 DEFAULT NULL,
221 p_attribute4 IN VARCHAR2 DEFAULT NULL,
222 p_attribute5 IN VARCHAR2 DEFAULT NULL,
223 p_attribute6 IN VARCHAR2 DEFAULT NULL,
224 p_attribute7 IN VARCHAR2 DEFAULT NULL,
225 p_attribute8 IN VARCHAR2 DEFAULT NULL,
226 p_attribute9 IN VARCHAR2 DEFAULT NULL,
227 p_attribute10 IN VARCHAR2 DEFAULT NULL,
228 p_attribute11 IN VARCHAR2 DEFAULT NULL,
229 p_attribute12 IN VARCHAR2 DEFAULT NULL,
230 p_attribute13 IN VARCHAR2 DEFAULT NULL,
231 p_attribute14 IN VARCHAR2 DEFAULT NULL,
232 p_attribute15 IN VARCHAR2 DEFAULT NULL,
233 p_attribute_category IN VARCHAR2 DEFAULT NULL,
234 x_interaction_id OUT NUMBER
235 );
236
237 END CS_Interaction_PVT;