Basic Email Alerts / Event Based Alerts

Something that I don’t see talked about very often is the Event Based Alerts built in to M3, it’s a cheap, quick and easy way to notify people that something happened within M3.

We of-course have the options of using e-Collaborator or ION, but that feels a little heavy handed for a number of tasks.

This is a quick rough guide on how we can create a lightweight event that will notify us when the full description of an item changes.

Programs we will use:

CMS045 – M3 Event Subscription. Open
CMS047 – M3 Event Based Alerts. Open
CRS111 – M3 e-mail Address. Open
CRS427 – M3 Application Message E-mail Param. Open
CRS424 – M3 Settings – Application Messages

CRS420 – M3 Application Message. Open
MNS051 – M3 Subsystem Job. Open

Setup

There are several things that we need to set up before we can generate the emails – some are not terribly easy to find.

M3 BE Email Set Up

Tell the M3BE where to relay the emails through, in my test I’m using mail.indfish.co.nz

Turn on the Event Based Application Messages

We need to enable the Activity code tickbox so we get application messages from events.

Application Messages – EMail

Allow the application messages themselves to generate emails – this is by user.

Set up the email addresses

MOVEX is the email address associated with the sender. I’ve set up an email address against my user aswell.

Creating the Event Itself

Because we are looking for changes to the MITMAS table, we need to call our event name MITMAS, the event name op. is the type of operation, so U for update. The publisher is M3.

We are going to use CMS911 events

This will take us back to the ListView.

Right click on our newly created entry and select Related Options -> Event based alerts

This takes us to CMS047 where we can create rules / edit our events.

We supply a name and description.

Set the status to 20.

As we are the Full Description, I’m setting the first rule to Alphanumeric, I’ve selected the 4 letter field which is FUDS, and we will fire when the value has changed.

Finally, the Alert Message is the message that we will send in the body of the email and the Receiver is the person who will get the alert. If we set them up in CRS427 then they will be emailed the alert.

The help for each of the fields is pretty helpful.

We need to change our CMS045 record to status 20.

Now we need to restart the CMS911 Autojob in MNS051 to pick up our changes.

Testing

Finally, we can test. I’ll change the full description of a product

And we will eventually get an email notification like this:

You can also see the event in the CRS420

This entry was posted in M3 / MoveX, Misc. Bookmark the permalink.

4 Responses to Basic Email Alerts / Event Based Alerts

  1. Jonathan Amiran says:

    Cool post!
    1. After changing the util.mail properties, you should restart Subsystem:A (Autojobs) for it to take effect.
    2. In CMS047/E, instead of receiver name , you can type File: MITMAS, Field:RESP and it will dynamically send the mail to the item responsible (I also add to the formula that CHIDRESP).

    Jonathan

  2. maxric says:

    Hi there. Nice post. I am absolutely fond of EventHub. It is a great tool for such alerts and/or trigger interfaces with EventAnalytics. If i order right now 2 salmons, does it trigger an alert on your system ??

    • potatoit says:

      Thank you.
      Event Hub and Analytics is definitely something that I want to spend more time exploring. I’ve always preferred push rather than pull models.

      Salmon – well we’re alerted to all! 🙂

  3. Qasim says:

    Hi there, really helpful post.
    i have a question, i noticed that in the image showing the settings in the LCM there are only settings for Mailer, Protocol, SMTP_Host, IP_Address.
    i am also seeing other settings alongside the above. smptserverport, cryptographic.protocol, username and password.

    would i need to also fill out the the second set of settings aswell?

    kind regards,
    Qasim

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s