1 PACKAGE jtf_ec_pvt AS
2 /* $Header: jtfecmas.pls 120.1 2005/07/02 00:41:26 appldev ship $ */
3 /*#
4 * This is the private interface to the JTF Escalation Management.
5 * This Interface is used to Create / Update / Delete Contacts for
6 * the escalations.
7 *
8 * @rep:scope private
9 * @rep:product JTF
10 * @rep:lifecycle active
11 * @rep:displayname Escalation Management
12 * @rep:compatibility S
13 * @rep:category BUSINESS_ENTITY JTA_ESCALATION
14 */
15
16 g_pkg_name CONSTANT VARCHAR2(30) := 'JTF_EC_PVT';
17 g_user CONSTANT VARCHAR2(30) := fnd_global.user_id;
18 g_false CONSTANT VARCHAR2(30) := fnd_api.g_false;
19 g_true CONSTANT VARCHAR2(30) := fnd_api.g_true;
20
21 /*#
22 * Creates an Escalation. After successful creation, triggers the BES for
23 * create event.
24 *
25 * @param p_api_version the standard API version number
26 * @param p_init_msg_list the standard API flag allows API callers to request
27 * that the API does the initialization of the message list on their behalf.
28 * By default, the message list will not be initialized.
29 * @param p_commit the standard API flag is used by API callers to ask
30 * the API to commit on their behalf after performing its function
31 * By default, the commit will not be performed.
32 * @param p_esc_id the escalation ID
33 * @param p_escalation_name the escalation Name
34 * @param p_description the escalation description
35 * @param p_escalation_status_name the escalation status name
36 * @param p_escalation_status_id the escalation status id
37 * @param p_escalation_priority_name the escalation priority name
38 * @param p_escalation_priority_id the escalation priority id
39 * @param p_open_date the date when escalation was opened
40 * @param p_close_date the escalation when escalation gets closed
41 * @param p_escalation_owner_type_code the owner type for the escalation
42 * @param p_escalation_owner_id the owner id for the escalation
43 * @param p_owner_territory_id the owner id for the escalation
44 * @param p_assigned_by_name the name of the assigner
45 * @param p_assigned_by_id the id of the assigner
46 * @param p_customer_number the customer number
47 * @param p_customer_id the customer id
48 * @param p_cust_account_number the customer account number
49 * @param p_cust_account_id the customer account id
50 * @param p_address_id the customer address id
51 * @param p_address_number the customer address number
52 * @param p_target_date the target date for the escalation
53 * @param p_reason_code the reason code for the reason of escalation
54 * @param p_private_flag the private flag indicator
55 * @param p_publish_flag the publish flag indicator
56 * @param p_workflow_process_id the workflow process id for notifications of the created escalation
57 * @param p_escalation_level the escalation level
58 * @param x_return_status the parameter that returns the result of all the operations performed.
59 * by the API and must have one of the following values:
60 * <LI><Code>FND_API.G_RET_STS_SUCCESS</Code>
61 * <LI><Code>FND_API.G_RET_STS_ERROR</Code>
62 * <LI><Code>FND_API.G_RET_STS_UNEXP_ERROR</Code>
63 * @param x_msg_count the parameter that returns the number of messages in the FND message list.
64 * @param x_msg_data the parameter that returns the FND Message in encoded format.
65 * @param x_escalation_id the parameter that returns the Escalation ID for the created Escalation
66 * @param p_attribute1 the value of the flex field attribute1
67 * @param p_attribute2 the value of the flex field attribute2
68 * @param p_attribute3 the value of the flex field attribute3
69 * @param p_attribute4 the value of the flex field attribute4
70 * @param p_attribute5 the value of the flex field attribute5
71 * @param p_attribute6 the value of the flex field attribute6
72 * @param p_attribute7 the value of the flex field attribute7
73 * @param p_attribute8 the value of the flex field attribute8
74 * @param p_attribute9 the value of the flex field attribute9
75 * @param p_attribute10 the value of the flex field attribute10
76 * @param p_attribute11 the value of the flex field attribute11
77 * @param p_attribute12 the value of the flex field attribute12
78 * @param p_attribute13 the value of the flex field attribute13
79 * @param p_attribute14 the value of the flex field attribute14
80 * @param p_attribute15 the value of the flex field attribute15
81 * @param p_attribute_category the value of the flex field attribute category
82 * @rep:scope private
83 * @rep:lifecycle active
84 * @rep:displayname Create Escalation
85 * @rep:compatibility S
86 */
87 PROCEDURE create_escalation (
88 p_api_version IN NUMBER,
89 p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false,
90 p_commit IN VARCHAR2 DEFAULT fnd_api.g_false,
91 p_esc_id IN NUMBER DEFAULT NULL,
92 p_escalation_name IN VARCHAR2,
93 p_description IN VARCHAR2 DEFAULT NULL,
94 p_escalation_status_name IN VARCHAR2 DEFAULT NULL,
95 p_escalation_status_id IN NUMBER DEFAULT NULL,
96 p_escalation_priority_name IN VARCHAR2 DEFAULT NULL,
97 p_escalation_priority_id IN NUMBER DEFAULT NULL,
98 p_open_date IN DATE DEFAULT NULL,
99 p_close_date IN DATE DEFAULT NULL,
100 p_escalation_owner_type_code IN VARCHAR2 DEFAULT NULL,
101 p_escalation_owner_id IN NUMBER DEFAULT NULL,
102 p_owner_territory_id IN NUMBER DEFAULT NULL,
103 p_assigned_by_name IN VARCHAR2 DEFAULT NULL,
104 p_assigned_by_id IN NUMBER DEFAULT NULL,
105 p_customer_number IN VARCHAR2 DEFAULT NULL,
106 p_customer_id IN NUMBER DEFAULT NULL,
107 p_cust_account_number IN VARCHAR2 DEFAULT NULL,
108 p_cust_account_id IN NUMBER DEFAULT NULL,
109 p_address_id IN NUMBER DEFAULT NULL,
110 p_address_number IN VARCHAR2 DEFAULT NULL,
111 p_target_date IN DATE DEFAULT NULL,
112 p_reason_code IN VARCHAR2 DEFAULT NULL,
113 p_private_flag IN VARCHAR2 DEFAULT NULL,
114 p_publish_flag IN VARCHAR2 DEFAULT NULL,
115 p_workflow_process_id IN NUMBER DEFAULT NULL,
116 p_escalation_level IN VARCHAR2 DEFAULT NULL,
117 x_return_status OUT NOCOPY VARCHAR2,
118 x_msg_count OUT NOCOPY NUMBER,
119 x_msg_data OUT NOCOPY VARCHAR2,
120 x_escalation_id OUT NOCOPY NUMBER,
121 p_attribute1 IN VARCHAR2 DEFAULT null ,
122 p_attribute2 IN VARCHAR2 DEFAULT null ,
123 p_attribute3 IN VARCHAR2 DEFAULT null ,
124 p_attribute4 IN VARCHAR2 DEFAULT null ,
125 p_attribute5 IN VARCHAR2 DEFAULT null ,
126 p_attribute6 IN VARCHAR2 DEFAULT null ,
127 p_attribute7 IN VARCHAR2 DEFAULT null ,
128 p_attribute8 IN VARCHAR2 DEFAULT null ,
129 p_attribute9 IN VARCHAR2 DEFAULT null ,
130 p_attribute10 IN VARCHAR2 DEFAULT null ,
131 p_attribute11 IN VARCHAR2 DEFAULT null ,
132 p_attribute12 IN VARCHAR2 DEFAULT null ,
133 p_attribute13 IN VARCHAR2 DEFAULT null ,
134 p_attribute14 IN VARCHAR2 DEFAULT null ,
135 p_attribute15 IN VARCHAR2 DEFAULT null ,
136 p_attribute_category IN VARCHAR2 DEFAULT null
137
138 );
139
140 /*#
141 * Updates an Escalation. After successful updation, triggers the BES for
142 * update event.
143 *
144 * @param p_api_version the standard API version number
145 * @param p_init_msg_list the standard API flag allows API callers to request
146 * that the API does the initialization of the message list on their behalf.
147 * By default, the message list will not be initialized.
148 * @param p_commit the standard API flag is used by API callers to ask
149 * the API to commit on their behalf after performing its function
150 * By default, the commit will not be performed.
151 * @param p_object_version_number the object version number of the escalation record
152 * @param p_escalation_id the escalation id
153 * @param p_escalation_number the escalation number
154 * @param p_escalation_name the escalation name
155 * @param p_description the escalation description
156 * @param p_escalation_status_name the escalation status name
157 * @param p_escalation_status_id the escalation status id
158 * @param p_open_date the date when escalation was opened
159 * @param p_close_date the escalation when escalation gets closed
160 * @param p_escalation_priority_name the escalation priority name
161 * @param p_escalation_priority_id the escalation priority id
162 * @param p_owner_id the owner id for the escalation
163 * @param p_escalation_owner_type_code the owner type for the escalation
164 * @param p_owner_territory_id the owner id for the escalation
165 * @param p_assigned_by_name the name of the assigner
166 * @param p_assigned_by_id the id of the assigner
167 * @param p_customer_number the customer number
168 * @param p_customer_id the customer id
169 * @param p_cust_account_number the customer account number
170 * @param p_cust_account_id the customer account id
171 * @param p_address_id the customer address id
172 * @param p_address_number the customer address number
173 * @param p_target_date the target date for the escalation
174 * @param p_reason_code the reason code for the reason of escalation
175 * @param p_private_flag the private flag indicator
176 * @param p_publish_flag the publish flag indicator
177 * @param p_workflow_process_id the workflow process id for notifications of the created escalation
178 * @param p_escalation_level the escalation level
179 * @param x_return_status the parameter that returns the result of all the operations performed.
180 * by the API and must have one of the following values:
181 * <LI><Code>FND_API.G_RET_STS_SUCCESS</Code>
182 * <LI><Code>FND_API.G_RET_STS_ERROR</Code>
183 * <LI><Code>FND_API.G_RET_STS_UNEXP_ERROR</Code>
184 * @param x_msg_count the parameter that returns the number of messages in the FND message list.
185 * @param x_msg_data the parameter that returns the FND Message in encoded format.
186 * @param p_attribute1 the value of the flex field attribute1
187 * @param p_attribute2 the value of the flex field attribute2
188 * @param p_attribute3 the value of the flex field attribute3
189 * @param p_attribute4 the value of the flex field attribute4
190 * @param p_attribute5 the value of the flex field attribute5
191 * @param p_attribute6 the value of the flex field attribute6
192 * @param p_attribute7 the value of the flex field attribute7
193 * @param p_attribute8 the value of the flex field attribute8
194 * @param p_attribute9 the value of the flex field attribute9
195 * @param p_attribute10 the value of the flex field attribute10
196 * @param p_attribute11 the value of the flex field attribute11
197 * @param p_attribute12 the value of the flex field attribute12
198 * @param p_attribute13 the value of the flex field attribute13
199 * @param p_attribute14 the value of the flex field attribute14
200 * @param p_attribute15 the value of the flex field attribute15
201 * @param p_attribute_category the value of the flex field attribute category
202 * @rep:scope private
203 * @rep:lifecycle active
204 * @rep:displayname Update Escalation
205 * @rep:compatibility S
206 */
207 PROCEDURE update_escalation (
208 p_api_version IN NUMBER,
209 p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false,
210 p_commit IN VARCHAR2 DEFAULT fnd_api.g_false,
211 p_object_version_number IN OUT NOCOPY NUMBER,
212 p_escalation_id IN NUMBER DEFAULT fnd_api.g_miss_num,
213 p_escalation_number IN VARCHAR2 DEFAULT fnd_api.g_miss_char,
214 p_escalation_name IN VARCHAR2 DEFAULT fnd_api.g_miss_char,
215 p_description IN VARCHAR2 DEFAULT fnd_api.g_miss_char,
216 p_escalation_status_name IN VARCHAR2 DEFAULT fnd_api.g_miss_char,
217 p_escalation_status_id IN NUMBER DEFAULT fnd_api.g_miss_num,
218 p_open_date in DATE DEFAULT fnd_api.g_miss_date,
219 p_close_date in DATE DEFAULT fnd_api.g_miss_date,
220 p_escalation_priority_name IN VARCHAR2 DEFAULT fnd_api.g_miss_char,
221 p_escalation_priority_id IN NUMBER DEFAULT fnd_api.g_miss_num,
222 p_owner_id IN NUMBER DEFAULT fnd_api.g_miss_num,
223 p_escalation_owner_type_code IN VARCHAR2 DEFAULT fnd_api.g_miss_char,
224 p_owner_territory_id IN NUMBER DEFAULT fnd_api.g_miss_num,
225 p_assigned_by_name IN VARCHAR2 DEFAULT fnd_api.g_miss_char,
226 p_assigned_by_id IN NUMBER DEFAULT fnd_api.g_miss_num,
227 p_customer_number IN VARCHAR2 DEFAULT fnd_api.g_miss_char,
228 p_customer_id IN NUMBER DEFAULT fnd_api.g_miss_num,
229 p_cust_account_number IN VARCHAR2 DEFAULT fnd_api.g_miss_char,
230 p_cust_account_id IN NUMBER DEFAULT fnd_api.g_miss_num,
231 p_address_id IN NUMBER DEFAULT fnd_api.g_miss_num,
232 p_address_number IN VARCHAR2 DEFAULT fnd_api.g_miss_char,
233 p_target_date IN DATE DEFAULT fnd_api.g_miss_date,
234 /* p_timezone_id IN NUMBER DEFAULT fnd_api.g_miss_num,
235 p_timezone_name IN VARCHAR2 DEFAULT fnd_api.g_miss_char,
236 */ p_reason_code IN VARCHAR2 DEFAULT fnd_api.g_miss_char,
237 p_private_flag IN VARCHAR2 DEFAULT fnd_api.g_miss_char,
238 p_publish_flag IN VARCHAR2 DEFAULT fnd_api.g_miss_char,
239 p_workflow_process_id IN NUMBER DEFAULT fnd_api.g_miss_num,
240 p_escalation_level IN VARCHAR2 DEFAULT fnd_api.g_miss_char,
241 x_return_status OUT NOCOPY VARCHAR2,
242 x_msg_count OUT NOCOPY NUMBER,
243 x_msg_data OUT NOCOPY VARCHAR2,
244 p_attribute1 IN VARCHAR2 DEFAULT jtf_task_utl.g_miss_char,
245 p_attribute2 IN VARCHAR2 DEFAULT jtf_task_utl.g_miss_char,
246 p_attribute3 IN VARCHAR2 DEFAULT jtf_task_utl.g_miss_char,
247 p_attribute4 IN VARCHAR2 DEFAULT jtf_task_utl.g_miss_char,
248 p_attribute5 IN VARCHAR2 DEFAULT jtf_task_utl.g_miss_char,
249 p_attribute6 IN VARCHAR2 DEFAULT jtf_task_utl.g_miss_char,
250 p_attribute7 IN VARCHAR2 DEFAULT jtf_task_utl.g_miss_char,
251 p_attribute8 IN VARCHAR2 DEFAULT jtf_task_utl.g_miss_char,
252 p_attribute9 IN VARCHAR2 DEFAULT jtf_task_utl.g_miss_char,
253 p_attribute10 IN VARCHAR2 DEFAULT jtf_task_utl.g_miss_char,
254 p_attribute11 IN VARCHAR2 DEFAULT jtf_task_utl.g_miss_char,
255 p_attribute12 IN VARCHAR2 DEFAULT jtf_task_utl.g_miss_char,
256 p_attribute13 IN VARCHAR2 DEFAULT jtf_task_utl.g_miss_char,
257 p_attribute14 IN VARCHAR2 DEFAULT jtf_task_utl.g_miss_char,
258 p_attribute15 IN VARCHAR2 DEFAULT jtf_task_utl.g_miss_char,
259 p_attribute_category IN VARCHAR2 DEFAULT jtf_task_utl.g_miss_char
260 );
261
262 /*#
263 * Deletes an Escalation. After successful deletion, triggers the BES for
264 * delete event.
265 *
266 * @param p_api_version the standard API version number
267 * @param p_init_msg_list the standard API flag allows API callers to request
268 * that the API does the initialization of the message list on their behalf.
269 * By default, the message list will not be initialized.
270 * @param p_commit the standard API flag is used by API callers to ask
271 * the API to commit on their behalf after performing its function
272 * By default, the commit will not be performed.
273 * @param p_object_version_number the object version number of the escalation record
274 * @param p_escalation_id the escalation id
275 * @param p_escalation_number the escalation number
276 * @param x_return_status the parameter that returns the result of all the operations performed.
277 * by the API and must have one of the following values:
278 * <LI><Code>FND_API.G_RET_STS_SUCCESS</Code>
279 * <LI><Code>FND_API.G_RET_STS_ERROR</Code>
280 * <LI><Code>FND_API.G_RET_STS_UNEXP_ERROR</Code>
281 * @param x_msg_count the parameter that returns the number of messages in the FND message list.
282 * @param x_msg_data the parameter that returns the FND Message in encoded format.
283 * @rep:scope private
284 * @rep:lifecycle active
285 * @rep:displayname Delete Escalation
286 * @rep:compatibility S
287 */
288 PROCEDURE delete_escalation (
289 p_api_version IN NUMBER,
290 p_init_msg_list IN VARCHAR2 DEFAULT fnd_api.g_false,
291 p_commit IN VARCHAR2 DEFAULT fnd_api.g_false,
292 p_object_version_number IN NUMBER ,
293 p_escalation_id IN NUMBER DEFAULT NULL,
294 p_escalation_number IN VARCHAR2 DEFAULT NULL,
295 x_return_status OUT NOCOPY VARCHAR2,
296 x_msg_count OUT NOCOPY NUMBER,
297 x_msg_data OUT NOCOPY VARCHAR2
298 );
299
300 --Created for BES enh 2660883
301
302 TYPE Esc_rec_type IS RECORD (
303 ESCALATION_ID JTF_TASKS_B.TASK_ID %TYPE := FND_API.G_MISS_NUM,
304 ESCALATION_LEVEL JTF_TASKS_B.ESCALATION_LEVEL%TYPE := FND_API.G_MISS_CHAR,
305 TASK_AUDIT_ID JTF_TASK_AUDITS_B.TASK_AUDIT_ID%TYPE := FND_API.G_MISS_NUM
306 );
307
308 END;