<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=ExtractCustomFieldValues</id>
	<title>ExtractCustomFieldValues - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=ExtractCustomFieldValues"/>
	<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=ExtractCustomFieldValues&amp;action=history"/>
	<updated>2026-08-22T22:59:18Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=ExtractCustomFieldValues&amp;diff=1235&amp;oldid=prev</id>
		<title>Admin: 3 revisions imported</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=ExtractCustomFieldValues&amp;diff=1235&amp;oldid=prev"/>
		<updated>2016-04-06T20:08:59Z</updated>

		<summary type="html">&lt;p&gt;3 revisions imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The [[ExtractCustomFieldValues]] extension permits use of a relatively simple template to set Custom Fields with data extracted via regexps.&lt;br /&gt;
&lt;br /&gt;
[http://search.cpan.org/dist/RT-Extension-ExtractCustomFieldValues/ RT::Extension::ExtractCustomFieldValues on CPAN]&lt;br /&gt;
&lt;br /&gt;
Syntax:&lt;br /&gt;
&lt;br /&gt;
 cf-name | Headername or &amp;quot;Body&amp;quot; | MatchString(re) | Postcmd | Options&lt;br /&gt;
&lt;br /&gt;
Example usage:&lt;br /&gt;
&lt;br /&gt;
 Issue Type|X-QCF-IssueType|.*||q|&lt;br /&gt;
&lt;br /&gt;
(option q = don&amp;#039;t record a transaction for adding the CFV)&lt;br /&gt;
&lt;br /&gt;
1. Create a Scrip: [[ExtractCF]] On Create Extract Custom Field Values with template [[CustomFieldExtract]] Script Fields:&lt;br /&gt;
&lt;br /&gt;
 Description: ExtractCF  Condition: On Create  Action: Extract Custom Field Values&lt;br /&gt;
 Template: CustomFieldExtract  Stage: Transaction Create&lt;br /&gt;
&lt;br /&gt;
2. Create Template [[CustomFieldExtract]] for the specific queue, which contains:&lt;br /&gt;
&lt;br /&gt;
 Company ID|X-QCF-Companyid|.*||q|&lt;br /&gt;
 Client Type|X-QCF-Clienttype|.*||q|&lt;br /&gt;
 Organization Name|X-QCF-OrganizationName|.*||q|&lt;br /&gt;
 Name|X-QCF-Name|.*||q|&lt;br /&gt;
 Address 1|X-QCF-Address1|.*||q|&lt;br /&gt;
 Address 2|X-QCF-Address2|.*||q|&lt;br /&gt;
&lt;br /&gt;
Spaces are allowed in the RT custom field names, but will not work in the Headers.&lt;br /&gt;
&lt;br /&gt;
To extract info from the Body of the message: Use a key word such as &amp;quot;Question-comment:&amp;quot; to import into your custom field &amp;quot;Details&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
 Details|Body|Question-comment-&amp;amp;gt;(.+)$|q|&lt;br /&gt;
&lt;br /&gt;
There were some errors when using a &amp;quot;:&amp;quot; after the header name, such as&lt;br /&gt;
&lt;br /&gt;
 Resolution|Body|Resolution:(.+)$|q|&lt;br /&gt;
&lt;br /&gt;
since it was interpreted as a command. Had better luck using &amp;quot;-&amp;amp;gt;&amp;quot; instead.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Changes to [[RT SiteConfig|RT_SiteConfig]].pm for extracting custom fields:&lt;br /&gt;
&lt;br /&gt;
We needed more contact info included in messages created for new tickets than RT&amp;#039;s default was providing. So we had to enable this in [[RT SiteConfig|RT_SiteConfig]].pm:&lt;br /&gt;
&lt;br /&gt;
 Set($UseTransactionBatch , 1);   # and restart the web server&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Capturing CC (Carbon Copy) addresses into RT&lt;br /&gt;
&lt;br /&gt;
Did you ever want to know who was CC&amp;#039;d on an original message to RT, but couldn&amp;#039;t see that information after it was processed by RT? Here is how to grab the Cc: field into a custom field and display it at ticket creation.&lt;br /&gt;
&lt;br /&gt;
Create custom field for your queue called [[CarbonCopy]].&lt;br /&gt;
&lt;br /&gt;
In template, [[CustomFieldExtract]]:&lt;br /&gt;
&lt;br /&gt;
 CarbonCopy|Cc|.*||q|&lt;br /&gt;
&lt;br /&gt;
In template Transaction (in this case, On Create Notify [[AdminCcs]] with template Transaction, Stage:[[TransactionBatch]]):&lt;br /&gt;
&lt;br /&gt;
 Copied to: {$Ticket-&amp;amp;gt;FirstCustomFieldValue(&amp;#039;CarbonCopy&amp;#039;);}&lt;br /&gt;
&lt;br /&gt;
Then each creation autoreply will have the list of which address(es) was CC&amp;#039;d.&lt;br /&gt;
&lt;br /&gt;
updated by Mark Sallee - May 2010&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>