DBA Data[Home] [Help]

PACKAGE: APPS.AMS_CAMPAIGN_PUB

Source


1 PACKAGE AMS_Campaign_PUB AUTHID CURRENT_USER AS
2 /* $Header: amspcpns.pls 120.0 2005/05/31 16:09:59 appldev noship $ */
3 /*#
4  * This package provides methods to create or update a marketing campaign.
5  *
6  * Note: The campaign record type is used as an input parameter in campaign
7  * creation and update methods.
8  *
9  *   TYPE camp_rec_type IS RECORD(
10  *       campaign_id                      NUMBER,
11  *       last_update_date                 DATE,
12  *       last_updated_by                  NUMBER,
13  *       creation_date                    DATE,
14  *       created_by                       NUMBER,
15  *       last_update_login                NUMBER,
16  *       object_version_number            NUMBER,
17  *       custom_setup_id                  NUMBER,
18  *       owner_user_id                    NUMBER,
19  *       user_status_id                   NUMBER,
20  *       status_code                      VARCHAR2(30),
21  *       status_date                      DATE,
22  *       active_flag                      VARCHAR2(1),
23  *       private_flag                     VARCHAR2(1),
24  *       partner_flag                     VARCHAR2(1),
25  *       template_flag                    VARCHAR2(1),
26  *       cascade_source_code_flag         VARCHAR2(1),
27  *       inherit_attributes_flag          VARCHAR2(1),
28  *       source_code                      VARCHAR2(30),
29  *       rollup_type                      VARCHAR2(30),
30  *       campaign_type                    VARCHAR2(30),
31  *       media_type_code                  VARCHAR2(30),
32  *       priority                         VARCHAR2(30),
33  *       fund_source_type                 VARCHAR2(30),
34  *       fund_source_id                   NUMBER,
35  *       parent_campaign_id               NUMBER,
36  *       application_id                   NUMBER,
37  *       qp_list_header_id                NUMBER,
38  *       media_id                         NUMBER,
39  *       channel_id                       NUMBER,
40  *       event_type                       VARCHAR2(30),
41  *       arc_channel_from                 VARCHAR2(30),
42  *       dscript_name                     VARCHAR2(256),
43  *       transaction_currency_code        VARCHAR2(15),
44  *       functional_currency_code         VARCHAR2(15),
45  *       budget_amount_tc                 NUMBER,
46  *       budget_amount_fc                 NUMBER,
47  *       forecasted_plan_start_date       DATE,
48  *       forecasted_plan_end_date         DATE,
49  *       forecasted_exec_start_date       DATE,
50  *       forecasted_exec_end_date         DATE,
51  *       actual_plan_start_date           DATE,
52  *       actual_plan_end_date             DATE,
53  *       actual_exec_start_date           DATE,
54  *       actual_exec_end_date             DATE,
55  *       inbound_url                      VARCHAR2(120),
56  *       inbound_email_id                 VARCHAR2(120),
57  *       inbound_phone_no                 VARCHAR2(25),
58  *       duration                         NUMBER,
59  *       duration_uom_code                VARCHAR2(3),
60  *       ff_priority                      VARCHAR2(30),
61  *       ff_override_cover_letter         NUMBER,
62  *       ff_shipping_method               VARCHAR2(30),
63  *       ff_carrier                       VARCHAR2(120),
64  *       content_source                   VARCHAR2(120),
65  *       cc_call_strategy                 VARCHAR2(30),
66  *       cc_manager_user_id               NUMBER,
67  *       forecasted_revenue               NUMBER,
68  *       actual_revenue                   NUMBER,
69  *       forecasted_cost                  NUMBER,
70  *       actual_cost                      NUMBER,
71  *       forecasted_response              NUMBER,
72  *       actual_response                  NUMBER,
73  *       target_response                  NUMBER,
74  *       country_code                     VARCHAR2(30),
75  *       language_code                    VARCHAR2(30),
76  *       attribute_category               VARCHAR2(30),
77  *       attribute1                       VARCHAR2(150),
78  *       attribute2                       VARCHAR2(150),
79  *       attribute3                       VARCHAR2(150),
80  *       attribute4                       VARCHAR2(150),
81  *       attribute5                       VARCHAR2(150),
82  *       attribute6                       VARCHAR2(150),
83  *       attribute7                       VARCHAR2(150),
84  *       attribute8                       VARCHAR2(150),
85  *       attribute9                       VARCHAR2(150),
86  *       attribute10                      VARCHAR2(150),
87  *       attribute11                      VARCHAR2(150),
88  *       attribute12                      VARCHAR2(150),
89  *       attribute13                      VARCHAR2(150),
90  *       attribute14                      VARCHAR2(150),
91  *       attribute15                      VARCHAR2(150),
92  *       campaign_name                    VARCHAR2(240),
93  *       campaign_theme                   VARCHAR2(4000),
94  *       description                      VARCHAR2(4000),
95  *       version_no                       NUMBER,
96  *       campaign_calendar                VARCHAR2(15),
97  *       start_period_name                VARCHAR2(15),
98  *       end_period_name                  VARCHAR2(15),
99  *       city_id                          NUMBER,
100  *       global_flag                      VARCHAR2(1),
101  *       show_campaign_flag               VARCHAR2(1),
102  *       business_unit_id                 NUMBER,
103  *       accounts_closed_flag             VARCHAR2(1),
104  *       task_id                          NUMBER,
105  *       related_event_from               VARCHAR2(30),
106  *       related_event_id                 NUMBER,
107  *       program_attribute_category       VARCHAR2(30),
108  *       program_attribute1               VARCHAR2(150),
109  *       program_attribute2               VARCHAR2(150),
110  *       program_attribute3               VARCHAR2(150),
111  *       program_attribute4               VARCHAR2(150),
112  *       program_attribute5               VARCHAR2(150),
113  *       program_attribute6               VARCHAR2(150),
114  *       program_attribute7               VARCHAR2(150),
115  *       program_attribute8               VARCHAR2(150),
116  *       program_attribute9               VARCHAR2(150),
117  *       program_attribute10              VARCHAR2(150),
118  *       program_attribute11              VARCHAR2(150),
119  *       program_attribute12              VARCHAR2(150),
120  *       program_attribute13              VARCHAR2(150),
121  *       program_attribute14              VARCHAR2(150),
122  *       program_attribute15              VARCHAR2(150)
123  *    )
124  *
125  * @rep:scope public
126  * @rep:product AMS
127  * @rep:lifecycle active
128  * @rep:displayname Oracle Marketing Campaigns Public API
129  * @rep:compatibility S
130  * @rep:category BUSINESS_ENTITY AMS_CAMPAIGN
131  */
132 
133 
134 ---------------------------------------------------------------------
135 -- PROCEDURE
136 --    create_campaign
137 --
138 -- PURPOSE
139 --    Create a new campaign.
140 --
141 -- PARAMETERS
142 --    p_camp_rec: the new record to be inserted
143 --    x_camp_id: return the campaign_id of the new campaign
144 --
145 -- NOTES
146 --    1. object_version_number will be set to 1.
147 --    2. If campaign_id is passed in, the uniqueness will be checked.
148 --       Raise exception in case of duplicates.
149 --    3. If campaign_id is not passed in, generate a unique one from
150 --       the sequence.
151 --    4. If a flag column is passed in, check if it is 'Y' or 'N'.
152 --       Raise exception for invalid flag.
153 --    5. If a flag column is not passed in, default it to 'Y' or 'N'.
154 --    6. Please don't pass in any FND_API.g_mess_char/num/date.
155 ---------------------------------------------------------------------
156 
157 /*#
158  * This procedure creates a marketing campaign. The details of the campaign will be passed
159  * in the p_camp_rec record type. Check the x_return_status output to see if creation
160  * was successful. If successful, a unique identifier for the campaign object will
161  * be passed back in x_camp_id output parameter.
162  *
163  * @param p_api_version This must match the version number of the API. An unexepcted error is returned if the calling program version number is incompatible with the current API version number.
164  * @param p_init_msg_list Flag to indicate if the message stack should be initialized.
165  * @param p_commit Flag to indicate if changes should be comitted on success.
166  * @param p_validation_level Level of validation required. None: No validation will be performed. Full:  Item and record level validation will be performed.
167  * @param p_camp_rec Record of type AMS_Campaign_PVT.camp_rec_type that takes in the details for the Campaign.
168  * @param x_return_status Indicates the return status of the API. The values are one of the following:
169  * FND_API.G_RET_STS_SUCCESS: Indicates the API call was successful;
170  * FND_API.G_RET_STS_ERROR: Indicates there was a validation error or a missing data error;
171  * FND_API.G_RET_STS_UNEXP_ERROR: Indicates the calling program encountered an unxpected or unhandled error.
172  * @param x_msg_count Count of error messages in the message list.
173  * @param x_msg_data Error messages returned by the API. If more than one message is returned, this parameter is null and messages must be extracted from the message stack.
174  * @param x_camp_id Unique identifier for the newly created Campaign
175  * @rep:scope public
176  * @rep:lifecycle active
177  * @rep:displayname Create Marketing Campaign
178  */
179 
180 PROCEDURE create_campaign(
181    p_api_version       IN  NUMBER,
182    p_init_msg_list     IN  VARCHAR2  := FND_API.g_false,
183    p_commit            IN  VARCHAR2  := FND_API.g_false,
184    p_validation_level  IN  NUMBER    := FND_API.g_valid_level_full,
185 
186    x_return_status     OUT NOCOPY VARCHAR2,
187    x_msg_count         OUT NOCOPY NUMBER,
188    x_msg_data          OUT NOCOPY VARCHAR2,
189 
190    p_camp_rec          IN  AMS_Campaign_PVT.camp_rec_type,
191    x_camp_id           OUT NOCOPY NUMBER
192 );
193 
194 
195 --------------------------------------------------------------------
196 -- PROCEDURE
197 --    delete_campaign
198 --
199 -- PURPOSE
200 --    Delete a campaign.
201 --
202 -- PARAMETERS
203 --    p_camp_id: the campaign_id
204 --    p_object_version: the object_version_number
205 --
206 -- NOTES
207 --    1. Raise exception if the object_version_number doesn't match.
208 --    2. Will set the campaign to be inactive, instead of remove it
209 --       from database.
210 --------------------------------------------------------------------
211 PROCEDURE delete_campaign(
212    p_api_version       IN  NUMBER,
213    p_init_msg_list     IN  VARCHAR2 := FND_API.g_false,
214    p_commit            IN  VARCHAR2 := FND_API.g_false,
215 
216    x_return_status     OUT NOCOPY VARCHAR2,
217    x_msg_count         OUT NOCOPY NUMBER,
218    x_msg_data          OUT NOCOPY VARCHAR2,
219 
220    p_camp_id           IN  NUMBER,
221    p_object_version    IN  NUMBER
222 );
223 
224 
225 -------------------------------------------------------------------
226 -- PROCEDURE
227 --    lock_campaign
228 --
229 -- PURPOSE
230 --    Lock a campaign.
231 --
232 -- PARAMETERS
233 --    p_camp_id: the campaign_id
234 --    p_object_version: the object_version_number
235 --
236 -- NOTES
237 --    1. Raise exception if the object_version_number doesn't match.
238 --------------------------------------------------------------------
239 PROCEDURE lock_campaign(
240    p_api_version       IN  NUMBER,
241    p_init_msg_list     IN  VARCHAR2 := FND_API.g_false,
242 
243    x_return_status     OUT NOCOPY VARCHAR2,
244    x_msg_count         OUT NOCOPY NUMBER,
245    x_msg_data          OUT NOCOPY VARCHAR2,
246 
247    p_camp_id           IN  NUMBER,
248    p_object_version    IN  NUMBER
249 );
250 
251 
252 ---------------------------------------------------------------------
253 -- PROCEDURE
254 --    update_campaign
255 --
256 -- PURPOSE
257 --    Update a campaign.
258 --
259 -- PARAMETERS
260 --    p_camp_rec: the record with new items
261 --
262 -- NOTES
263 --    1. Raise exception if the object_version_number doesn't match.
264 --    2. If an attribute is passed in as FND_API.g_miss_char/num/date,
265 --       that column won't be updated.
266 ----------------------------------------------------------------------
267 
268 /*#
269  * This procedure updates a marketing campaign. The details of the campaign will be passed
270  * in the p_camp_rec record type. Check the x_return_status output to see if the update
271  * was successful.
272  *
273  * @param p_api_version This must match the version number of the API. An unexepcted error is returned if the calling program version number is incompatible with the current API version number.
274  * @param p_init_msg_list Flag to indicate if the message stack should be initialized.
275  * @param p_commit Flag to indicate if changes should be comitted on success.
276  * @param p_validation_level Level of validation required. None: No validation will be performed. Full:  Item and record level validation will be performed.
277  * @param p_camp_rec Record of type AMS_Campaign_PVT.camp_rec_type that takes in the details for the Campaign.
278  * @param x_return_status Indicates the return status of the API. The values are one of the following:
279  * FND_API.G_RET_STS_SUCCESS: Indicates the API call was successful;
280  * FND_API.G_RET_STS_ERROR: Indicates there was a validation error or a missing data error;
281  * FND_API.G_RET_STS_UNEXP_ERROR: Indicates the calling program encountered an unxpected or unhandled error.
282  * @param x_msg_count Count of error messages in the message list.
283  * @param x_msg_data Error messages returned by the API. If more than one message is returned, this parameter is null and messages must be extracted from the message stack.
284  * @rep:scope public
285  * @rep:lifecycle active
286  * @rep:displayname Update Marketing Campaign
287  */
288 
289 PROCEDURE update_campaign(
290    p_api_version       IN  NUMBER,
291    p_init_msg_list     IN  VARCHAR2  := FND_API.g_false,
292    p_commit            IN  VARCHAR2  := FND_API.g_false,
293    p_validation_level  IN  NUMBER    := FND_API.g_valid_level_full,
294 
295    x_return_status     OUT NOCOPY VARCHAR2,
296    x_msg_count         OUT NOCOPY NUMBER,
297    x_msg_data          OUT NOCOPY VARCHAR2,
298 
299    p_camp_rec          IN  AMS_Campaign_PVT.camp_rec_type
300 );
301 
302 
303 ---------------------------------------------------------------------
304 -- PROCEDURE
305 --    validate_campaign
306 --
307 -- PURPOSE
308 --    Validate a campaign record.
309 --
310 -- PARAMETERS
311 --    p_camp_rec: the campaign record to be validated
312 --
313 -- NOTES
314 --    1. p_camp_rec should be the complete campaign record. There
315 --       should not be any FND_API.g_miss_char/num/date in it.
316 ----------------------------------------------------------------------
317 PROCEDURE validate_campaign(
318    p_api_version       IN  NUMBER,
319    p_init_msg_list     IN  VARCHAR2  := FND_API.g_false,
320    p_validation_level  IN  NUMBER    := FND_API.g_valid_level_full,
321 
322    x_return_status     OUT NOCOPY VARCHAR2,
323    x_msg_count         OUT NOCOPY NUMBER,
324    x_msg_data          OUT NOCOPY VARCHAR2,
325 
326    p_camp_rec          IN  AMS_Campaign_PVT.camp_rec_type
327 );
328 
329 
330 END AMS_Campaign_PUB;