Notifications from your WordPress powered app

Product Business

Use WordPress to build your app

I've written before about the use of WordPress as an application framework before. The result can be a quick route to a WordPress powered app. If you want to read more about that kind of stuff, there's no one better than Tom McFarlin.

That's the good news.

There are lots of little things to think about

The sad reality is that if your experience is anything like mine, the first 80% of the project are quick. It's the last 20% that take forever. And that's no fun.

One of the little things to think about is notifications.

Application Infrastructure

When you start using WordPress to build your application, you often use Custom Post Types (CPTs), and if you get into it, you'll likely create your own taxonomies. And maybe you'll even create your own post statuses. All of that is normal because you're taking “posts” and turning them into objects you'll be using in your system.

These objects represent something in the real world, and so do the statuses they move in and out of and that's when you realize you'll likely want to send out notifications when those statuses change.

It's not tons of work, but it's work. And you may find that you have to keep writing more and more code because of all the objects you've added to your system and the statuses you've created.

A Simple Example

Imagine you created a simple expense management system from WordPress.

You'd create CPTs for:

  • Employee
  • Expense Report
  • Expense Line Item

And Taxonomies for things like:

  • Division
  • Department
  • Expense Item Type

And, of course, you'd likely create post statuses for:

  • Expense Report
  • Expense Line

If you do all of that, you likely know what's coming next.

You need notifications:

  • Every time an expense report is submitted, email the employee who has to review it.
  • Every time an expense report is approved, email the employee who submitted it.
  • Every time an expense report is rejected, email the employee who submitted it.

A quick find over at Code Canyon

While I was browsing at Code Canyon tonight (yes, I was on a mission to find a specific utility plugin that I'll tell you about at another time), this plugin caught my eye.

It is a post status notifier. It lets you create rules and templates for all the emails that your WordPress powered app will send out—either thru server-based email, or better yet, via SMTP settings.

Last year I worked on a project where we had a lot of CPTs and post statuses. We also had rules to trigger emails. And apparently, this whole time, I could have used this plugin to solve my problems.

So I sat down and cranked out this note to let you know that it existed. Because if I save you time, it will be worth your $21.

Good luck, and let me know how it worked for you.