Fix some a couple of places where form variables were passed, remove a couple more...
[civicrm-core.git] / xml / schema / Mailing / Mailing.xml
1 <?xml version="1.0" encoding="iso-8859-1" ?>
2
3 <table>
4 <base>CRM/Mailing</base>
5 <class>Mailing</class>
6 <name>civicrm_mailing</name>
7 <comment>Stores information about a mailing.</comment>
8 <description>Mass emails sent from CiviMail.</description>
9 <archive>true</archive>
10 <icon>fa-envelope-o</icon>
11 <component>CiviMail</component>
12 <paths>
13 <add>civicrm/a/#/mailing/new</add>
14 <update>civicrm/a/#/mailing/[id]</update>
15 </paths>
16 <field>
17 <name>id</name>
18 <title>Mailing ID</title>
19 <type>int unsigned</type>
20 <required>true</required>
21 <html>
22 <type>Number</type>
23 </html>
24 </field>
25 <primaryKey>
26 <name>id</name>
27 <autoincrement>true</autoincrement>
28 </primaryKey>
29 <field>
30 <name>domain_id</name>
31 <title>Domain ID</title>
32 <type>int unsigned</type>
33 <pseudoconstant>
34 <table>civicrm_domain</table>
35 <keyColumn>id</keyColumn>
36 <labelColumn>name</labelColumn>
37 </pseudoconstant>
38 <comment>Which site is this mailing for</comment>
39 <html>
40 <label>Domain</label>
41 </html>
42 <add>3.4</add>
43 </field>
44 <foreignKey>
45 <name>domain_id</name>
46 <table>civicrm_domain</table>
47 <key>id</key>
48 <onDelete>SET NULL</onDelete>
49 <add>3.4</add>
50 </foreignKey>
51 <field>
52 <name>header_id</name>
53 <title>Header ID</title>
54 <type>int unsigned</type>
55 <pseudoconstant>
56 <table>civicrm_mailing_component</table>
57 <keyColumn>id</keyColumn>
58 <labelColumn>name</labelColumn>
59 <condition>component_type = "Header"</condition>
60 </pseudoconstant>
61 <comment>FK to the header component.</comment>
62 <html>
63 <label>Header</label>
64 </html>
65 </field>
66 <foreignKey>
67 <name>header_id</name>
68 <table>civicrm_mailing_component</table>
69 <key>id</key>
70 <onDelete>SET NULL</onDelete>
71 </foreignKey>
72 <field>
73 <name>footer_id</name>
74 <title>Footer ID</title>
75 <type>int unsigned</type>
76 <pseudoconstant>
77 <table>civicrm_mailing_component</table>
78 <keyColumn>id</keyColumn>
79 <labelColumn>name</labelColumn>
80 <condition>component_type = "Footer"</condition>
81 </pseudoconstant>
82 <comment>FK to the footer component.</comment>
83 <html>
84 <label>Footer</label>
85 </html>
86 </field>
87 <foreignKey>
88 <name>footer_id</name>
89 <table>civicrm_mailing_component</table>
90 <key>id</key>
91 <onDelete>SET NULL</onDelete>
92 </foreignKey>
93 <field>
94 <name>reply_id</name>
95 <title>Reply ID</title>
96 <type>int unsigned</type>
97 <comment>FK to the auto-responder component.</comment>
98 <html>
99 <label>Reply</label>
100 </html>
101 </field>
102 <foreignKey>
103 <name>reply_id</name>
104 <table>civicrm_mailing_component</table>
105 <key>id</key>
106 <onDelete>SET NULL</onDelete>
107 </foreignKey>
108 <field>
109 <name>unsubscribe_id</name>
110 <title>Unsubscribe ID</title>
111 <type>int unsigned</type>
112 <comment>FK to the unsubscribe component.</comment>
113 <html>
114 <label>Unsubscribe</label>
115 </html>
116 </field>
117 <foreignKey>
118 <name>unsubscribe_id</name>
119 <table>civicrm_mailing_component</table>
120 <key>id</key>
121 <onDelete>SET NULL</onDelete>
122 </foreignKey>
123 <field>
124 <name>resubscribe_id</name>
125 <title>Mailing Resubscribe</title>
126 <type>int unsigned</type>
127 </field>
128 <field>
129 <name>optout_id</name>
130 <title>Opt Out ID</title>
131 <type>int unsigned</type>
132 <comment>FK to the opt-out component.</comment>
133 <html>
134 <label>Opt Out</label>
135 </html>
136 </field>
137 <foreignKey>
138 <name>optout_id</name>
139 <table>civicrm_mailing_component</table>
140 <key>id</key>
141 <onDelete>SET NULL</onDelete>
142 </foreignKey>
143 <field>
144 <name>name</name>
145 <uniqueName>mailing_name</uniqueName>
146 <title>Mailing Name</title>
147 <type>varchar</type>
148 <length>128</length>
149 <comment>Mailing Name.</comment>
150 <html>
151 <type>Text</type>
152 </html>
153 </field>
154 <field>
155 <name>mailing_type</name>
156 <type>varchar</type>
157 <title>Mailing Type</title>
158 <length>32</length>
159 <comment>differentiate between standalone mailings, A/B tests, and A/B final-winner</comment>
160 <pseudoconstant>
161 <callback>CRM_Mailing_PseudoConstant::mailingTypes</callback>
162 </pseudoconstant>
163 <add>4.6</add>
164 <html>
165 <type>Select</type>
166 </html>
167 </field>
168 <field>
169 <name>from_name</name>
170 <title>Mailing From Name</title>
171 <type>varchar</type>
172 <length>128</length>
173 <comment>From Header of mailing</comment>
174 <html>
175 <type>Text</type>
176 </html>
177 </field>
178 <field>
179 <name>from_email</name>
180 <title>Mailing From Email</title>
181 <type>varchar</type>
182 <length>128</length>
183 <comment>From Email of mailing</comment>
184 <html>
185 <type>Text</type>
186 </html>
187 </field>
188 <field>
189 <name>replyto_email</name>
190 <type>varchar</type>
191 <length>128</length>
192 <comment>Reply-To Email of mailing</comment>
193 <html>
194 <type>Text</type>
195 <label>Reply-To Email</label>
196 </html>
197 </field>
198 <field>
199 <name>template_type</name>
200 <title>Template Type</title>
201 <type>varchar</type>
202 <length>64</length>
203 <default>'traditional'</default>
204 <required>true</required>
205 <comment>The language/processing system used for email templates.</comment>
206 <pseudoconstant>
207 <callback>CRM_Mailing_BAO_Mailing::getTemplateTypeNames</callback>
208 </pseudoconstant>
209 <add>4.7.16</add>
210 </field>
211 <field>
212 <name>template_options</name>
213 <title>Template Options (JSON)</title>
214 <type>longtext</type>
215 <comment>Advanced options used by the email templating system. (JSON encoded)</comment>
216 <serialize>JSON</serialize>
217 <add>4.7.16</add>
218 </field>
219 <field>
220 <name>subject</name>
221 <type>varchar</type>
222 <length>128</length>
223 <comment>Subject of mailing</comment>
224 <html>
225 <type>Text</type>
226 <label>Subject</label>
227 </html>
228 </field>
229 <field>
230 <name>body_text</name>
231 <type>longtext</type>
232 <comment>Body of the mailing in text format.</comment>
233 <html>
234 <label>Body Text</label>
235 </html>
236 </field>
237 <field>
238 <name>body_html</name>
239 <type>longtext</type>
240 <comment>Body of the mailing in html format.</comment>
241 <html>
242 <label>Body HTML</label>
243 </html>
244 </field>
245 <field>
246 <name>url_tracking</name>
247 <type>boolean</type>
248 <default>0</default>
249 <required>true</required>
250 <comment>Should we track URL click-throughs for this mailing?</comment>
251 <html>
252 <type>CheckBox</type>
253 <label>Url Tracking</label>
254 </html>
255 </field>
256 <field>
257 <name>forward_replies</name>
258 <type>boolean</type>
259 <default>0</default>
260 <required>true</required>
261 <comment>Should we forward replies back to the author?</comment>
262 <html>
263 <type>CheckBox</type>
264 <label>Forward Replies</label>
265 </html>
266 </field>
267 <field>
268 <name>auto_responder</name>
269 <type>boolean</type>
270 <default>0</default>
271 <required>true</required>
272 <comment>Should we enable the auto-responder?</comment>
273 <html>
274 <type>CheckBox</type>
275 <label>Auto Responder</label>
276 </html>
277 </field>
278 <field>
279 <name>open_tracking</name>
280 <title>Track Mailing?</title>
281 <type>boolean</type>
282 <default>0</default>
283 <required>true</required>
284 <comment>Should we track when recipients open/read this mailing?</comment>
285 </field>
286 <field>
287 <name>is_completed</name>
288 <title>Mailing Completed</title>
289 <type>boolean</type>
290 <default>0</default>
291 <required>true</required>
292 <comment>Has at least one job associated with this mailing finished?</comment>
293 <html>
294 <type>CheckBox</type>
295 </html>
296 </field>
297 <field>
298 <name>msg_template_id</name>
299 <title>Message Template ID</title>
300 <type>int unsigned</type>
301 <comment>FK to the message template.</comment>
302 <html>
303 <label>Message Template</label>
304 </html>
305 </field>
306 <foreignKey>
307 <name>msg_template_id</name>
308 <table>civicrm_msg_template</table>
309 <key>id</key>
310 <onDelete>SET NULL</onDelete>
311 </foreignKey>
312 <field>
313 <name>override_verp</name>
314 <type>boolean</type>
315 <default>0</default>
316 <required>true</required>
317 <add>2.2</add>
318 <comment>Overwrite the VERP address in Reply-To</comment>
319 <html>
320 <type>CheckBox</type>
321 <label>Overwrite VERP</label>
322 </html>
323 </field>
324 <field>
325 <name>created_id</name>
326 <title>Created By Contact ID</title>
327 <type>int unsigned</type>
328 <comment>FK to Contact ID who first created this mailing</comment>
329 <html>
330 <label>Creator</label>
331 </html>
332 </field>
333 <foreignKey>
334 <name>created_id</name>
335 <table>civicrm_contact</table>
336 <key>id</key>
337 <onDelete>SET NULL</onDelete>
338 </foreignKey>
339 <field>
340 <name>created_date</name>
341 <type>timestamp</type>
342 <default>CURRENT_TIMESTAMP</default>
343 <required>false</required>
344 <title>Mailing Created Date</title>
345 <comment>Date and time this mailing was created.</comment>
346 <add>3.0</add>
347 <html>
348 <type>Select Date</type>
349 <formatType>activityDateTime</formatType>
350 </html>
351 </field>
352 <field>
353 <name>modified_date</name>
354 <uniqueName>mailing_modified_date</uniqueName>
355 <type>timestamp</type>
356 <comment>When the mailing (or closely related entity) was created or modified or deleted.</comment>
357 <required>false</required>
358 <export>true</export>
359 <default>CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP</default>
360 <html>
361 <label>Modified Date</label>
362 </html>
363 <readonly>true</readonly>
364 <add>4.7</add>
365 </field>
366 <field>
367 <name>scheduled_id</name>
368 <title>Scheduled By Contact ID</title>
369 <type>int unsigned</type>
370 <comment>FK to Contact ID who scheduled this mailing</comment>
371 <html>
372 <label>Scheduled By</label>
373 </html>
374 </field>
375 <foreignKey>
376 <name>scheduled_id</name>
377 <table>civicrm_contact</table>
378 <key>id</key>
379 <onDelete>SET NULL</onDelete>
380 </foreignKey>
381 <field>
382 <name>scheduled_date</name>
383 <type>timestamp</type>
384 <default>NULL</default>
385 <required>false</required>
386 <title>Mailing Scheduled Date</title>
387 <comment>Date and time this mailing was scheduled.</comment>
388 <add>3.3</add>
389 <html>
390 <type>Select Date</type>
391 <formatType>activityDateTime</formatType>
392 </html>
393 </field>
394 <field>
395 <name>approver_id</name>
396 <title>Approved By Contact ID</title>
397 <type>int unsigned</type>
398 <comment>FK to Contact ID who approved this mailing</comment>
399 <html>
400 <label>Approved By</label>
401 </html>
402 </field>
403 <foreignKey>
404 <name>approver_id</name>
405 <table>civicrm_contact</table>
406 <key>id</key>
407 <onDelete>SET NULL</onDelete>
408 </foreignKey>
409 <field>
410 <name>approval_date</name>
411 <type>timestamp</type>
412 <default>NULL</default>
413 <required>false</required>
414 <title>Mailing Approved Date</title>
415 <comment>Date and time this mailing was approved.</comment>
416 <add>3.3</add>
417 <html>
418 <type>Select Date</type>
419 <formatType>activityDateTime</formatType>
420 </html>
421 </field>
422 <field>
423 <name>approval_status_id</name>
424 <type>int unsigned</type>
425 <title>Approval Status</title>
426 <comment>The status of this mailing. Values: none, approved, rejected</comment>
427 <pseudoconstant>
428 <optionGroupName>mail_approval_status</optionGroupName>
429 </pseudoconstant>
430 <html>
431 <type>Select</type>
432 </html>
433 <add>3.3</add>
434 </field>
435 <field>
436 <name>approval_note</name>
437 <type>longtext</type>
438 <title>Approval Note</title>
439 <comment>Note behind the decision.</comment>
440 <add>3.3</add>
441 <html>
442 <type>TextArea</type>
443 </html>
444 </field>
445 <field>
446 <name>is_archived</name>
447 <type>boolean</type>
448 <title>Is Mailing Archived?</title>
449 <default>0</default>
450 <required>true</required>
451 <comment>Is this mailing archived?</comment>
452 <html>
453 <type>CheckBox</type>
454 </html>
455 <add>2.2</add>
456 </field>
457 <field>
458 <name>visibility</name>
459 <type>varchar</type>
460 <title>Mailing Visibility</title>
461 <length>40</length>
462 <default>'Public Pages'</default>
463 <comment>In what context(s) is the mailing contents visible (online viewing)</comment>
464 <pseudoconstant>
465 <callback>CRM_Core_SelectValues::groupVisibility</callback>
466 </pseudoconstant>
467 <add>3.3</add>
468 <html>
469 <type>Select</type>
470 </html>
471 </field>
472 <field>
473 <name>campaign_id</name>
474 <component>CiviCampaign</component>
475 <type>int unsigned</type>
476 <title>Campaign ID</title>
477 <comment>The campaign for which this mailing has been initiated.</comment>
478 <add>3.4</add>
479 <html>
480 <type>EntityRef</type>
481 <label>Campaign</label>
482 </html>
483 <pseudoconstant>
484 <table>civicrm_campaign</table>
485 <keyColumn>id</keyColumn>
486 <labelColumn>title</labelColumn>
487 <prefetch>FALSE</prefetch>
488 </pseudoconstant>
489 </field>
490 <foreignKey>
491 <name>campaign_id</name>
492 <table>civicrm_campaign</table>
493 <key>id</key>
494 <onDelete>SET NULL</onDelete>
495 </foreignKey>
496 <field>
497 <name>dedupe_email</name>
498 <type>boolean</type>
499 <title>No Duplicate emails?</title>
500 <default>0</default>
501 <required>true</required>
502 <add>4.1</add>
503 <comment>Remove duplicate emails?</comment>
504 <html>
505 <type>CheckBox</type>
506 </html>
507 </field>
508 <field>
509 <name>sms_provider_id</name>
510 <title>SMS Provider ID</title>
511 <type>int unsigned</type>
512 <add>4.2</add>
513 <html>
514 <type>Select</type>
515 <label>SMS Provider</label>
516 </html>
517 </field>
518 <foreignKey>
519 <name>sms_provider_id</name>
520 <table>civicrm_sms_provider</table>
521 <key>id</key>
522 <onDelete>SET NULL</onDelete>
523 <add>4.2</add>
524 </foreignKey>
525 <field>
526 <name>hash</name>
527 <title>Mailing Hash</title>
528 <type>varchar</type>
529 <length>16</length>
530 <comment>Key for validating requests related to this mailing.</comment>
531 <readonly>true</readonly>
532 <add>4.5</add>
533 </field>
534 <index>
535 <name>index_hash</name>
536 <fieldName>hash</fieldName>
537 <add>4.5</add>
538 </index>
539 <field>
540 <name>location_type_id</name>
541 <title>Location Type ID</title>
542 <type>int unsigned</type>
543 <comment>With email_selection_method, determines which email address to use</comment>
544 <pseudoconstant>
545 <table>civicrm_location_type</table>
546 <keyColumn>id</keyColumn>
547 <labelColumn>display_name</labelColumn>
548 </pseudoconstant>
549 <html>
550 <label>Location Type</label>
551 </html>
552 <add>4.6</add>
553 </field>
554 <foreignKey>
555 <name>location_type_id</name>
556 <table>civicrm_location_type</table>
557 <key>id</key>
558 <onDelete>SET NULL</onDelete>
559 <add>4.6</add>
560 </foreignKey>
561 <field>
562 <name>email_selection_method</name>
563 <type>varchar</type>
564 <length>20</length>
565 <default>'automatic'</default>
566 <comment>With location_type_id, determine how to choose the email address to use.</comment>
567 <pseudoconstant>
568 <callback>CRM_Core_SelectValues::emailSelectMethods</callback>
569 </pseudoconstant>
570 <html>
571 <label>Email Selection Method</label>
572 </html>
573 <add>4.6</add>
574 </field>
575 <field>
576 <name>language</name>
577 <title>Mailing Language</title>
578 <type>varchar</type>
579 <length>5</length>
580 <comment>Language of the content of the mailing. Useful for tokens.</comment>
581 <add>4.6</add>
582 <pseudoconstant>
583 <optionGroupName>languages</optionGroupName>
584 <keyColumn>name</keyColumn>
585 </pseudoconstant>
586 <html>
587 <type>Select</type>
588 </html>
589 </field>
590 </table>