Compare commits
3 Commits
6309a5fdc1
...
976099c3d3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
976099c3d3 | ||
|
|
e4a535f333 | ||
|
|
33b2bdcd57 |
@@ -1,13 +1,16 @@
|
|||||||
Subject: AutoReply: {$Ticket->Subject}
|
From: Davis Method <test-queue@davismethod.com>
|
||||||
|
Subject: {$Ticket->Subject}
|
||||||
Content-Type: text/html
|
Content-Type: text/html
|
||||||
|
<p>Hello from Davis,</p>
|
||||||
|
|
||||||
<p>Thankyou for your interest in the Davis Method. We have received your message and will aim to get back to you within 2 working days. There is no need to reply to this message right now. Your interest has been
|
<p>Your form was submitted with ID #{$Ticket->id}.</p>
|
||||||
assigned an ID of <b>{$Ticket->SubjectTag}</b>.</p>
|
|
||||||
|
|
||||||
<p>Should you wish to contact us relating to this then please include the string <b>{$Ticket->SubjectTag}</b>
|
<p>Thank you so much for reaching out to a Davis Facilitator and expressing interest in a Davis program.</p>
|
||||||
in the subject line of all future correspondence about this case.</p>
|
|
||||||
|
|
||||||
<p>Best regards</p>
|
<p>Your inquiry is important to us, and a member of our team will get back to you within 3 business days. In the meantime, feel free to explore our website for more information. Of particular interest may be our section on <a href='https://davismethod.com/search-solutions/'>Davis Solutions</a>.</p>
|
||||||
|
|
||||||
<p>....</p>
|
<p>We look forward to connecting with you soon.</p>
|
||||||
|
|
||||||
|
<p>Warmest regards,<br>
|
||||||
|
Davis Team</p>
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,10 @@
|
|||||||
Subject: AutoReply: {$Ticket->Subject}
|
From: Davis Method <test-queue@davismethod.com>
|
||||||
|
Subject: {$Ticket->Subject}
|
||||||
Content-Type: text/html
|
Content-Type: text/html
|
||||||
|
|
||||||
<p>A person has expressed interest in the Davis Method.<p>
|
<p>Congratulations! You have received a referral from the Davis Facilitator Directory. You can find the details of the lead by going to https://support.davismethod.com/form?id={$Ticket->id}&email={$Ticket->FirstCustomFieldValue('Facilitator Email')}&uuid={$Ticket->FirstCustomFieldValue('uuid')}.<p>
|
||||||
|
|
||||||
<p>They have provided the following information:</p>
|
<p>Please accept or reject the lead in the next 48 hours. If we do not hear from you, the referral will be reassigned.</p>
|
||||||
<pre>
|
|
||||||
{$Info}
|
|
||||||
</pre>
|
|
||||||
|
|
||||||
<p>If you are interested in this client, then please confirm your interest in this client in the next 48 hours by going to https://support.davismethod.com/form?{$uniqueID} <p>
|
|
||||||
|
|
||||||
<p>The Davis Team</p>
|
<p>The Davis Team</p>
|
||||||
|
|
||||||
|
|||||||
82
Scrip2.txt
Normal file
82
Scrip2.txt
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
# On create:
|
||||||
|
# - Sent email to requestor
|
||||||
|
# - Check queue, and transfer to new queue if required
|
||||||
|
|
||||||
|
# Custom condition:
|
||||||
|
|
||||||
|
my $txn = $self->TransactionObj;
|
||||||
|
my $type = $txn->Type;
|
||||||
|
my $ticket = $self->TicketObj;
|
||||||
|
|
||||||
|
return 0 unless $type eq "Status" || ( $type eq 'Set' && $txn->Field eq 'Status');
|
||||||
|
return 0 unless $txn->OldValue eq "new";
|
||||||
|
return 0 unless $txn->NewValue eq "Hub Not Assigned";
|
||||||
|
# To test by triggering change of status (Condition ^ above!)
|
||||||
|
|
||||||
|
#Only act in test-queue (safety for testing)
|
||||||
|
return 0 unless $ticket->QueueObj->Name eq "test-queue";
|
||||||
|
#Only act on creation
|
||||||
|
#return 0 unless $txn->Type eq "Create";
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
# Custom action preparation code:
|
||||||
|
require RT::Action::SendEmail;
|
||||||
|
use strict;
|
||||||
|
use vars qw/@ISA/;
|
||||||
|
@ISA = qw(RT::Action::SendEmail);
|
||||||
|
|
||||||
|
#STOP RACE CONDITION!
|
||||||
|
if ($self->TicketObj->Status() ne "Hub Not Assigned") {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
$self->SetRecipients();
|
||||||
|
$self->SUPER::Prepare();
|
||||||
|
$self->SUPER::Commit();
|
||||||
|
sub SetRecipients {
|
||||||
|
my $self = shift;
|
||||||
|
my $ticket = $self->TicketObj;
|
||||||
|
my ( @To, @PseudoTo, @Cc, @Bcc );
|
||||||
|
my $arg ='Owner,Requestor,AdminCc,Cc';
|
||||||
|
##Requestor
|
||||||
|
#push @To, $ticket->Requestors->MemberEmailAddresses;
|
||||||
|
push @To, $ticket->FirstCustomFieldValue('Facilitator Email');
|
||||||
|
|
||||||
|
my $creator = "Davis Admin";
|
||||||
|
@{ $self->{'To'} } = @To;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Custom action commit code:
|
||||||
|
#Move to Redacted Facilitator email sent.
|
||||||
|
|
||||||
|
my $ticket = $self->TicketObj;
|
||||||
|
my $facilitator = $ticket->FirstCustomFieldValue('Facilitator Email');
|
||||||
|
|
||||||
|
if ($ticket->FirstCustomFieldValue('Facilitator Email') eq '') {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if ($ticket->Status() ne "new") {
|
||||||
|
# return 1;
|
||||||
|
#}
|
||||||
|
|
||||||
|
#$ticket->Comment(Content => 'Script #22 - sending email to facilitator');
|
||||||
|
#$ticket->Comment(Content => 'Status is: '.$self->TicketObj->Status());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$ticket->Comment(Content => 'AUTO: Email sent. Facilitator is: '.$ticket->FirstCustomFieldValue('Facilitator Email'));
|
||||||
|
|
||||||
|
$ticket->Comment(Content => 'AUTO: Changing status to "Redacted Facilitator Email Sent"');
|
||||||
|
my ($status, $msg) = $ticket->SetStatus('Redacted Facilitator Email Sent');
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user