PDA

View Full Version : injecting tickets


easel
10-23-2007, 03:39 AM
We have a lot of support requests come in via phone or to personal email addresses. I'd like to be able to 'log' these via cerberus, and handle emailed replies there as well. Whats the cool way to handle this? Sending emails to my ceberus box from my personal box doesn't seem to work very well for handling phone logs, nor does cc'ing my support@ address with a reply from my regular client.

Any ideas?

neenach2002
10-23-2007, 09:42 AM
Hey easel,

That functionality is currently in the works as a plugin. I also hope to develop some plugins for Cerb4.0 once I get my current project nailed down. We are currently on alert due to fires in our area so I have no idea when I'll be able to get started....currently on my tiny laptop screen...=-/

easel
10-23-2007, 02:14 PM
Hmm. I may end up having a look at the plugin api myself then, although frankly I'm trying to get out of my current home-grown CRM so I'm not very excited about it. I'm surprised it isn't higher demand feature, most other packages are focussed exclusively on injection it seems...

neenach2002
10-23-2007, 07:15 PM
Hey man, there's nothing wrong with doing your own development...though, maybe you don't have as much fun at it as I do ;)

easel
10-24-2007, 04:48 AM
Unfortunately, my job is to write software I can sell as opposed to software I can use =P

neenach2002
10-24-2007, 05:52 AM
So is mine, but, sometimes, we have to write software we can use so that we can sell software that we write to sell. ;)

MrKurt
10-24-2007, 04:18 PM
I've been using the "Send Email" function found in each workspace for this. I'll send a followup email from a phone conversation, and people can respond to that when convenient.

It would be nice to have an Outlook plugin that will convert an email conversation to a ticket, though. I've wanted one of those for every ticket system I've ever used. :)

jstanden
10-24-2007, 10:40 PM
I've been using the "Send Email" function found in each workspace for this. I'll send a followup email from a phone conversation, and people can respond to that when convenient.

That's what I've suggested people should do for now. We're working on a 'Call Logging' plugin -- but it's pretty safe to assume most people have an e-mail address you can log the call against in the meantime.

It would be nice to have an Outlook plugin that will convert an email conversation to a ticket, though. I've wanted one of those for every ticket system I've ever used. :)

Actually, with Outlook/Thunderbird/etc you can just drag an entire thread to the disk as files (or save source). Put those files in your /cerb4/storage/mail/new directory and the Parser Cron will pick them up, create a ticket and thread them.

A plugin to automate that a little more would definitely be nice. But there's no need to create a new "Cerb import" format when most desktop clients give you the message source.

MrKurt
10-25-2007, 06:32 PM
Hrm, I saved an email from Mail.app (in raw email format), dumped it in that directory, and no luck. Is there some voodoo I'm missing?

jstanden
10-25-2007, 07:56 PM
Did you run your cron? (Manually will give more output)

Did the files end up in /cerb4/storage/mail/fail?

Do you have a default destination in Configuration->Mail, or is it set to bounce? The default destination will allow you to handle mail that wasn't originally addressed ("To:") the helpdesk.

Thanks!

MrKurt
10-26-2007, 02:47 PM
I did run my cron, it all seemed to work fine. The email disappeared from the /new/ directory, and /fail/ is still empty.

There's a default route setup as well.

As an aside, the email parser doesn't seem to like files with spaces in their name.

MrKurt
10-26-2007, 08:38 PM
Here's the output from the job, when it does run:

Time Limit: unlimited secs
Memory Limit: 64M

Reading mail.msg...
Decoding... decoded! (2 ms)
Parsing... parsed! (0 ms) (Ticket ID: )

--------------------------------------------------------------------------------
Total Runtime: 3.42798233032 ms

jstanden
10-27-2007, 09:13 PM
Strange!

Would you mind sending me a copy of a mail.msg file? (Something without any sensitive info in it)

jeff(at)webgroupmedia.com

Thanks!

neenach2002
10-28-2007, 10:34 PM
I did the same thing, and it saves it with an extension of .eml, not .msg. Once we renamed it to .msg it seemed to work and imported the email.

MrKurt
10-31-2007, 08:27 PM
I emailed that .msg file over (all zipped up), so hopefully you can troubleshoot. :)

sbryson
11-02-2007, 02:28 PM
Seeing the same issue here.

I set up the scheduler for Inbound E-Mail Parser to parse 25 emails. I then dragged, out of MSOutlook 200 .msg files into a folder on my XP desktop and then SCP'd them to .../cerb4/storage/mail/new. Manually ran the Inbound E-mail Parser. It listed 25 entries, 5 had ticket IDs, 20 didn't. The .../fail folder is empty. 5 new tickets are in the Cerb4 inbox, all with the subject "(no subject)". The emails had subjects when saved out of Outlook.

