PDA

View Full Version : API - Create tickets that generate an email to the customer


rachelg
05-10-2008, 02:51 PM
It would be great if using the API, I could create a new ticket, that generates an email to the customer.

For instance, our accounts system has an API that can tell us when an invoice is overdue, I want to be able to use this info, to generate a ticket/email to the customer informing them that they are overdue.

I am aware of "parser" but do not believe it works this way? Or does it?


Thanks

Rachel

Hildy
05-12-2008, 06:16 PM
Yes and no....

The parser only parses email. It doesn't really care about who it's from / to, it just goes through the normal parsing process. The way to do what you're asking with the REST API as it currently stands is a little more complicated, but it's not too bad. Basically, you first parse a fake email from the customer (to get the ticket created), then you parse a fake email from a Worker account that's "replying" to the ticket you just created, and the system will forward your response to the customer.

I haven't gone through and tried it, so this may not be exact, but, send:
From: customer@domain.com
To: support@rachelg.com
Message-ID: <something_unique@rachelg.com>
Date: Fri, Aug 23, 1996 7:00 pm
Subject: Invoice Overdue

This ticket was autogenerated on behalf of customer@domain.com, who has an overdue invoice.

Then, send a second email, like so:
From: Rachel.G@rachelg.com
To: support@rachelg.com
Message-ID: <something_else_unique@rachelg.com>
In-Reply-To: <something_unique@rachelg.com>
Date: Fri, Aug 23, 1996 7:00 pm
Subject: Invoice Overdue

Dear Customer,

Our records show that your Invoice #49217, for $365.33, is 8 months past due. Please contact us ASAP to resolve this.

The "In-Reply-To:" header on the second one is critical, because it's what ties the second email to the first ticket. The only caveat to doing things this way is that the email the customer receives will be titled "Re: Invoice Overdue".

rachelg
05-12-2008, 08:07 PM
Thanks that's going to help me alot with automating (everything?)

Obviously if you add functionality to do it without running into the Re: problem, this would be fantastic!

Thanks!

Rachel