PluginProbe
Fluent Support – Helpdesk & Customer Support Ticket System / 2.4.5
Fluent Support – Helpdesk & Customer Support Ticket System v2.4.5
2.4.5 2.4.0 2.3.2 2.3.1 2.3.0 2.2.1 2.2.0 trunk 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.4.0 1.4.1 1.4.2 1.4.5 1.4.6 1.4.7 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 All 69 releases
← All changes | app/Services/EmailNotification/Settings.php +121 -55 2.3.1 → 2.4.5 View file →
@@ -71,8 +71,21 @@
71 71 $settings['ticket_link_portal_migrated'] = 'yes';
72 72 if (isset($settings['min_serial_number'])) {
73 73 $settings['min_serial_number'] = max(1, (int) $settings['min_serial_number']);
74 74 }
75 + // The frontend only ever offers 3/7/15 — reject anything else
76 + // (a tampered request, or a stale/unexpected value) back to the
77 + // 15-day default rather than trusting the submitted value as-is.
78 + if (isset($settings['report_snapshot_retention']) && !in_array($settings['report_snapshot_retention'], ['3', '7', '15'], true)) {
79 + $settings['report_snapshot_retention'] = '15';
80 + }
81 + // These keys become user meta on signup, so keep only the offered fields.
82 + if (isset($settings['custom_registration_form_field'])) {
83 + $settings['custom_registration_form_field'] = array_values(array_intersect(
84 + (array) $settings['custom_registration_form_field'],
85 + array_keys(Helper::getCustomRegistrationFieldOptions())
86 + ));
87 + }
75 88 }
76 89
77 90 if ($settingsKey == 'global_business_settings' && !empty($settings['agent_time_tracking'])) {
78 91 if (class_exists(TimeTrackMigrator::class) && $settings['agent_time_tracking'] === 'yes') {
@@ -121,8 +134,9 @@
121 134 'enable_min_serial_number' => 'no',
122 135 'ticket_prefix' => '',
123 136 'min_serial_number' => 1,
124 137 'enable_fluent_booking_integration' => 'no',
138 + 'report_snapshot_retention' => '15',
125 139 ];
126 140
127 141 //Get default/existing settings from database using the key global_business_settings
128 142 $existingSettings = Helper::getOption('global_business_settings', []);
@@ -184,16 +198,9 @@
184 198 foreach ($mimeGroups as $mimeGroup => $mime) {
185 199 $formattedMimeGroups[$mimeGroup] = $mime['title'];
186 200 }
187 201
188 - $customRegistrationFormOptions = array(
189 - 'address_line_1' => 'Address Line 1',
190 - 'address_line_2' => 'Address Line 2',
191 - 'city' => 'City',
192 - 'zip' => 'Zip Code',
193 - 'state' => 'State',
194 - 'country' => 'Country',
195 - );
202 + $customRegistrationFormOptions = Helper::getCustomRegistrationFieldOptions();
196 203
197 204 $fields = [
198 205 'ticket_link_portal_description' => [
199 206 'type' => 'html-viewer',
@@ -233,9 +240,9 @@
233 240 ],
234 241 'login_message' => [
235 242 'type' => 'wp-editor',
236 243 'label' => __('Message for non logged in users', 'fluent-support'),
237 - 'inline_help' => __('Please provide message for not logged in users. You can place login shortcode too. Use shortcode <code>[fluent_support_login]</code> to show built-in login form. For the user registration use this shortcode <code>[fluent_support_signup]</code> and for both form please use <code>[fluent_support_auth]</code>', 'fluent-support')
244 + 'inline_help' => __('Please provide message for not logged in users. You can place login shortcode too. Use shortcode <code>[fluent_support_login]</code> to show built-in login form. For the user registration use this shortcode <code>[fluent_support_signup]</code> and for both form please use <code>[fluent_support_auth]</code>. Registration forms only show when "Anyone can register" is enabled in Settings > General.', 'fluent-support')
238 245 ],
239 246 'disable_public_ticket' => [
240 247 'wrapper_class' => '',
241 248 'type' => 'inline-checkbox',
@@ -357,8 +364,19 @@
357 364 'depends_on' => 'enable_min_serial_number',
358 365 'operator' => '=',
359 366 'value' => 'yes'
360 367 ]
368 + ],
369 + 'report_snapshot_retention' => [
370 + 'wrapper_class' => '',
371 + 'type' => 'input-radio',
372 + 'label' => __('Snapshot Retention', 'fluent-support'),
373 + 'options' => [
374 + ['id' => '3', 'label' => __('3 days', 'fluent-support')],
375 + ['id' => '7', 'label' => __('7 days', 'fluent-support')],
376 + ['id' => '15', 'label' => __('15 days', 'fluent-support')],
377 + ],
378 + 'inline_help' => __('Advanced Reports saves a snapshot of each report every 6 hours. Snapshots older than this many days are automatically deleted.', 'fluent-support'),
361 379 ]
362 380 ];
363 381 if (defined('FLUENT_BOOKING_VERSION')) {
364 382 $fields['enable_fluent_booking_integration'] = [
@@ -391,11 +409,49 @@
391 409 ];
392 410
393 411 }
394 412
413 + if (Helper::getAuthProvider() === 'fluent_auth') {
414 + $fields = $this->replaceTwoFaWithFluentAuthNotice($fields);
415 + }
416 +
395 417 return $fields;
396 418 }
397 419
420 + /**
421 + * With FluentAuth handling portal sign-in, our 2FA toggle no longer applies, so a note
422 + * pointing to FluentAuth's 2FA settings takes its place. The stored value is kept.
423 + *
424 + * @param array $fields
425 + * @return array
426 + */
427 + private function replaceTwoFaWithFluentAuthNotice($fields)
428 + {
429 + $notice = [
430 + 'type' => 'html-viewer',
431 + 'label' => __('Two-Factor Authentication', 'fluent-support'),
432 + 'wrapper_class' => 'fs_warn_alert_wrapper',
433 + 'html' => sprintf(
434 + /* translators: %s: URL of the FluentAuth settings page */
435 + __('Portal sign-in is handled by the FluentAuth plugin, so two-factor authentication for your customers and agents is set up there. FluentAuth applies it to the roles you choose, so include your customers\' role. <a href="%s">Open FluentAuth settings</a>', 'fluent-support'),
436 + esc_url(admin_url('admin.php?page=fluent-auth#/settings'))
437 + ),
438 + ];
439 +
440 + $replaced = [];
441 +
442 + foreach ($fields as $key => $field) {
443 + if ($key === 'enable_two_fa') {
444 + $replaced['fluent_auth_two_fa_notice'] = $notice;
445 + continue;
446 + }
447 +
448 + $replaced[$key] = $field;
449 + }
450 +
451 + return $replaced;
452 + }
453 +
398 454 private function getTicketLinkPortalOptions()
399 455 {
400 456 $options = [
401 457 [
@@ -455,41 +511,49 @@
455 511 {
456 512 $actionLabel = __('Action', 'fluent-support');
457 513 $shortcutLabel = __('Shortcut', 'fluent-support');
458 514
515 + // Windows and Linux use Ctrl where macOS uses ⌘ (see resources/admin/Bits/shortcuts.js).
459 516 $macShortcuts = [
460 - ['action' => __('Tickets – Advanced filter toggle', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + f'],
461 - ['action' => __('Tickets – Refresh', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + q'],
462 - ['action' => __('Tickets – Create Ticket', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + n'],
463 - ['action' => __('Tickets – Reset filter', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + r'],
464 - ['action' => __('Tickets – All Tickets', 'fluent-support'), 'shortcut' => '⌘ + ⇧ + a'],
465 - ['action' => __('Tickets – My Tickets', 'fluent-support'), 'shortcut' => '⌘ + ⇧ + m'],
466 - ['action' => __('Tickets – Unassigned', 'fluent-support'), 'shortcut' => '⌘ + ⇧ + u'],
467 - ['action' => __('Tickets – Waiting for reply', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + w'],
468 - ['action' => __('Tickets – Bookmarks', 'fluent-support'), 'shortcut' => '⌘ + ⇧ + b'],
469 - ['action' => __('Tickets – Toggle (Open, active, close, all)', 'fluent-support'), 'shortcut' => '⌘ + ⇧ + → / ←'],
470 - ['action' => __('Ticket Reply – Reply', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + r'],
471 - ['action' => __('Ticket Reply – Personal note', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + n'],
472 - ['action' => __('Ticket Reply – Merge', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + m'],
473 - ['action' => __('Ticket Reply – Bookmarks', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + b'],
474 - ['action' => __('Ticket Reply – Refresh', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + q'],
517 + ['action' => __('Tickets: Advanced filter toggle', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + f'],
518 + ['action' => __('Tickets: Refresh', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + q'],
519 + ['action' => __('Tickets: Create Ticket', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + n'],
520 + ['action' => __('Tickets: Reset filter', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + r'],
521 + ['action' => __('Tickets: All Tickets', 'fluent-support'), 'shortcut' => '⌘ + ⇧ + a'],
522 + ['action' => __('Tickets: My Tickets', 'fluent-support'), 'shortcut' => '⌘ + ⇧ + m'],
523 + ['action' => __('Tickets: Unassigned', 'fluent-support'), 'shortcut' => '⌘ + ⇧ + u'],
524 + ['action' => __('Tickets: Waiting for reply', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + w'],
525 + ['action' => __('Tickets: Bookmarks', 'fluent-support'), 'shortcut' => '⌘ + ⇧ + b'],
526 + ['action' => __('Tickets: Toggle (Open, active, close, all)', 'fluent-support'), 'shortcut' => '⌘ + ⇧ + → / ←'],
527 + ['action' => __('Ticket Reply: Reply', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + r'],
528 + ['action' => __('Ticket Reply: Personal note', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + n'],
529 + ['action' => __('Ticket Reply: Merge', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + m'],
530 + ['action' => __('Ticket Reply: Bookmarks', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + b'],
531 + ['action' => __('Ticket Reply: Refresh', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + q'],
532 + ['action' => __('Ticket Reply: Next ticket', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + ↓'],
533 + ['action' => __('Ticket Reply: Previous ticket', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + ↑'],
534 + ['action' => __('Ticket Reply: Close ticket', 'fluent-support'), 'shortcut' => '⌘ + ⌥ + x'],
475 535 ];
476 536
477 537 $winShortcuts = [
478 - ['action' => __('Tickets – Advanced filter toggle', 'fluent-support'), 'shortcut' => 'Alt + Win + Shift + f'],
479 - ['action' => __('Tickets – Refresh', 'fluent-support'), 'shortcut' => 'Alt + Win + q'],
480 - ['action' => __('Tickets – Create Ticket', 'fluent-support'), 'shortcut' => 'Alt + Win + n'],
481 - ['action' => __('Tickets – Reset filter', 'fluent-support'), 'shortcut' => 'Alt + Win + Shift + r'],
482 - ['action' => __('Tickets – All Tickets', 'fluent-support'), 'shortcut' => 'Win + Shift + a'],
483 - ['action' => __('Tickets – My Tickets', 'fluent-support'), 'shortcut' => 'Alt + Win + Shift + m'],
484 - ['action' => __('Tickets – Unassigned', 'fluent-support'), 'shortcut' => 'Win + Shift + u'],
485 - ['action' => __('Tickets – Waiting for reply', 'fluent-support'), 'shortcut' => 'Alt + Win + Shift + w'],
486 - ['action' => __('Tickets – Bookmarks', 'fluent-support'), 'shortcut' => 'Win + Shift + b'],
487 - ['action' => __('Ticket Reply – Reply', 'fluent-support'), 'shortcut' => 'Alt + Win + Shift + r'],
488 - ['action' => __('Ticket Reply – Personal note', 'fluent-support'), 'shortcut' => 'Alt + Win + n'],
489 - ['action' => __('Ticket Reply – Merge', 'fluent-support'), 'shortcut' => 'Ctrl + Alt + Win + m'],
490 - ['action' => __('Ticket Reply – Bookmarks', 'fluent-support'), 'shortcut' => 'Ctrl + Alt + Win + b'],
491 - ['action' => __('Ticket Reply – Refresh', 'fluent-support'), 'shortcut' => 'Alt + Win + q'],
538 + ['action' => __('Tickets: Advanced filter toggle', 'fluent-support'), 'shortcut' => 'Ctrl + Alt + f'],
539 + ['action' => __('Tickets: Refresh', 'fluent-support'), 'shortcut' => 'Ctrl + Alt + q'],
540 + ['action' => __('Tickets: Create Ticket', 'fluent-support'), 'shortcut' => 'Ctrl + Alt + n'],
541 + ['action' => __('Tickets: Reset filter', 'fluent-support'), 'shortcut' => 'Ctrl + Alt + r'],
542 + ['action' => __('Tickets: All Tickets', 'fluent-support'), 'shortcut' => 'Ctrl + Shift + a'],
543 + ['action' => __('Tickets: My Tickets', 'fluent-support'), 'shortcut' => 'Ctrl + Shift + m'],
544 + ['action' => __('Tickets: Unassigned', 'fluent-support'), 'shortcut' => 'Ctrl + Shift + u'],
545 + ['action' => __('Tickets: Waiting for reply', 'fluent-support'), 'shortcut' => 'Ctrl + Alt + w'],
546 + ['action' => __('Tickets: Bookmarks', 'fluent-support'), 'shortcut' => 'Ctrl + Shift + b'],
547 + ['action' => __('Tickets: Toggle (Open, active, close, all)', 'fluent-support'), 'shortcut' => 'Ctrl + Shift + → / ←'],
548 + ['action' => __('Ticket Reply: Reply', 'fluent-support'), 'shortcut' => 'Ctrl + Alt + r'],
549 + ['action' => __('Ticket Reply: Personal note', 'fluent-support'), 'shortcut' => 'Ctrl + Alt + n'],
550 + ['action' => __('Ticket Reply: Merge', 'fluent-support'), 'shortcut' => 'Ctrl + Alt + m'],
551 + ['action' => __('Ticket Reply: Bookmarks', 'fluent-support'), 'shortcut' => 'Ctrl + Alt + b'],
552 + ['action' => __('Ticket Reply: Refresh', 'fluent-support'), 'shortcut' => 'Ctrl + Alt + q'],
553 + ['action' => __('Ticket Reply: Next ticket', 'fluent-support'), 'shortcut' => 'Ctrl + Alt + ↓'],
554 + ['action' => __('Ticket Reply: Previous ticket', 'fluent-support'), 'shortcut' => 'Ctrl + Alt + ↑'],
555 + ['action' => __('Ticket Reply: Close ticket', 'fluent-support'), 'shortcut' => 'Ctrl + Alt + x'],
492 556 ];
493 557
494 558 return [
495 559 'title' => __('Keyboard Shortcuts', 'fluent-support'),
@@ -530,9 +594,9 @@
530 594 'ticket_created_email_to_customer' => [
531 595 'key' => 'ticket_created_email_to_customer',
532 596 'title' => __('Ticket Created (To Customer)', 'fluent-support'),
533 597 'description' => __('This email will be sent when a customer submit a support ticket', 'fluent-support'),
534 - 'email_subject' => 'Re: {{ticket.title}} #{{ticket.id}}',
598 + 'email_subject' => 'Re: {{ticket.title}} #{{ticket.public_id}}',
535 599 'default_status' => 'no',
536 600 'send_attachments'=> 'no'
537 601 ],
538 602 'ticket_replied_by_agent_email_to_customer' => [
@@ -538,9 +602,9 @@
538 602 'ticket_replied_by_agent_email_to_customer' => [
539 603 'key' => 'ticket_replied_by_agent_email_to_customer',
540 604 'title' => __('Replied by Agent (To Customer)', 'fluent-support'),
541 605 'description' => __('This email will be sent when an agent reply to a ticket', 'fluent-support'),
542 - 'email_subject' => 'Re: {{ticket.title}} #{{ticket.id}}',
606 + 'email_subject' => 'Re: {{ticket.title}} #{{ticket.public_id}}',
543 607 'default_status' => 'yes',
544 608 'send_attachments'=> 'no'
545 609 ],
546 610 'ticket_closed_by_agent_email_to_customer' => [
@@ -546,9 +610,9 @@
546 610 'ticket_closed_by_agent_email_to_customer' => [
547 611 'key' => 'ticket_closed_by_agent_email_to_customer',
548 612 'title' => __('Ticket Closed by Agent (To Customer)', 'fluent-support'),
549 613 'description' => __('This email will be sent when an agent close a ticket', 'fluent-support'),
550 - 'email_subject' => 'Re: {{ticket.title}} #{{ticket.id}}',
614 + 'email_subject' => 'Re: {{ticket.title}} #{{ticket.public_id}}',
551 615 'default_status' => 'no',
552 616 'send_attachments'=> 'no'
553 617 ],
554 618 'ticket_created_email_to_admin' => [
@@ -554,9 +618,9 @@
554 618 'ticket_created_email_to_admin' => [
555 619 'key' => 'ticket_created_email_to_admin',
556 620 'title' => __('Ticket Created (To Admin)', 'fluent-support'),
557 621 'description' => __('This email will be sent when the business when a new ticket has been submitted', 'fluent-support'),
558 - 'email_subject' => 'New Ticket: {{ticket.title}} #{{ticket.id}}',
622 + 'email_subject' => 'New Ticket: {{ticket.title}} #{{ticket.public_id}}',
559 623 'default_status' => 'yes',
560 624 'send_attachments'=> 'no'
561 625 ],
562 626 'ticket_replied_by_customer_email_to_admin' => [
@@ -562,9 +626,9 @@
562 626 'ticket_replied_by_customer_email_to_admin' => [
563 627 'key' => 'ticket_replied_by_customer_email_to_admin',
564 628 'title' => __('Replied by Customer (To Agent/Admin)', 'fluent-support'),
565 629 'description' => __('This email will be sent to Assigned Agent or Admin when a customer reply to a ticket', 'fluent-support'),
566 - 'email_subject' => 'New Response: {{ticket.title}} #{{ticket.id}}',
630 + 'email_subject' => 'New Response: {{ticket.title}} #{{ticket.public_id}}',
567 631 'default_status' => 'yes',
568 632 'send_attachments'=> 'no'
569 633 ],
570 634 'ticket_agent_on_change' => [
@@ -570,9 +634,9 @@
570 634 'ticket_agent_on_change' => [
571 635 'key' => 'ticket_agent_on_change',
572 636 'title' => __('Ticket Agent Change (To Agent)', 'fluent-support'),
573 637 'description' => __('This email will be sent to newly assigned agent', 'fluent-support'),
574 - 'email_subject' => 'Ticket Agent Change: {{ticket.title}} #{{ticket.id}}',
638 + 'email_subject' => 'Ticket Agent Change: {{ticket.title}} #{{ticket.public_id}}',
575 639 'default_status' => 'yes',
576 640 'send_attachments'=> 'no'
577 641 ],
578 642 'ticket_created_by_agent_email_to_customer' => [
@@ -578,9 +642,9 @@
578 642 'ticket_created_by_agent_email_to_customer' => [
579 643 'key' => 'ticket_created_by_agent_email_to_customer',
580 644 'title' => __('Ticket Logged by Agent (To Customer)', 'fluent-support'),
581 645 'description' => __('This email will be sent when an agent logs a ticket on behalf of a customer (e.g. from a phone call or email received outside the system)', 'fluent-support'),
582 - 'email_subject' => 'Re: {{ticket.title}} #{{ticket.id}}',
646 + 'email_subject' => 'Re: {{ticket.title}} #{{ticket.public_id}}',
583 647 'default_status' => 'no',
584 648 'send_attachments'=> 'no'
585 649 ],
586 650 'ticket_created_by_agent_on_behalf_email_to_customer' => [
@@ -586,9 +650,10 @@
586 650 'ticket_created_by_agent_on_behalf_email_to_customer' => [
587 651 'key' => 'ticket_created_by_agent_on_behalf_email_to_customer',
588 652 'title' => __('Agent Outreach Ticket (To Customer)', 'fluent-support'),
589 653 'description' => __('This email will be sent when an agent creates a ticket using the "Agent Initiated" option to proactively reach out to a customer — includes the agent\'s message content', 'fluent-support'),
590 - 'email_subject' => 'Your ticket has been created (#{{ticket.id}})',
654 + // Outreach reads like an email the agent wrote: their subject, their message.
655 + 'email_subject' => '{{ticket.title}}',
591 656 'default_status' => 'yes',
592 657 'send_attachments'=> 'no'
593 658 ]
594 659 ];
@@ -656,38 +721,39 @@
656 721 private function getDefaultEmailBody($emailKey, $type = 'web')
657 722 {
658 723 if ($emailKey == 'ticket_created_email_to_customer') {
659 724 if ($type == 'web') {
660 - return '<p>Hi <strong><em>{{customer.full_name}}</em>,</strong></p><p>Your request (<a href="{{ticket.public_url}}">#{{ticket.id}}</a>) has been received, and is being reviewed by our support staff.</p><p>To add additional comments, follow the link below:</p><h4><a href="{{ticket.public_url}}">View Ticket</a></h4><p>&nbsp;</p><p>or follow this link: {{ticket.public_url}}</p><hr /><p>{{business.name}}</p>';
725 + return '<p>Hi <strong><em>{{customer.full_name}}</em>,</strong></p><p>Your request (<a href="{{ticket.public_url}}">#{{ticket.public_id}}</a>) has been received, and is being reviewed by our support staff.</p><p>To add additional comments, follow the link below:</p><h4><a href="{{ticket.public_url}}">View Ticket</a></h4><p>&nbsp;</p><p>or follow this link: {{ticket.public_url}}</p><hr /><p>{{business.name}}</p>';
661 726 } else {
662 727 return '<p>Hi <strong><em>{{customer.full_name}}</em>,</strong></p><p>Your request has been received, and is being reviewed by our support staff.</p><p>Our support staff will reply back to you soon</p>';
663 728 }
664 729 } else if ($emailKey == 'ticket_replied_by_agent_email_to_customer') {
665 730 if ($type == 'web') {
666 - return '<p>Hi <strong><em>{{customer.full_name}}</em>,</strong></p><p>An agent just replied to your ticket "<strong>{{ticket.title}}</strong>" (<a href="{{ticket.public_url}}">#{{ticket.id}}</a>). To view his reply or add additional comments, click the button below:</p><h4><a href="{{ticket.public_url}}">View Ticket</a></h4><p>or follow this link: {{ticket.public_url}}</p><hr /><p>Regards,<br />{{business.name}}</p>';
731 + return '<p>Hi <strong><em>{{customer.full_name}}</em>,</strong></p><p>An agent just replied to your ticket "<strong>{{ticket.title}}</strong>" (<a href="{{ticket.public_url}}">#{{ticket.public_id}}</a>). To view the reply or add additional comments, click the button below:</p><h4><a href="{{ticket.public_url}}">View Ticket</a></h4><p>or follow this link: {{ticket.public_url}}</p><hr /><p>Regards,<br />{{business.name}}</p>';
667 732 } else {
668 - return '{{response.full_content}}<p>Regards,<br />{{agent.full_name}}</p>';
733 + // {{agent.signature}} is empty when the agent has none.
734 + return '{{response.full_content}}{{agent.signature}}';
669 735 }
670 736 } else if ($emailKey == 'ticket_closed_by_agent_email_to_customer') {
671 737 if ($type == 'web') {
672 - return '<p>Hi <strong><em>{{customer.full_name}},</strong></p><p>Your ticket - {{ticket.title}}</p><p>We hope that the ticket was resolved to your satisfaction. If you feel that the ticket should not be closed or if the ticket has not been resolved, please reopen the ticket (<a href="{{ticket.public_url}}">#{{ticket.id}}</a>)</p><p>Regards,<br />{{business.name}}</p>';
738 + return '<p>Hi <strong><em>{{customer.full_name}},</strong></p><p>Your ticket - {{ticket.title}}</p><p>We hope that the ticket was resolved to your satisfaction. If you feel that the ticket should not be closed or if the ticket has not been resolved, please reopen the ticket (<a href="{{ticket.public_url}}">#{{ticket.public_id}}</a>)</p><p>Regards,<br />{{business.name}}</p>';
673 739 } else {
674 740 return '<p>Hi <strong><em>{{customer.full_name}},</strong></p><p>Your ticket - {{ticket.title}}</p><p>We hope that the ticket was resolved to your satisfaction. If you feel that the ticket should not be closed or if the ticket has not been resolved, please feel free to reply back.<p>Regards,<br />{{business.name}}</p>';
675 741 }
676 742 } else if ($emailKey == 'ticket_created_email_to_admin') {
677 - return '<p>A new ticket (<a href="{{ticket.admin_url}}">{{ticket.title}}</a>) as been submitted by {{customer.full_name}}</p><h4>Ticket Body</h4><p>{{ticket.content}}</p><p><b><a href="{{ticket.admin_url}}">View Ticket</a></b></p>';
743 + return '<p>A new ticket (<a href="{{ticket.admin_url}}">{{ticket.title}}</a>) has been submitted by {{customer.full_name}}</p><h4>Ticket Body</h4><p>{{ticket.content}}</p><p><b><a href="{{ticket.admin_url}}">View Ticket</a></b></p>';
678 744 } else if ($emailKey == 'ticket_replied_by_customer_email_to_admin') {
679 745 return '<p>A new response has been added to "<a href="{{ticket.admin_url}}">{{ticket.title}}</a>" by {{customer.full_name}}</p><h4>Response Body</h4><p>{{response.content}}</p><p><b><a href="{{ticket.admin_url}}">View Ticket</a></b></p>';
680 746 } else if($emailKey == 'ticket_agent_on_change') {
681 - return '<p>Hi <strong><em>{{agent.full_name}}</em>,</strong></p><p>Ticket "<a href="{{ticket.admin_url}}">#{{ticket.id}}</a>" assigned to you.</p>';
747 + return '<p>Hi <strong><em>{{agent.full_name}}</em>,</strong></p><p>Ticket "<a href="{{ticket.admin_url}}">#{{ticket.public_id}}</a>" assigned to you.</p>';
682 748 } else if($emailKey == 'ticket_created_by_agent_email_to_customer') {
683 749 return '<p>Hi <strong><em>{{customer.full_name}}</em>,</strong></p><p>{{agent.full_name}} created a ticket on behalf of you, you can check it <a href="{{ticket.public_url}}">here</a></p>.';
684 750 } else if($emailKey == 'ticket_created_by_agent_on_behalf_email_to_customer') {
685 751 if ($type == 'web') {
686 - return '<p>Hi <strong><em>{{customer.full_name}}</em>,</strong></p><p>A support agent has created a new ticket on your behalf titled "{{ticket.title}}" (#{{ticket.id}}).</p><p>You can review the details, track progress, or add additional comments by clicking the button below:</p><h4><a href="{{ticket.public_url}}">View Ticket</a></h4><p>Or follow this link: {{ticket.public_url}}</p><p>Best regards,<br />{{agent.full_name}}</p>';
687 - } else {
688 - return '{{response.full_content}}<p>Regards,<br />{{agent.full_name}}</p>';
752 + // Web mailboxes take replies in the portal, not by email.
753 + return '{{response.full_content}}{{agent.signature}}<p><a href="{{ticket.public_url}}">Reply to this conversation</a></p>';
689 754 }
755 + return '{{response.full_content}}{{agent.signature}}';
690 756 }
691 757
692 758 return '';
693 759 }