1 PACKAGE pos_spm_wf_pkg1 AUTHID CURRENT_USER AS
2 /* $Header: POSSPM1S.pls 120.10.12010000.6 2009/10/02 00:33:10 yaoli ship $ */
3
4 -- notify buyer admins that an address is created
5 -- in the supplier's address book
6 PROCEDURE notify_addr_created
7 (p_vendor_id IN NUMBER,
8 p_address_request_id IN NUMBER,
9 x_itemtype OUT nocopy VARCHAR2,
10 x_itemkey OUT nocopy VARCHAR2,
11 x_receiver OUT nocopy VARCHAR2
12 );
13
14 -- notify buyer admins that an address is removed
15 -- in the supplier's address book
16 PROCEDURE notify_addr_removed
17 (p_vendor_id IN NUMBER,
18 p_address_request_id IN NUMBER,
19 x_itemtype OUT nocopy VARCHAR2,
20 x_itemkey OUT nocopy VARCHAR2,
21 x_receiver OUT nocopy VARCHAR2
22 );
23
24 -- notify buyer admins that an address is updated in
25 -- the supplier's address book
26 PROCEDURE notify_addr_updated
27 (p_vendor_id IN NUMBER,
28 p_address_request_id IN NUMBER,
29 x_itemtype OUT nocopy VARCHAR2,
30 x_itemkey OUT nocopy VARCHAR2,
31 x_receiver OUT nocopy VARCHAR2
32 );
33
34 -- notify buyer admins that a business classification is created in
35 -- the supplier's list
36 PROCEDURE notify_bus_class_created
37 (p_vendor_id IN NUMBER,
38 p_bus_class_request_id IN NUMBER,
39 x_itemtype OUT nocopy VARCHAR2,
40 x_itemkey OUT nocopy VARCHAR2,
41 x_receiver OUT nocopy VARCHAR2
42 );
43
44 -- notify buyer admins that a business classification is removed from
45 -- the supplier's list
46 PROCEDURE notify_bus_class_removed
47 (p_vendor_id IN NUMBER,
48 p_bus_class_request_id IN NUMBER,
49 x_itemtype OUT nocopy VARCHAR2,
50 x_itemkey OUT nocopy VARCHAR2,
51 x_receiver OUT nocopy VARCHAR2
52 );
53
54 -- notify buyer admins that a business classification is updated in
55 -- the supplier's list
56 PROCEDURE notify_bus_class_updated
57 (p_vendor_id IN NUMBER,
58 p_bus_class_request_id IN NUMBER,
59 x_itemtype OUT nocopy VARCHAR2,
60 x_itemkey OUT nocopy VARCHAR2,
61 x_receiver OUT nocopy VARCHAR2
62 );
63
64 -- notify buyer admins that a contact is created
65 -- in the supplier's contact directory
66 PROCEDURE notify_contact_created
67 (p_vendor_id IN NUMBER,
68 p_contact_request_id IN NUMBER,
69 x_itemtype OUT nocopy VARCHAR2,
70 x_itemkey OUT nocopy VARCHAR2,
71 x_receiver OUT nocopy VARCHAR2
72 );
73
74 -- notify buyer admins that an contact is removed
75 -- in the supplier's contact directory
76 PROCEDURE notify_contact_removed
77 (p_vendor_id IN NUMBER,
78 p_contact_request_id IN NUMBER,
79 x_itemtype OUT nocopy VARCHAR2,
80 x_itemkey OUT nocopy VARCHAR2,
81 x_receiver OUT nocopy VARCHAR2
82 );
83
84 -- notify buyer admins that an contact is updated in
85 -- the supplier's contact directory
86 PROCEDURE notify_contact_updated
87 (p_vendor_id IN NUMBER,
88 p_contact_request_id IN NUMBER,
89 x_itemtype OUT nocopy VARCHAR2,
90 x_itemkey OUT nocopy VARCHAR2,
91 x_receiver OUT nocopy VARCHAR2
92 );
93
94 /* not needed for r12. to remove later
95 PROCEDURE notify_contact_link_created
96 (p_vendor_id IN NUMBER,
97 p_cont_addr_request_id IN NUMBER,
98 x_itemtype OUT nocopy VARCHAR2,
99 x_itemkey OUT nocopy VARCHAR2,
100 x_receiver OUT nocopy VARCHAR2
101 );
102
103 PROCEDURE notify_contact_link_removed
104 (p_vendor_id IN NUMBER,
105 p_cont_addr_request_id IN NUMBER,
106 x_itemtype OUT nocopy VARCHAR2,
107 x_itemkey OUT nocopy VARCHAR2,
108 x_receiver OUT nocopy VARCHAR2
109 );
110 */
111
112 -- notify buyer admins that a product and service is added to the
113 -- supplier's list
114 PROCEDURE notify_product_created
115 (p_vendor_id IN NUMBER,
116 x_itemtype OUT nocopy VARCHAR2,
117 x_itemkey OUT nocopy VARCHAR2,
118 x_receiver OUT nocopy VARCHAR2
119 );
120
121 -- notify buyer admins that a product and service is removed from the
122 -- supplier's list
123 PROCEDURE notify_product_removed
124 (p_vendor_id IN NUMBER,
125 x_itemtype OUT nocopy VARCHAR2,
126 x_itemkey OUT nocopy VARCHAR2,
127 x_receiver OUT nocopy VARCHAR2
128 );
129
130 -- notify a supplier that someone is trying to register
131 -- a supplier with same details as his/her company.
132 --
133 -- Note: This procedure uses PRAGMA AUTONOMOUS_TRANSACTION
134 -- so the notification will be created and sent in
135 -- a separate transaction!
136 --
137 -- p_vendor_id is the id of the vendor that is already in
138 -- the vendor master. A default contact of this vendor
139 -- should get the email
140 PROCEDURE notify_dup_supplier_reg
141 (p_vendor_id IN NUMBER,
142 p_first_name IN VARCHAR2,
143 p_last_name IN VARCHAR2,
144 p_sup_reg_email IN VARCHAR2,
145 x_itemtype OUT nocopy VARCHAR2,
146 x_itemkey OUT nocopy VARCHAR2,
147 x_receiver OUT nocopy VARCHAR2
148 );
149
150 -- notify buyer admins that a supplier has registered
151 PROCEDURE notify_supplier_registered
152 (p_supplier_reg_id IN NUMBER,
153 x_itemtype OUT nocopy VARCHAR2,
154 x_itemkey OUT nocopy VARCHAR2,
155 x_receiver OUT nocopy VARCHAR2
156 );
157
158 -- notify the supplier that his/her supplier registration is
159 -- approved
160 PROCEDURE notify_supplier_approved
161 (p_supplier_reg_id IN NUMBER,
162 p_username IN VARCHAR2,
163 p_password IN VARCHAR2,
164 x_itemtype OUT nocopy VARCHAR2,
165 x_itemkey OUT nocopy VARCHAR2
166 );
167
168 -- notify the supplier that his/her supplier registration is
169 -- rejected
170 PROCEDURE notify_supplier_rejected
171 (p_supplier_reg_id IN NUMBER,
172 x_itemtype OUT nocopy VARCHAR2,
173 x_itemkey OUT nocopy VARCHAR2,
174 x_receiver OUT nocopy VARCHAR2
175 );
176
177 -- This procedure is used by workflow to generate the buyer note with proper heading
178 -- in the notification to supplier when the supplier registration is approved or rejected.
179 -- It should not be used for other purpose.
180 --
181 -- Logic of the procedure: if notes_to_supplier is not null, returns a fnd message
182 -- POS_SUPPREG_BUYER_NOTE_HEADING for heading and the note; otherwise, null.
183 -- (bug 2725468).
184 --
185 PROCEDURE buyer_note
186 (document_id IN VARCHAR2,
187 display_type IN VARCHAR2,
188 document IN OUT nocopy VARCHAR2,
189 document_type IN OUT nocopy VARCHAR2);
190
191 -- This procedure is used by workflow to generate the buyer note with
192 -- proper heading
193 -- in the notification to supplier when the buyer approves a bank account
194 -- It should not be used for other purpose.
195 --
196 PROCEDURE bank_acct_buyer_note
197 (document_id IN VARCHAR2,
198 display_type IN VARCHAR2,
199 document IN OUT nocopy VARCHAR2,
200 document_type IN OUT nocopy VARCHAR2);
201
202 PROCEDURE notify_account_create
203 (p_vendor_id IN NUMBER,
204 p_bank_name IN VARCHAR2,
205 p_bank_account_number IN VARCHAR2,
206 x_itemtype OUT nocopy VARCHAR2,
207 x_itemkey OUT nocopy VARCHAR2);
208
209 PROCEDURE notify_buyer_create_account
210 (p_vendor_id IN NUMBER,
211 p_bank_name IN VARCHAR2,
212 p_bank_account_number IN VARCHAR2,
213 x_itemtype OUT nocopy VARCHAR2,
214 x_itemkey OUT nocopy VARCHAR2);
215
216 PROCEDURE notify_account_update
217 (p_vendor_id IN NUMBER,
218 p_bank_name IN VARCHAR2,
219 p_bank_account_number IN VARCHAR2,
220 p_currency_code IN VARCHAR2,
221 p_bank_account_name IN VARCHAR2,
222 x_itemtype OUT nocopy VARCHAR2,
223 x_itemkey OUT nocopy VARCHAR2);
224
225 PROCEDURE notify_buyer_update_account
226 (p_vendor_id IN NUMBER,
227 p_bank_name IN VARCHAR2,
228 p_bank_account_number IN VARCHAR2,
229 p_currency_code IN VARCHAR2,
230 p_bank_account_name IN VARCHAR2,
231 x_itemtype OUT nocopy VARCHAR2,
232 x_itemkey OUT nocopy VARCHAR2);
233
234 -- wf function activity to setup buyer receiver for account creation
235 PROCEDURE setup_acct_crt_buyer_rcvr
236 (itemtype IN VARCHAR2,
237 itemkey IN VARCHAR2,
238 actid IN NUMBER,
239 funcmode IN VARCHAR2,
240 resultout OUT nocopy VARCHAR2);
241
242 -- wf function activity to setup buyer receivers for supplier account update
243 PROCEDURE setup_acct_upd_buyer_rcvr
244 (itemtype IN VARCHAR2,
245 itemkey IN VARCHAR2,
246 actid IN NUMBER,
247 funcmode IN VARCHAR2,
248 resultout OUT nocopy VARCHAR2);
249
250 -- wf function activity to setup supplier receivers for buyer account update
251 PROCEDURE setup_acct_upd_supp_rcvr
252 (itemtype IN VARCHAR2,
253 itemkey IN VARCHAR2,
254 actid IN NUMBER,
255 funcmode IN VARCHAR2,
256 resultout OUT nocopy VARCHAR2);
257
258 -- wf function activity to setup receiver for account actions
259 PROCEDURE setup_acct_action_receiver
260 (itemtype IN VARCHAR2,
261 itemkey IN VARCHAR2,
262 actid IN NUMBER,
263 funcmode IN VARCHAR2,
264 resultout OUT nocopy VARCHAR2);
265
266 PROCEDURE notify_sup_on_acct_action
267 (p_bank_account_number IN VARCHAR2,
268 p_vendor_id IN NUMBER,
269 p_bank_name IN VARCHAR2,
270 p_request_status IN VARCHAR2,
271 p_note IN VARCHAR2,
272 x_itemtype OUT nocopy VARCHAR2,
273 x_itemkey OUT nocopy VARCHAR2
274 );
275
276 -- wf function activity to setup receiver for account address change or remove
277 PROCEDURE setup_acct_addr_receiver
278 (itemtype IN VARCHAR2,
279 itemkey IN VARCHAR2,
280 actid IN NUMBER,
281 funcmode IN VARCHAR2,
282 resultout OUT nocopy VARCHAR2);
283
284 PROCEDURE notify_acct_addr_created
285 (p_vendor_id IN NUMBER,
286 p_bank_name IN VARCHAR2,
287 p_bank_account_number IN VARCHAR2,
288 p_currency_code IN VARCHAR2,
289 p_bank_account_name IN VARCHAR2,
290 p_party_site_name IN VARCHAR2,
291 x_itemtype OUT nocopy VARCHAR2,
292 x_itemkey OUT nocopy VARCHAR2);
293
294 PROCEDURE notify_acct_addr_changed
295 (p_vendor_id IN NUMBER,
296 p_bank_name IN VARCHAR2,
297 p_bank_account_number IN VARCHAR2,
298 p_currency_code IN VARCHAR2,
299 p_bank_account_name IN VARCHAR2,
300 p_party_site_name IN VARCHAR2,
301 x_itemtype OUT nocopy VARCHAR2,
302 x_itemkey OUT nocopy VARCHAR2);
303
304 PROCEDURE notify_acct_addr_removed
305 (p_vendor_id IN NUMBER,
306 p_bank_name IN VARCHAR2,
307 p_bank_account_number IN VARCHAR2,
308 p_currency_code IN VARCHAR2,
309 p_bank_account_name IN VARCHAR2,
310 p_party_site_name IN VARCHAR2,
311 x_itemtype OUT nocopy VARCHAR2,
312 x_itemkey OUT nocopy VARCHAR2);
313
314 -- Notify supplie user of login info.
315 -- The supplier user here is not the primary contact who submitted the
316 -- registration. The notification for the primary contact should be
317 -- sent using notify_supplier_approved method above.
318 PROCEDURE notify_supplier_user_approved
319 (p_supplier_reg_id IN NUMBER,
320 p_username IN VARCHAR2,
321 p_password IN VARCHAR2,
322 x_itemtype OUT nocopy VARCHAR2,
323 x_itemkey OUT nocopy VARCHAR2
324 );
325
326 -- send email to invite supplier to register
327 PROCEDURE send_supplier_invite_reg_ntf
328 (p_supplier_reg_id IN NUMBER
329 );
330
331 -- Send Notification to Supplier contact on clicking the Notify button
332 PROCEDURE PROS_SUPP_NOTIFICATION
333 (p_supplier_reg_id IN varchar2,
334 p_msg_subject in varchar2,
335 p_msg_body in varchar2
336 );
337
338 -- send email when supplier save request for later
339 PROCEDURE send_supplier_reg_saved_ntf
340 (p_supplier_reg_id IN NUMBER
341 );
342 -- send email to banking approvers once the supplier has been registered.
343 PROCEDURE notify_bank_aprv_supp_aprv
344 (p_vendor_id IN NUMBER,
345 x_itemtype OUT nocopy VARCHAR2,
346 x_itemkey OUT nocopy VARCHAR2,
347 x_receiver OUT nocopy VARCHAR2
348 );
349
350 -- notify the supplier that his/her supplier registration is approved
351 -- when the user (primary contact) already exists in OID and auto-link of username is enabled
352 PROCEDURE notify_supplier_apprv_ssosync
353 (p_supplier_reg_id IN NUMBER,
354 p_username IN VARCHAR2,
355 x_itemtype OUT nocopy VARCHAR2,
356 x_itemkey OUT nocopy VARCHAR2
357 );
358
359 -- send email to non-primary contact of user registration
360 -- when the user already exists in OID and auto-link of username is enabled
361 PROCEDURE notify_user_approved_sso_sync
362 (p_supplier_reg_id IN NUMBER,
363 p_username IN VARCHAR2,
364 x_itemtype OUT nocopy VARCHAR2,
365 x_itemkey OUT nocopy VARCHAR2
366 );
367
368 -- CODE ADDED FOR BUSINESS CLASSIFICATION RE-CERTIFICATION ER
369
370 -- workflow notification to supplier users for re-certification of Business Classifications
371
372 PROCEDURE bc_recert_workflow
373 ( ERRBUF OUT nocopy VARCHAR2,
374 RETCODE OUT nocopy VARCHAR2
375 );
376
377 -- END OF CODE ADDED FOR BUSINESS CLASSIFICATION RE-CERTIFICATION ER
378
379 -- Bug 8325979 - Replacing the message subject and body with FND Message and its tokens
380
381 FUNCTION GET_APPRV_SUPPLIER_SUBJECT(p_enterprise_name IN VARCHAR2) RETURN VARCHAR2;
382
383 PROCEDURE GENERATE_APPRV_SUPPLIER_BODY(p_document_id IN VARCHAR2,
384 display_type IN VARCHAR2,
385 document IN OUT NOCOPY CLOB,
386 document_type IN OUT NOCOPY VARCHAR2);
387 -- Bug 8325979 END
388
389
390 --
391 -- Begin Supplier Hub: OSN Integration
392 --
393 -- In this project, we have added a new token OSN_MESSAGE to the
394 -- FND message text. This needs to be substituted with a message
395 -- that invites the supplier to sign up at Oracle Supplier Network.
396 -- Look into profile POS_SM_OSN_REG_MESSAGE to find a FND message name.
397 -- Then get the message text and put it into the OSN_MESSAGE token.
398 -- This utility function returns the OSN message or '' if
399 -- not found. This is a generic function that can be used by
400 -- the General Notification flow, hence defining it in Spec.
401 -- Tue Sep 1 20:45:01 PDT 2009 bso R12.1.2
402 --
403
404 FUNCTION get_osn_message RETURN VARCHAR2;
405
406 --
407 -- End Supplier Hub: OSN Integration
408 --
409
410
411 END pos_spm_wf_pkg1;
412