I'm already using a rule that sends an e-mail if the order status is updated, this e-mail also includes the last comment (through the [order:last-comment] token).

But now I want to build a rule which sends an e-mail with the last comment only, because I don't want the customer to be confused (when he sees an order status that hasn't changed).

Is this possible?

CommentFileSizeAuthor
#10 1975754-10.patch3.25 KBtr
#8 1975754-8b.patch3.25 KBtr

Comments

longwave’s picture

Status: Active » Fixed

If you use the "Send an order email" action in Rules you can include whatever tokens you like in the email body; [order:last-comment] will include the last comment.

remkovdz’s picture

Thanks, but... is there also a suitable event to react on? There is no such thing as a "New comment entry" event?

longwave’s picture

Title: How to send e-mail with ONLY last comment through rules? » Add an "order comment has been added" Rules action
Version: 7.x-3.2 » 7.x-3.x-dev
Category: support » feature
Status: Fixed » Active

Oh sorry, you didn't mention you actually wanted to send the email when the comment was entered :)

Changing to a feature request.

remkovdz’s picture

Ok!

tr’s picture

Version: 7.x-3.x-dev » 8.x-4.x-dev
Issue summary: View changes
tr’s picture

Title: Add an "order comment has been added" Rules action » Add an "order comment has been added" Rules event

Changed title.

This is for adding a Rules Event to fire when an order comment has been added. Use cases would be to give the admin notice that the customer added a comment, or to notify the customer if the admin added a comment.

Maybe also an "Add order comment" Action so that order comments may be automatically added by Rules in response to some event (for example, changing order status to "shipped" could trigger an order comment noting that the order shipped and entering the tracking number...)

Will be working on this for D8 only.

tr’s picture

Component: Orders » Rules

Added "Rules" component.

tr’s picture

Status: Active » Needs review
StatusFileSize
new3.25 KB

I see we already have an "Add an order comment" action, so that doesn't need to be done.

The attached patch just adds the "An order comment is added" Event.

Status: Needs review » Needs work

The last submitted patch, 8: 1975754-8b.patch, failed testing. View results

tr’s picture

Status: Needs work » Needs review
StatusFileSize
new3.25 KB

Funny, applied just fine on my machine...

  • TR committed 9fc071a on 8.x-4.x
    Issue #1975754 by TR: Add an "order comment has been added" Rules event
    
tr’s picture

Status: Needs review » Fixed

Committed.

tr’s picture

Version: 8.x-4.x-dev » 7.x-3.x-dev
Status: Fixed » Patch (to be ported)

Let me mark this for backport to 7.x-3.x. I don't have plans to work on it myself ...