send email when pending auto close

Moderator: crythias

Post Reply
rvwmgk
Znuny newbie
Posts: 55
Joined: 10 Mar 2015, 17:40
Znuny Version: OTRS 4 Free

send email when pending auto close

Post by rvwmgk »

We want to start using "pending auto close+".

When the ticket auto closes, we would like to send an email.

Is it correct to understand this should be created in Admin > Ticket Settings > Notifications (Event) ?

In Notifications I had selected TicketPendingTimeUpdate but I guess that is wrong.

Perhaps I should be using TicketStateUpdate instead?
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: send email when pending auto close

Post by crythias »

rvwmgk wrote:When the ticket auto closes, we would like to send an email.
It's your standard notification event on state update matching the close state (closed successful) that is set after pending expiration.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
rvwmgk
Znuny newbie
Posts: 55
Joined: 10 Mar 2015, 17:40
Znuny Version: OTRS 4 Free

Re: send email when pending auto close

Post by rvwmgk »

Is it correct to understand this will send 2 emails when we use another state, for example: "closed with success"?

1. the reply will be sent
2. the event notification will be sent

:-?
rvwmgk
Znuny newbie
Posts: 55
Joined: 10 Mar 2015, 17:40
Znuny Version: OTRS 4 Free

Re: send email when pending auto close

Post by rvwmgk »

Please ignore my post. Found it myself.

State can be defined in the event notification settings: just select there the "pending auto close+" state and no email will be sent for the "closed with success" state.
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: send email when pending auto close

Post by crythias »

I'm pretty sure you'll want to change that to closed with success, unless you want to send the notification before it's closed.
rvwmgk wrote:When the ticket auto closes, we would like to send an email.
The reason I say this is that a response from the customer will interrupt (usually) the pending.

Agent Response: "Hey, we're closing the ticket in 2 days. We did this and that to address your ticket." [Next State Pending AutoClose +]
Customer Response: "Thank you" [state is now "open"]
Agent set ticket Pending again (?) [Pending? Closed? -- the customer didn't have an actionable followup]
Time passes
Ticket is closed. [Closed Successful]

At what point would you think it's necessary to send another email?
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
rvwmgk
Znuny newbie
Posts: 55
Joined: 10 Mar 2015, 17:40
Znuny Version: OTRS 4 Free

Re: send email when pending auto close

Post by rvwmgk »

What we are trying to accomplish is a short email when the system closes the ticket.

If a response from the customer will interrupt (usually) the pending, that is fine. In fact that is what we want: a reply from the customer.

Example:

1. Agent Response: "Hey, we're closing the ticket in 2 days. We did this and that to address your ticket." [Next State Pending AutoClose +]
2. Customer is unresponsive...
3. System closes the ticket (from Pending Auto Close+ to Closed with success) + send an email
4. Now Customer finally responds
5. We win; we have what we wanted

My problem: the emails is not sent...

I am testing Notifications (Event):
http://www.example.com/otrs/index.pl?Ac ... ationEvent

1. I have created a Notification where Event = TicketStateUpdate

2. for Ticket Filter I did the following:

Type: I did not select anything - do I have to?
State: I selected closed with success and closed without success - or do I select pending auto close+ and pending auto close- ?
Priority: I did not select anything - do I have to?
Queue: I have selected my desired queues
Lock: I did not select anything - do I have to?
CustomerID: I did not select anything
Customer: I did not select anything

3. In the Article Filter (Only for ArticleCreate and ArticleSend event) I selected:
- Article type: email-notification-ext
- Article sender type: system

4. for Recipient I added <OTRS_CUSTOMER_From> as Recipient email addresses.

But the emails are not being sent:

StateUpdate Old: "pending auto close+" New: "closed with success" - Admin OTRS 14/07/2015 10:45:01
SetPendingTime Updated: 00-00-00 00:00 - Admin OTRS 14/07/2015 10:45:01
Unlock Unlocked ticket. - Admin OTRS 14/07/2015 10:45:01

What am I doing wrong?
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: send email when pending auto close

Post by crythias »

rvwmgk wrote: In the Article Filter (Only for ArticleCreate and ArticleSend event) I selected:
- Article type: email-notification-ext
- Article sender type: system
not necessary. You're not filtering on those events.

Make sure the event notification is valid.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
rvwmgk
Znuny newbie
Posts: 55
Joined: 10 Mar 2015, 17:40
Znuny Version: OTRS 4 Free

Re: send email when pending auto close

Post by rvwmgk »

- I have removed everything in Article Filter

- notification is valid

- for Ticket Filter do I have to specify there Type, Priority, and Lock?

If I did not select anything there, will it just take all?
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: send email when pending auto close

Post by crythias »

filter will only filter on what's specified and assume "matches all" if not specified.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
rvwmgk
Znuny newbie
Posts: 55
Joined: 10 Mar 2015, 17:40
Znuny Version: OTRS 4 Free

Re: send email when pending auto close

Post by rvwmgk »

I have erased everything in Tickt Filters and Article Filters.

But the mail is still not being sent.

Any other suggestions?
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: send email when pending auto close

Post by crythias »

rvwmgk wrote:I have erased everything in Tickt Filters and Article Filters.

But the mail is still not being sent.

Any other suggestions?
If someone wrote that to you, what would you say? I'd say, "What? You removed everything and expected it to do something?"
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
rvwmgk
Znuny newbie
Posts: 55
Joined: 10 Mar 2015, 17:40
Znuny Version: OTRS 4 Free

Re: send email when pending auto close

Post by rvwmgk »

crythias wrote:filter will only filter on what's specified and assume "matches all" if not specified.
Well, that someone is you! :D

I presumed if nothing is selected it will match all.

I will now test the opposite; I will select all and post the results here. ;-)
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: send email when pending auto close

Post by crythias »

Maybe it would be better if you provided a screenshot of what you did do. You can upload and embed within this forum directly.

You should basically set:

Notification Event Ticket State Update
Filter destination state (closed successfully)
Set recipient(s)
Subject
Body
Valid

That's (basically) it. but unfortunately it sends all the time on close ticket. It has not ability to know this is a [close ticket because it was pending before]. *A* way to get around this is to create a new state of type "closed" called, for example, "Closed due to pending", choose that as the state-after-pending in SysConfig and then use that state as criteria above.

Also look at the history of the ticket and see if it *tried* to send the notification. If it did and the recipient did not receive the notification email, then it is ]possibly] an issue with the notification sender email address, which is a completely different issue.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Post Reply