[Home] [Help]
PACKAGE: APPS.HZ_CUSTOMER_PROFILE_V2PUB
Source
1 PACKAGE HZ_CUSTOMER_PROFILE_V2PUB AUTHID CURRENT_USER AS
2 /*$Header: ARH2CFSS.pls 120.10.12010000.2 2009/02/27 12:42:38 rgokavar 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 automatch_set_id NUMBER
127 );
128
129 TYPE cust_profile_amt_rec_type IS RECORD (
130 cust_acct_profile_amt_id NUMBER,
131 cust_account_profile_id NUMBER,
132 currency_code VARCHAR2(15),
133 trx_credit_limit NUMBER,
134 overall_credit_limit NUMBER,
135 min_dunning_amount NUMBER,
136 min_dunning_invoice_amount NUMBER,
137 max_interest_charge NUMBER,
138 min_statement_amount NUMBER,
139 auto_rec_min_receipt_amount NUMBER,
140 interest_rate NUMBER,
141 attribute_category VARCHAR2(30),
142 attribute1 VARCHAR2(150),
143 attribute2 VARCHAR2(150),
144 attribute3 VARCHAR2(150),
145 attribute4 VARCHAR2(150),
146 attribute5 VARCHAR2(150),
147 attribute6 VARCHAR2(150),
148 attribute7 VARCHAR2(150),
149 attribute8 VARCHAR2(150),
150 attribute9 VARCHAR2(150),
151 attribute10 VARCHAR2(150),
152 attribute11 VARCHAR2(150),
153 attribute12 VARCHAR2(150),
154 attribute13 VARCHAR2(150),
155 attribute14 VARCHAR2(150),
156 attribute15 VARCHAR2(150),
157 min_fc_balance_amount NUMBER,
158 min_fc_invoice_amount NUMBER,
159 cust_account_id NUMBER,
160 site_use_id NUMBER,
161 expiration_date DATE,
162 jgzz_attribute_category VARCHAR2(30),
163 jgzz_attribute1 VARCHAR2(150),
164 jgzz_attribute2 VARCHAR2(150),
165 jgzz_attribute3 VARCHAR2(150),
166 jgzz_attribute4 VARCHAR2(150),
167 jgzz_attribute5 VARCHAR2(150),
168 jgzz_attribute6 VARCHAR2(150),
169 jgzz_attribute7 VARCHAR2(150),
170 jgzz_attribute8 VARCHAR2(150),
171 jgzz_attribute9 VARCHAR2(150),
172 jgzz_attribute10 VARCHAR2(150),
173 jgzz_attribute11 VARCHAR2(150),
174 jgzz_attribute12 VARCHAR2(150),
175 jgzz_attribute13 VARCHAR2(150),
176 jgzz_attribute14 VARCHAR2(150),
177 jgzz_attribute15 VARCHAR2(150),
178 global_attribute1 VARCHAR2(150),
179 global_attribute2 VARCHAR2(150),
180 global_attribute3 VARCHAR2(150),
181 global_attribute4 VARCHAR2(150),
182 global_attribute5 VARCHAR2(150),
183 global_attribute6 VARCHAR2(150),
184 global_attribute7 VARCHAR2(150),
185 global_attribute8 VARCHAR2(150),
186 global_attribute9 VARCHAR2(150),
187 global_attribute10 VARCHAR2(150),
188 global_attribute11 VARCHAR2(150),
189 global_attribute12 VARCHAR2(150),
190 global_attribute13 VARCHAR2(150),
191 global_attribute14 VARCHAR2(150),
192 global_attribute15 VARCHAR2(150),
193 global_attribute16 VARCHAR2(150),
194 global_attribute17 VARCHAR2(150),
195 global_attribute18 VARCHAR2(150),
196 global_attribute19 VARCHAR2(150),
197 global_attribute20 VARCHAR2(150),
198 global_attribute_category VARCHAR2(30),
199 created_by_module VARCHAR2(150),
200 application_id NUMBER,
201 exchange_rate_type VARCHAR2(30),
202 min_fc_invoice_overdue_type VARCHAR2(30),
203 min_fc_invoice_percent NUMBER,
204 min_fc_balance_overdue_type VARCHAR2(30),
205 min_fc_balance_percent NUMBER,
206 interest_type VARCHAR2(30),
207 interest_fixed_amount NUMBER,
208 interest_schedule_id NUMBER,
209 penalty_type VARCHAR2(30),
210 penalty_rate NUMBER,
211 min_interest_charge NUMBER,
212 penalty_fixed_amount NUMBER,
213 penalty_schedule_id NUMBER
214 );
215
216 --------------------------------------
217 -- declaration of public procedures and functions
218 --------------------------------------
219 /**
220 * Function next_review_date_compute
221 *
222 * Description
223 * Return the next_review_date
224 *
225 * MODIFICATION HISTORY
226 * 04-19-2002 Herve Yu o Created
227 *
228 * Parameters : Review_Cycle
229 * Last_review_date
230 * Next_Review_Date
231 */
232 FUNCTION next_review_date_compute
233 ( p_review_cycle IN VARCHAR2 DEFAULT NULL,
234 p_last_review_date IN DATE DEFAULT NULL,
235 p_next_review_date IN DATE DEFAULT NULL)
236 RETURN DATE;
237
238
239 /**
240 * Function last_review_date_default
241 *
242 * Description
243 * Return the last_review_date
244 *
245 * MODIFICATION HISTORY
246 * 04-19-2002 Herve Yu o Created
247 *
248 * In parameter : Review_Cycle
249 * Last_review_Date
250 * p_create_update_flag
251 */
252 FUNCTION last_review_date_default
253 ( p_review_cycle IN VARCHAR2 DEFAULT NULL,
254 p_last_review_date IN DATE DEFAULT NULL,
255 p_create_update_flag IN VARCHAR2)
256 RETURN DATE;
257
258
259 /**
260 * PROCEDURE create_customer_profile
261 *
262 * DESCRIPTION
263 * Creates customer profile.
264 *
265 * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
266 *
267 * ARGUMENTS
268 * IN:
269 * p_init_msg_list Initialize message stack if it is set to
270 * FND_API.G_TRUE. Default is FND_API.G_FALSE.
271 * p_customer_profile_rec Customer profile record. One customer account
272 * must have a customer profile. One account site
273 * use can optionally have one customer profile.
274 * p_create_profile_amt If it is set to FND_API.G_TRUE, API create customer
275 * profile amounts by copying corresponding data
276 * from customer profile class amounts.
277 * IN/OUT:
278 * OUT:
279 * x_cust_account_profile_id Customer account profile ID.
280 * x_return_status Return status after the call. The status can
281 * be FND_API.G_RET_STS_SUCCESS (success),
282 * FND_API.G_RET_STS_ERROR (error),
283 * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
284 * x_msg_count Number of messages in message stack.
285 * x_msg_data Message text if x_msg_count is 1.
286 *
287 * NOTES
288 *
289 * MODIFICATION HISTORY
290 *
291 * 07-23-2001 Jianying Huang o Created.
292 *
293 */
294
295 /*#
296 * Use this routine to create a customer profile. This API creates records
297 * in the HZ_CUSTOMER_PROFILES table. With this API you can create customer profiles at the
298 * party, customer, or customer site levels. This API also creates profile amounts,
299 * based on the value passed for p_create_profile_amt.
300 * @rep:scope public
301 * @rep:lifecycle active
302 * @rep:displayname Create Customer Profile
306 PROCEDURE create_customer_profile (
303 * @rep:businessevent oracle.apps.ar.hz.CustomerProfile.create
304 * @rep:doccd 120hztig.pdf Customer Profile APIs, Oracle Trading Community Architecture Technical Implementation Guide
305 */
307 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
308 p_customer_profile_rec IN CUSTOMER_PROFILE_REC_TYPE,
309 p_create_profile_amt IN VARCHAR2 := FND_API.G_TRUE,
310 x_cust_account_profile_id OUT NOCOPY NUMBER,
311 x_return_status OUT NOCOPY VARCHAR2,
312 x_msg_count OUT NOCOPY NUMBER,
313 x_msg_data OUT NOCOPY VARCHAR2
314 );
315
316 /**
317 * PROCEDURE update_customer_profile
318 *
319 * DESCRIPTION
320 * Updates customer profile.
321 *
322 * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
323 *
324 * ARGUMENTS
325 * IN:
326 * p_init_msg_list Initialize message stack if it is set to
327 * FND_API.G_TRUE. Default is FND_API.G_FALSE.
328 * p_customer_profile_rec Customer profile record. One customer account
329 * must have a customer profile. One account site
330 * use can optionally have one customer profile.
331 * IN/OUT:
332 * p_object_version_number Used for locking the being updated record.
333 * OUT:
334 * x_return_status Return status after the call. The status can
335 * be FND_API.G_RET_STS_SUCCESS (success),
336 * FND_API.G_RET_STS_ERROR (error),
337 * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
338 * x_msg_count Number of messages in message stack.
339 * x_msg_data Message text if x_msg_count is 1.
340 *
341 * NOTES
342 *
343 * MODIFICATION HISTORY
344 *
345 * 07-23-2001 Jianying Huang o Created.
346 *
347 */
348
349 /*#
350 * Use this routine to update a customer profile. This API updates records
351 * in the HZ_CUSTOMER_PROFILES table. The profile can exist at the party, customer, or
352 * customer site levels.
353 * @rep:scope public
354 * @rep:lifecycle active
355 * @rep:displayname Update Customer Profile
356 * @rep:businessevent oracle.apps.ar.hz.CustomerProfile.update
357 * @rep:doccd 120hztig.pdf Customer Profile APIs, Oracle Trading Community Architecture Technical Implementation Guide
358 */
359 PROCEDURE update_customer_profile (
360 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
361 p_customer_profile_rec IN CUSTOMER_PROFILE_REC_TYPE,
362 p_object_version_number IN OUT NOCOPY NUMBER,
363 x_return_status OUT NOCOPY VARCHAR2,
364 x_msg_count OUT NOCOPY NUMBER,
365 x_msg_data OUT NOCOPY VARCHAR2
366 );
367
368 /**
369 * PROCEDURE get_customer_profile_rec
370 *
371 * DESCRIPTION
372 * Gets customer profile record
373 *
374 * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
375 *
376 * ARGUMENTS
377 * IN:
378 * p_init_msg_list Initialize message stack if it is set to
379 * FND_API.G_TRUE. Default is FND_API.G_FALSE.
380 * p_cust_account_profile_id Customer account profile id.
381 * IN/OUT:
382 * OUT:
383 * x_customer_profile_rec Returned customer profile record.
384 * x_return_status Return status after the call. The status can
385 * be FND_API.G_RET_STS_SUCCESS (success),
386 * FND_API.G_RET_STS_ERROR (error),
387 * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
388 * x_msg_count Number of messages in message stack.
389 * x_msg_data Message text if x_msg_count is 1.
390 *
391 * NOTES
392 *
393 * MODIFICATION HISTORY
394 *
395 * 07-23-2001 Jianying Huang o Created.
396 *
397 */
398
399 PROCEDURE get_customer_profile_rec (
400 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
401 p_cust_account_profile_id IN NUMBER,
402 x_customer_profile_rec OUT NOCOPY CUSTOMER_PROFILE_REC_TYPE,
403 x_return_status OUT NOCOPY VARCHAR2,
404 x_msg_count OUT NOCOPY NUMBER,
405 x_msg_data OUT NOCOPY VARCHAR2
406 );
407
408 /**
409 * PROCEDURE create_cust_profile_amt
410 *
411 * DESCRIPTION
412 * Creates customer profile amounts.
413 *
414 * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
415 *
416 * ARGUMENTS
417 * IN:
418 * p_init_msg_list Initialize message stack if it is set to
419 * FND_API.G_TRUE. Default is FND_API.G_FALSE.
420 * p_check_foreign_key If do foreign key checking on cust_account_id
421 * and cust_account_profile_id or not. Defaut value
422 * is FND_API.G_TRUE, which means API will do foreign
423 * key checking on these 2 columns.
427 * x_cust_acct_profile_amt_id Customer account profile amount ID.
424 * p_cust_profile_amt_rec Customer profile amount record.
425 * IN/OUT:
426 * OUT:
428 * x_return_status Return status after the call. The status can
429 * be FND_API.G_RET_STS_SUCCESS (success),
430 * FND_API.G_RET_STS_ERROR (error),
431 * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
432 * x_msg_count Number of messages in message stack.
433 * x_msg_data Message text if x_msg_count is 1.
434 *
435 * NOTES
436 *
437 * MODIFICATION HISTORY
438 *
439 * 07-23-2001 Jianying Huang o Created.
440 *
441 */
442
443 /*#
444 * Use this routine to create a customer profile amount. You can use this API to create
445 * records in the HZ_CUST_PROFILE_AMTS table for a profile. Before you can create a profile
446 * amount record, you must create a customer profile.
447 * @rep:scope public
448 * @rep:lifecycle active
449 * @rep:displayname Create Customer Profile Amount
450 * @rep:businessevent oracle.apps.ar.hz.CustProfileAmt.create
451 * @rep:doccd 120hztig.pdf Customer Profile APIs, Oracle Trading Community Architecture Technical Implementation Guide
452 */
453 PROCEDURE create_cust_profile_amt (
454 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
455 p_check_foreign_key IN VARCHAR2 := FND_API.G_TRUE,
456 p_cust_profile_amt_rec IN CUST_PROFILE_AMT_REC_TYPE,
457 x_cust_acct_profile_amt_id OUT NOCOPY NUMBER,
458 x_return_status OUT NOCOPY VARCHAR2,
459 x_msg_count OUT NOCOPY NUMBER,
460 x_msg_data OUT NOCOPY VARCHAR2
461 );
462
463 /**
464 * PROCEDURE update_cust_profile_amt
465 *
466 * DESCRIPTION
467 * Updates customer profile amounts.
468 *
469 * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
470 *
471 * ARGUMENTS
472 * IN:
473 * p_init_msg_list Initialize message stack if it is set to
474 * FND_API.G_TRUE. Default is FND_API.G_FALSE.
475 * p_cust_profile_amt_rec Customer profile amount record.
476 * IN/OUT:
477 * p_object_version_number Used for locking the being updated record.
478 * OUT:
479 * x_return_status Return status after the call. The status can
480 * be FND_API.G_RET_STS_SUCCESS (success),
481 * FND_API.G_RET_STS_ERROR (error),
482 * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
483 * x_msg_count Number of messages in message stack.
484 * x_msg_data Message text if x_msg_count is 1.
485 *
486 * NOTES
487 *
488 * MODIFICATION HISTORY
489 *
490 * 07-23-2001 Jianying Huang o Created.
491 *
492 */
493
494 /*#
495 * Use this routine to update a customer profile amount. The API updates a
496 * record in the HZ_CUST_PROFILE_AMTS table.
497 * @rep:scope public
498 * @rep:lifecycle active
499 * @rep:displayname Update Customer Profile Amount
500 * @rep:businessevent oracle.apps.ar.hz.CustProfileAmt.update
501 * @rep:doccd 120hztig.pdf Customer Profile APIs, Oracle Trading Community Architecture Technical Implementation Guide
502 */
503 PROCEDURE update_cust_profile_amt (
504 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
505 p_cust_profile_amt_rec IN CUST_PROFILE_AMT_REC_TYPE,
506 p_object_version_number IN OUT NOCOPY NUMBER,
507 x_return_status OUT NOCOPY VARCHAR2,
508 x_msg_count OUT NOCOPY NUMBER,
509 x_msg_data OUT NOCOPY VARCHAR2
510 );
511
512 /**
513 * PROCEDURE get_cust_profile_amt_rec
514 *
515 * DESCRIPTION
516 * Gets customer profile amount record
517 *
518 * EXTERNAL PROCEDURES/FUNCTIONS ACCESSED
519 *
520 * ARGUMENTS
521 * IN:
522 * p_init_msg_list Initialize message stack if it is set to
523 * FND_API.G_TRUE. Default is FND_API.G_FALSE.
524 * p_cust_acct_profile_amt_id Customer account profile amount id.
525 * IN/OUT:
526 * OUT:
527 * x_cust_profile_amt_rec Returned customer profile amount record.
528 * x_return_status Return status after the call. The status can
529 * be FND_API.G_RET_STS_SUCCESS (success),
530 * FND_API.G_RET_STS_ERROR (error),
531 * FND_API.G_RET_STS_UNEXP_ERROR (unexpected error).
532 * x_msg_count Number of messages in message stack.
533 * x_msg_data Message text if x_msg_count is 1.
534 *
535 * NOTES
536 *
537 * MODIFICATION HISTORY
538 *
539 * 07-23-2001 Jianying Huang o Created.
540 *
541 */
542
543 PROCEDURE get_cust_profile_amt_rec (
544 p_init_msg_list IN VARCHAR2 := FND_API.G_FALSE,
545 p_cust_acct_profile_amt_id IN NUMBER,
546 x_cust_profile_amt_rec OUT NOCOPY CUST_PROFILE_AMT_REC_TYPE,
547 x_return_status OUT NOCOPY VARCHAR2,
548 x_msg_count OUT NOCOPY NUMBER,
549 x_msg_data OUT NOCOPY VARCHAR2
550 );
551
552 END HZ_CUSTOMER_PROFILE_V2PUB;