When I get Cerb to show me the full headers of the 5 that got added they seem to be cut off.

Oh, and after seeing the previous note about "spaces in file names" .msg files not being parsed I thought that might be an issue, but all these files had spaces in their names as the file names are the Subject line from the email, and 5 still got parsed.

Could it be header length or special characters in the headers causing issues?

Specs:
RHEL5
Apache v2.2.3
PHP v5.2.4
Cerb4 (build 386)
Outlook 2003 on Exchange


Thanks,

Shane

Hildy
11-02-2007, 06:53 PM
Could be... can you send a few of those files in to bugs@cerberusweb.com (sanitize as necessary) so we can do some debugging on them?

sbryson
11-02-2007, 09:18 PM
Submitted with 2 .msg samples, the output from the importer, and the contents of a Cerb4 inbox mail with full headers showing the truncation of the headers.

Hildy
11-02-2007, 11:57 PM
I replied to Shane's ticket, but just to post here as a reminder to myself and others (I'd forgotten since it's been years since I've used Outlook):

The Outlook .msg format is an undocumented, proprietary, binary, format. Cerberus does not understand this format (and never will). There do not appear to be any direct exporters for Outlook, though there are programs advertised as being able to convert PST files to standard, plain-text, email. Having never used any of them, I cannot vouch for their abilities.

jstanden
11-03-2007, 05:22 AM
Can't Outlook export raw RFC messages nevertheless?

I guess we'll have to set it up for an extracurricular mini-project.

MrKurt
11-06-2007, 10:10 PM
If there were some sort of API available for loading up messages, I wouldn't mind whipping up an Outlook plugin to use it. I'm hesitant to do so without an API, though.

Hildy
11-06-2007, 10:17 PM
Do you mean an API for Cerberus? You shouldn't need one. We import messages in raw text format, same way you'd see it come over the wire in the DATA section of a SMTP session. Basically, 7-bit ASCII, headers first, blank line, then body.

I may be misinterpreting, though, so let us know what you need...

MrKurt
11-07-2007, 03:00 AM
I primarily meant an API to get the messages to Cerberus... rather than writing them to a filesystem (I suppose the API could do that). Now that I think about it, though, I can probably just redirect them to an email somehow.

jstanden
11-07-2007, 05:58 AM
Sure!

What Dan was getting at is the easiest way to import mail, which is just to dump raw RFC-822/2822 e-mail messages as files into /cerb4/storage/mail/new

That path acts like an MTA's mail queue, and Cerb4 routinely checks it for new mail to import. You could pipe mail there directly, copy it from any exporter, download it from POP3 using something like fetchmail, etc.

You could use the API directly to do the same thing, but then you'd need to worry about other considerations.

If the mail you wanted to import wasn't already in RFC-822 format (let's say it came from a spreadsheet or some such crazy thing), then you could use the API since it's already abstracted from raw e-mail.

A good example is in the Simulator plugin (/cerb4/plugins/cerberusweb.simulator/) in the classes.php file and generateTicketsAction() method:


$message = new CerberusParserMessage();
$message->headers['from'] = $template['sender'];
$message->headers['to'] = $address;
$message->headers['subject'] = $template['subject'];
$message->headers['message-id'] = CerberusApplication::generateMessageId();

$message->body = sprintf(
"%s\r\n".
"\r\n".
"--\r\n%s\r\n",
$template['body'],
$personal
);

CerberusParser::parseMessage($message,array('no_au toreply'=>true));
But in all practicality, it's even less work to dump arbitrary data into RFC-822 format as well.

Saving to files is likely a hangup if you wanted to do the imports in an ongoing fashion, as a form of integration. If that's the case then you'd quite possibly want to use the API from a plugin. You could implement a new controller like /cerb4/post which would accept an HTTP Post in whatever format you want (e.g., RFC, XML), secured however you want (e.g., by IP, by passphrase, by certificate).

However, you could also just divert a copy of incoming mail into an additional IMAP/POP3 mailbox for Cerberus and skip the Outlook step altogether (after all, it has to be getting its email from somewhere too).

But if this would be a one-off syncing from an outside source (like Outlook), then I'd definitely just export them as files and let Cerberus read them in efficiently.

I don't mean to over-complicate the discussion, there are just a lot of ways to go about what you're talking about. It really depends on exactly what you're trying to do. Knowing that, I can almost guarantee there's a way to do it with Cerb4. ;)

MrKurt
11-07-2007, 03:57 PM
I basically just want an easy way to "promote" an email (or email thread, if possible) from Outlook to Cerberus. People email me directly waaay too often. :)

At the moment, "Resent this Message" and changing the To address seems to work, which is kinda cool.