AnyTransactionSource: Difference between revisions
m (3 revisions imported) |
(No difference)
|
Revision as of 15:03, 6 April 2016
Overview
In addition to using RT to receive requests from customers, we also use it to send notices or requests to customers and vendors. This gives us a complete log of both incoming and outgoing communications.
The problem is that RT by default isn't designed to make outgoing e-mail easy. In the default state one must create a ticket then reply to it to get the correspondence sent to the requestor (who is the customer/vendor you want to send mail to). There is also the problem of autoreplies upon ticket creation.
These problems are easily resolved by using the AnyTransactionSource ScripCondition provided by Florian Weimer and the RUS-CERT team at University of Stuttgart.
You can find Florian Weimer's posting describing AnyTransactionSource in the mailing list archives here: http://lists.bestpractical.com/pipermail/rt-users/2003-January/011567.html
I have spent some time implementing this in our RT3 installation and have documented the steps required as I wasn't able to find any previous documentation on the subject for RT3.
How to set up AnyTransactionSource in RT3:
1. Copy the AnyTransactionSource.pm ScripCondition (courtesy NETWAYS ) to your local RT3 customizations area:
/path/to/rt3/local/lib/RT/Condition/!AnyTransactionSource.pm
2. Save the following code in a datafile named AnyTransactionSource.insert on your server. In this context, "internal" means "staff" and "external" means "customers":
@ScripConditions = ( { Name => 'On Create External', Description => 'When a ticket is created externally', ExecModule => 'AnyTransactionSource', Argument => 'external', ApplicableTransTypes => 'Create' }, { Name => 'On Create Internal', Description => 'When a ticket is created internally', ExecModule => 'AnyTransactionSource', Argument => 'internal', ApplicableTransTypes => 'Create' }, { Name => 'On Correspond External', Description => 'Whenever external correspondence comes in', ExecModule => 'AnyTransactionSource', Argument => 'external', ApplicableTransTypes => 'Correspond' }, { Name => 'On Correspond Internal', Description => 'Whenever internal correspondence comes in', ExecModule => 'AnyTransactionSource', Argument => 'internal', ApplicableTransTypes => 'Correspond' }, );
3. Run the RT3 Setup Database tool specifying to insert the datafile just saved. This will create the ScripConditions in RT's database.
/path/to/rt3/sbin/rt-setup-database --action insert --datafile /path/to/AnyTransactionSource.insert
4. Change your existing On Create autoreply scrip to use the "On Create External" condition instead of the "On Create" condition it currently uses.
5. Add a new scrip:
Condition: On Create Internal Action: Notify Requestors and Ccs Template: Correspondence
When finished, tickets created externally by your users, will still receive the auto reply. Tickets created internally by your staff will automatically send the message entered as correspondence to the requestor specified. The "requestor" will not receive an auto reply.
Contributed by BillGerrard
Note
You cannot use this to distinguish if a ticket has been created via e-mail or via the SelfService interface. For that see OnWebCorrespond.
The original AnyTransactionSource.pm seems to have vanished; thanks to NETWAYS for having a copy in their git repository.
See also OnCreateFromEmail.