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