[Home] [Help]
PACKAGE: APPS.HZ_CUSTOMER_PROFILE_V2PUB
Source
1 PACKAGE HZ_CUSTOMER_PROFILE_V2PUB AS
2 /*$Header: ARH2CFSS.pls 120.10 2006/08/17 10:17:19 idali ship $ */
3 /*#
4 * This package contains the public APIs for customer profiles and customer profile
5 * amounts.
6 * @rep:scope public
7 * @rep:product HZ
8 * @rep:displayname Customer Profile
9 * @rep:category BUSINESS_ENTITY HZ_CUSTOMER_ACCOUNT
10 * @rep:lifecycle active
11 * @rep:doccd 120hztig.pdf Customer Profile APIs, Oracle Trading Community Architecture Technical Implementation Guide
12 */
13
14 --------------------------------------
15 -- declaration of record type
16 --------------------------------------
17
18 TYPE customer_profile_rec_type IS RECORD (
19 cust_account_profile_id NUMBER,
20 cust_account_id NUMBER,
21 status VARCHAR2(1),
22 collector_id NUMBER,
23 credit_analyst_id NUMBER,
24 credit_checking VARCHAR2(1),
25 next_credit_review_date DATE,
26 tolerance NUMBER,
27 discount_terms VARCHAR2(1),
28 dunning_letters VARCHAR2(1),
29 interest_charges VARCHAR2(1),
30 send_statements VARCHAR2(1),
31 credit_balance_statements VARCHAR2(1),
32 credit_hold VARCHAR2(1),
33 profile_class_id NUMBER,
34 site_use_id NUMBER,
35 credit_rating VARCHAR2(30),
36 risk_code VARCHAR2(30),
37 standard_terms NUMBER,
38 override_terms VARCHAR2(1),
39 dunning_letter_set_id NUMBER,
40 interest_period_days NUMBER,
41 payment_grace_days NUMBER,
42 discount_grace_days NUMBER,
43 statement_cycle_id NUMBER,
44 account_status VARCHAR2(30),
45 percent_collectable NUMBER,
46 autocash_hierarchy_id NUMBER,
47 attribute_category VARCHAR2(30),
48 attribute1 VARCHAR2(150),
49 attribute2 VARCHAR2(150),
50 attribute3 VARCHAR2(150),
51 attribute4 VARCHAR2(150),
52 attribute5 VARCHAR2(150),
53 attribute6 VARCHAR2(150),
54 attribute7 VARCHAR2(150),
55 attribute8 VARCHAR2(150),
56 attribute9 VARCHAR2(150),
57 attribute10 VARCHAR2(150),
58 attribute11 VARCHAR2(150),
59 attribute12 VARCHAR2(150),
60 attribute13 VARCHAR2(150),
61 attribute14 VARCHAR2(150),
62 attribute15 VARCHAR2(150),
63 auto_rec_incl_disputed_flag VARCHAR2(1),
64 tax_printing_option VARCHAR2(30),
65 charge_on_finance_charge_flag VARCHAR2(1),
66 grouping_rule_id NUMBER,
67 clearing_days NUMBER,
68 jgzz_attribute_category VARCHAR2(30),
69 jgzz_attribute1 VARCHAR2(150),
70 jgzz_attribute2 VARCHAR2(150),
71 jgzz_attribute3 VARCHAR2(150),
72 jgzz_attribute4 VARCHAR2(150),
73 jgzz_attribute5 VARCHAR2(150),
74 jgzz_attribute6 VARCHAR2(150),
75 jgzz_attribute7 VARCHAR2(150),
76 jgzz_attribute8 VARCHAR2(150),
77 jgzz_attribute9 VARCHAR2(150),
78 jgzz_attribute10 VARCHAR2(150),
79 jgzz_attribute11 VARCHAR2(150),
80 jgzz_attribute12 VARCHAR2(150),
81 jgzz_attribute13 VARCHAR2(150),
82 jgzz_attribute14 VARCHAR2(150),
83 jgzz_attribute15 VARCHAR2(150),
84 global_attribute1 VARCHAR2(150),
85 global_attribute2 VARCHAR2(150),
86 global_attribute3 VARCHAR2(150),
87 global_attribute4 VARCHAR2(150),
88 global_attribute5 VARCHAR2(150),
89 global_attribute6 VARCHAR2(150),
90 global_attribute7 VARCHAR2(150),
91 global_attribute8 VARCHAR2(150),
92 global_attribute9 VARCHAR2(150),
93 global_attribute10 VARCHAR2(150),
94 global_attribute11 VARCHAR2(150),
95 global_attribute12 VARCHAR2(150),
96 global_attribute13 VARCHAR2(150),
97 global_attribute14 VARCHAR2(150),
98 global_attribute15 VARCHAR2(150),
99 global_attribute16 VARCHAR2(150),
100 global_attribute17 VARCHAR2(150),
101 global_attribute18 VARCHAR2(150),
102 global_attribute19 VARCHAR2(150),
103 global_attribute20 VARCHAR2(150),
104 global_attribute_category VARCHAR2(30),
105 cons_inv_flag VARCHAR2(1),
106 cons_inv_type VARCHAR2(30),
107 autocash_hierarchy_id_for_adr NUMBER,
108 lockbox_matching_option VARCHAR2(30),
109 created_by_module VARCHAR2(150),
110 application_id NUMBER,
111 review_cycle VARCHAR2(30),
112 last_credit_review_date DATE,
113 party_id NUMBER,
114 credit_classification VARCHAR2(30),
115 cons_bill_level VARCHAR2(30),
116 late_charge_calculation_trx VARCHAR2(30),
117 credit_items_flag VARCHAR2(1),
118 disputed_transactions_flag VARCHAR2(1),
119 late_charge_type VARCHAR2(30),
120 late_charge_term_id NUMBER,
121 interest_calculation_period VARCHAR2(30),
122 hold_charged_invoices_flag VARCHAR2(1),
123 message_text_id NUMBER,
124 multiple_interest_rates_flag VARCHAR2(1),
125 charge_begin_date DATE
126 );
127
128 TYPE cust_profile_amt_rec_type IS RECORD (
129 cust_acct_profile_amt_id NUMBER,
130 cust_account_profile_id NUMBER,
131 currency_code VARCHAR2(15),
132 trx_credit_limit NUMBER,
133 overall_credit_limit NUMBER,
134 min_dunning_amount NUMBER,
135 min_dunning_invoice_amount NUMBER,
136 max_interest_charge NUMBER,
137 min_statement_amount NUMBER,
138 auto_rec_min_receipt_amount NUMBER,
139 interest_rate NUMBER,
140 attribute_category VARCHAR2(30),
141 attribute1 VARCHAR2(150),
142 attribute2 VARCHAR2(150),
143 attribute3 VARCHAR2(150),
144 attribute4 VARCHAR2(150),
145 attribute5 VARCHAR2(150),
146 attribute6 VARCHAR2(150),
147 attribute7 VARCHAR2(150),
148 attribute8 VARCHAR2(150),
149 attribute9 VARCHAR2(150),
150 attribute10 VARCHAR2(150),
151 attribute11 VARCHAR2(150),
152 attribute12 VARCHAR2(150),
153 attribute13 VARCHAR2(150),
154 attribute14 VARCHAR2(150),
155 attribute15 VARCHAR2(150),
156 min_fc_balance_amount NUMBER,
157 min_fc_invoice_amount NUMBER,
158 cust_account_id NUMBER,
159 site_use_id NUMBER,
160 expiration_date DATE,
161 jgzz_attribute_category VARCHAR2(30),
162 jgzz_attribute1 VARCHAR2(150),
163 jgzz_attribute2 VARCHAR2(150),
164 jgzz_attribute3 VARCHAR2(150),
165 jgzz_attribute4 VARCHAR2(150),
166 jgzz_attribute5 VARCHAR2(150),
167 jgzz_attribute6 VARCHAR2(150),
168 jgzz_attribute7 VARCHAR2(150),
169 jgzz_attribute8 VARCHAR2(150),
170 jgzz_attribute9 VARCHAR2(150),
171 jgzz_attribute10 VARCHAR2(150),
172 jgzz_attribute11 VARCHAR2(150),
173 jgzz_attribute12 VARCHAR2(150),
174 jgzz_attribute13 VARCHAR2(150),
175 jgzz_attribute14 VARCHAR2(150),
176 jgzz_attribute15 VARCHAR2(150),
177 global_attribute1 VARCHAR2(150),
178 global_attribute2 VARCHAR2(150),
179 global_attribute3 VARCHAR2(150),
180 global_attribute4 VARCHAR2(150),
181 global_attribute5 VARCHAR2(150),
182 global_attribute6 VARCHAR2(150),
183 global_attribute7 VARCHAR2(150),
184 global_attribute8 VARCHAR2(150),
185 global_attribute9 VARCHAR2(150),
186 global_attribute10 VARCHAR2(150),
187 global_attribute11 VARCHAR2(150),
188 global_attribute12 VARCHAR2(150),
189 global_attribute13 VARCHAR2(150),
190 global_attribute14 VARCHAR2(150),
191 global_attribute15 VARCHAR2(150),
192 global_attribute16 VARCHAR2(150),
193 global_attribute17 VARCHAR2(150),
194 global_attribute18 VARCHAR2(150),
195 global_attribute19 VARCHAR2(150),
196 global_attribute20 VARCHAR2(150),
197 global_attribute_category VARCHAR2(30),
198 created_by_module VARCHAR2(150),
199 application_id NUMBER,
200 exchange_rate_type VARCHAR2(30),
201 min_fc_invoice_overdue_type VARCHAR2(30),
202 min_fc_invoice_percent NUMBER,
203 min_fc_balance_overdue_type VARCHAR2(30),
204 min_fc_balance_percent NUMBER,
205 interest_type VARCHAR2(30),
206 interest_fixed_amount NUMBER,
207 interest_schedule_id NUMBER,
208 penalty_type VARCHAR2(30),
209 penalty_rate NUMBER,
210 min_interest_charge NUMBER,
211 penalty_fixed_amount NUMBER,
212 penalty_schedule_id NUMBER
213 );
214
215 --------------------------------------
216 -- declaration of public procedures and functions
217 --------------------------------------
218 /**
219 * Function next_review_date_compute
220 *
221 * Description
222 * Return the next_review_date
223 *
224 * MODIFICATION HISTORY
225 * 04-19-2002 Herve Yu o Created
226 *
227 * Parameters : Review_Cycle
228 * Last_review_date
229 * Next_Review_Date
230 */
231 FUNCTION next_review_date_compute
232 ( p_review_cycle IN VARCHAR2 DEFAULT NULL,
233 p_last_review_date IN DATE DEFAULT NULL,
234 p_next_review_date IN DATE DEFAULT NULL)
235 RETURN DATE;
236
237
238 /**
239 * Function last_review_date_default
240 *
241 * Description
242 * Return the last_review_date
243 *
244 * MODIFICATION HISTORY
245 * 04-19-2002 Herve Yu o Created
246 *
247 * In parameter : Review_Cycle
248 * Last_review_Date
249 * p_create_update_flag
250 */
251 FUNCTION last_review_date_default
252 ( p_review_cycle IN VARCHAR2 DEFAULT NULL,
253 p_last_review_date IN DATE DEFAULT NULL,
254 p_create_update_flag IN VARCHAR2)
255 RETURN DATE;
256
257
258 /**
259 * PROCEDURE create_customer_profile
260 *
261 * DESCRIPTION
262 * Creates customer profile.
263 *
264 * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
265 *
266 * ARGUMENTS
267 * IN:
268 * p_init_msg_list Initialize message stack if it is set to
269 * FND_API.G_TRUE. Default is FND_API.G_FALSE.
270 * p_customer_profile_rec Customer profile record. One customer account
271 * must have a customer profile. One account site
272 * use can optionally have one customer profile.
273 * p_create_profile_amt If it is set to FND_API.G_TRUE, API create customer
274 * profile amounts by copying corresponding data
278 * x_cust_account_profile_id Customer account profile ID.
275 * from customer profile class amounts.
276 * IN/OUT:
277 * OUT:
279 * x_return_status Return status after the call. The status can
280 * be FND_API.G_RET_STS_SUCCESS (success),
281 * FND_API.G_RET_STS_ERROR (error),
282 * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
283 * x_msg_count Number of messages in message stack.
284 * x_msg_data Message text if x_msg_count is 1.
285 *
286 * NOTES
287 *
288 * MODIFICATION HISTORY
289 *
290 * 07-23-2001 Jianying Huang o Created.
291 *
292 */
293
294 /*#
295 * Use this routine to create a customer profile. This API creates records
296 * in the HZ_CUSTOMER_PROFILES table. With this API you can create customer profiles at the
297 * party, customer, or customer site levels. This API also creates profile amounts,
298 * based on the value passed for p_create_profile_amt.
299 * @rep:scope public
300 * @rep:lifecycle active
301 * @rep:displayname Create Customer Profile
302 * @rep:businessevent oracle.apps.ar.hz.CustomerProfile.create
303 * @rep:doccd 120hztig.pdf Customer Profile APIs, Oracle Trading Community Architecture Technical Implementation Guide
304 */
305 PROCEDURE create_customer_profile (
306 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
307 p_customer_profile_rec IN CUSTOMER_PROFILE_REC_TYPE,
308 p_create_profile_amt IN VARCHAR2 := FND_API.G_TRUE,
309 x_cust_account_profile_id OUT NOCOPY NUMBER,
310 x_return_status OUT NOCOPY VARCHAR2,
311 x_msg_count OUT NOCOPY NUMBER,
312 x_msg_data OUT NOCOPY VARCHAR2
313 );
314
315 /**
316 * PROCEDURE update_customer_profile
317 *
318 * DESCRIPTION
319 * Updates customer profile.
320 *
321 * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
322 *
323 * ARGUMENTS
324 * IN:
325 * p_init_msg_list Initialize message stack if it is set to
326 * FND_API.G_TRUE. Default is FND_API.G_FALSE.
327 * p_customer_profile_rec Customer profile record. One customer account
328 * must have a customer profile. One account site
329 * use can optionally have one customer profile.
330 * IN/OUT:
331 * p_object_version_number Used for locking the being updated record.
332 * OUT:
333 * x_return_status Return status after the call. The status can
334 * be FND_API.G_RET_STS_SUCCESS (success),
335 * FND_API.G_RET_STS_ERROR (error),
336 * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
337 * x_msg_count Number of messages in message stack.
338 * x_msg_data Message text if x_msg_count is 1.
339 *
340 * NOTES
341 *
342 * MODIFICATION HISTORY
343 *
344 * 07-23-2001 Jianying Huang o Created.
345 *
346 */
347
348 /*#
349 * Use this routine to update a customer profile. This API updates records
350 * in the HZ_CUSTOMER_PROFILES table. The profile can exist at the party, customer, or
351 * customer site levels.
352 * @rep:scope public
353 * @rep:lifecycle active
354 * @rep:displayname Update Customer Profile
355 * @rep:businessevent oracle.apps.ar.hz.CustomerProfile.update
356 * @rep:doccd 120hztig.pdf Customer Profile APIs, Oracle Trading Community Architecture Technical Implementation Guide
357 */
358 PROCEDURE update_customer_profile (
359 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
360 p_customer_profile_rec IN CUSTOMER_PROFILE_REC_TYPE,
361 p_object_version_number IN OUT NOCOPY NUMBER,
362 x_return_status OUT NOCOPY VARCHAR2,
363 x_msg_count OUT NOCOPY NUMBER,
364 x_msg_data OUT NOCOPY VARCHAR2
365 );
366
367 /**
368 * PROCEDURE get_customer_profile_rec
369 *
370 * DESCRIPTION
371 * Gets customer profile record
372 *
373 * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
374 *
375 * ARGUMENTS
376 * IN:
377 * p_init_msg_list Initialize message stack if it is set to
378 * FND_API.G_TRUE. Default is FND_API.G_FALSE.
379 * p_cust_account_profile_id Customer account profile id.
380 * IN/OUT:
381 * OUT:
382 * x_customer_profile_rec Returned customer profile record.
383 * x_return_status Return status after the call. The status can
384 * be FND_API.G_RET_STS_SUCCESS (success),
385 * FND_API.G_RET_STS_ERROR (error),
386 * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
387 * x_msg_count Number of messages in message stack.
388 * x_msg_data Message text if x_msg_count is 1.
389 *
390 * NOTES
391 *
392 * MODIFICATION HISTORY
393 *
397
394 * 07-23-2001 Jianying Huang o Created.
395 *
396 */
398 PROCEDURE get_customer_profile_rec (
399 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
400 p_cust_account_profile_id IN NUMBER,
401 x_customer_profile_rec OUT NOCOPY CUSTOMER_PROFILE_REC_TYPE,
402 x_return_status OUT NOCOPY VARCHAR2,
403 x_msg_count OUT NOCOPY NUMBER,
404 x_msg_data OUT NOCOPY VARCHAR2
405 );
406
407 /**
408 * PROCEDURE create_cust_profile_amt
409 *
410 * DESCRIPTION
411 * Creates customer profile amounts.
412 *
413 * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
414 *
415 * ARGUMENTS
416 * IN:
417 * p_init_msg_list Initialize message stack if it is set to
418 * FND_API.G_TRUE. Default is FND_API.G_FALSE.
419 * p_check_foreign_key If do foreign key checking on cust_account_id
420 * and cust_account_profile_id or not. Defaut value
421 * is FND_API.G_TRUE, which means API will do foreign
422 * key checking on these 2 columns.
423 * p_cust_profile_amt_rec Customer profile amount record.
424 * IN/OUT:
425 * OUT:
426 * x_cust_acct_profile_amt_id Customer account profile amount ID.
427 * x_return_status Return status after the call. The status can
428 * be FND_API.G_RET_STS_SUCCESS (success),
429 * FND_API.G_RET_STS_ERROR (error),
430 * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
431 * x_msg_count Number of messages in message stack.
432 * x_msg_data Message text if x_msg_count is 1.
433 *
434 * NOTES
435 *
436 * MODIFICATION HISTORY
437 *
438 * 07-23-2001 Jianying Huang o Created.
439 *
440 */
441
442 /*#
443 * Use this routine to create a customer profile amount. You can use this API to create
444 * records in the HZ_CUST_PROFILE_AMTS table for a profile. Before you can create a profile
445 * amount record, you must create a customer profile.
446 * @rep:scope public
447 * @rep:lifecycle active
448 * @rep:displayname Create Customer Profile Amount
449 * @rep:businessevent oracle.apps.ar.hz.CustProfileAmt.create
450 * @rep:doccd 120hztig.pdf Customer Profile APIs, Oracle Trading Community Architecture Technical Implementation Guide
451 */
452 PROCEDURE create_cust_profile_amt (
453 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
454 p_check_foreign_key IN VARCHAR2 := FND_API.G_TRUE,
455 p_cust_profile_amt_rec IN CUST_PROFILE_AMT_REC_TYPE,
456 x_cust_acct_profile_amt_id OUT NOCOPY NUMBER,
457 x_return_status OUT NOCOPY VARCHAR2,
458 x_msg_count OUT NOCOPY NUMBER,
459 x_msg_data OUT NOCOPY VARCHAR2
460 );
461
462 /**
463 * PROCEDURE update_cust_profile_amt
464 *
465 * DESCRIPTION
466 * Updates customer profile amounts.
467 *
468 * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
469 *
470 * ARGUMENTS
471 * IN:
472 * p_init_msg_list Initialize message stack if it is set to
473 * FND_API.G_TRUE. Default is FND_API.G_FALSE.
474 * p_cust_profile_amt_rec Customer profile amount record.
475 * IN/OUT:
476 * p_object_version_number Used for locking the being updated record.
477 * OUT:
478 * x_return_status Return status after the call. The status can
479 * be FND_API.G_RET_STS_SUCCESS (success),
480 * FND_API.G_RET_STS_ERROR (error),
481 * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
482 * x_msg_count Number of messages in message stack.
483 * x_msg_data Message text if x_msg_count is 1.
484 *
485 * NOTES
486 *
487 * MODIFICATION HISTORY
488 *
489 * 07-23-2001 Jianying Huang o Created.
490 *
491 */
492
493 /*#
494 * Use this routine to update a customer profile amount. The API updates a
495 * record in the HZ_CUST_PROFILE_AMTS table.
496 * @rep:scope public
497 * @rep:lifecycle active
498 * @rep:displayname Update Customer Profile Amount
499 * @rep:businessevent oracle.apps.ar.hz.CustProfileAmt.update
500 * @rep:doccd 120hztig.pdf Customer Profile APIs, Oracle Trading Community Architecture Technical Implementation Guide
501 */
502 PROCEDURE update_cust_profile_amt (
503 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
504 p_cust_profile_amt_rec IN CUST_PROFILE_AMT_REC_TYPE,
505 p_object_version_number IN OUT NOCOPY NUMBER,
506 x_return_status OUT NOCOPY VARCHAR2,
507 x_msg_count OUT NOCOPY NUMBER,
508 x_msg_data OUT NOCOPY VARCHAR2
509 );
510
511 /**
512 * PROCEDURE get_cust_profile_amt_rec
513 *
514 * DESCRIPTION
515 * Gets customer profile amount record
516 *
517 * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
518 *
519 * ARGUMENTS
520 * IN:
521 * p_init_msg_list Initialize message stack if it is set to
522 * FND_API.G_TRUE. Default is FND_API.G_FALSE.
523 * p_cust_acct_profile_amt_id Customer account profile amount id.
524 * IN/OUT:
525 * OUT:
526 * x_cust_profile_amt_rec Returned customer profile amount record.
527 * x_return_status Return status after the call. The status can
528 * be FND_API.G_RET_STS_SUCCESS (success),
529 * FND_API.G_RET_STS_ERROR (error),
530 * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
531 * x_msg_count Number of messages in message stack.
532 * x_msg_data Message text if x_msg_count is 1.
533 *
534 * NOTES
535 *
536 * MODIFICATION HISTORY
537 *
538 * 07-23-2001 Jianying Huang o Created.
539 *
540 */
541
542 PROCEDURE get_cust_profile_amt_rec (
543 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
544 p_cust_acct_profile_amt_id IN NUMBER,
545 x_cust_profile_amt_rec OUT NOCOPY CUST_PROFILE_AMT_REC_TYPE,
546 x_return_status OUT NOCOPY VARCHAR2,
547 x_msg_count OUT NOCOPY NUMBER,
548 x_msg_data OUT NOCOPY VARCHAR2
549 );
550
551 END HZ_CUSTOMER_PROFILE_V2PUB;