Epicor ERP Email Notifications: Self Opt-In/Out

08/08/2017 11:25 AM Comment(s)
If you've been running Epicor for at least a month, you know that someone wants an email notification when something happens.  Usually, it starts with PO Approvals, but as time goes on more and more users wish to be notified when something happens or changes in Epicor. 

 Before you know it, you have at least half a dozen BPM's that are emailing people and eventually either promotion or turnover happens and now those email notifications need to change.  BPM Email notifications and changes can quickly become an annoyance, but how to manage it?  There are many solutions to this problem:
  1. Email Distribution Groups: This is a good option and if you haven't done it yet, you should. This way your email administrator can help manage who receives the notifications but be sure to add a line in your BPM Email Template that informs the receiver why they are receiving the email notification and what distribution group is being used.  While it is possible for your email administrator to allow users to self-add and remove, many companies do not use this feature. However, if your company does, it could be an effective solution. (Here is a helpful Spiceworks post on this topic)
  2. Epicor Social Premium: While it doesn't have Email notifications (Yet? Will they ever add it?), it does allow users to follow and unfollow.  But maybe your business isn't willing to take on Social nor the cost.  Besides, it's still a bit of a closed system.
  3. Social Platforms: Such as SlackHipChatJiveSocialCast, and others that will receive emails and post them to a user/group/channel/room/stream/etc, allowing users to self-subscribe to email notifications.  (Evaluate your options carefully, some do one but not the other).  This can also allow your company to experiment with social technologies for free. If your company already uses one of these social platforms, give it a try. This is the option one of my clients decided to give a shot and it's worked out very well.

While you can use other social platforms, I will be demonstrating doing this with SocialCast. To get started, first head over to Socialcast.com and sign up for a free account. You will receive an email confirmation so you can set up your account (as an admin) and invite your first users. 

 As the last of my knowledge, the free account is limited in functionality and user count. However, everything shown in this article should work.  Please keep in mind that you cannot have more than 50 active users at a time, including you and an Epicor user account.


As the admin, you will need to setup many of the company accounts under Admin Settings in the "cog" menu.  For this to work, be sure to enable the "Email to Share" and "Respond to Messages" settings under Integrations > Add-Ons.

If you haven't already, you should create an email address on your email server for Epicor. An example would be Epicor@YourCompany.com.  You could just do this as an email alias on your own email account, as you will need to receive the SocialCast invite email to setup the Epicor user account.  Epicor will be one of the first SocialCast users you will need to invite.  Once you receive your Epicor user invite, go ahead and set it up with the appropriate details.
Now, we can test by creating a BPM that sends an email to the special SocialCast "Email to Share" email, "share@socialcast.com".  The way this works is that when share@socialcast.com receives an email, it looks up the "from" email address in the header in SocialCast and then posts the message to that user's feed.  For our test, we will send an email to SocialCast whenever a user logs in.
 In Epicor open Data Directives Maintenance from System Management > Business Process Management.


 Enter "SysUserFile" in the Table field.


Select "New Standard Directive" from the new menu.


Give the Directive a name like "EmailSocialcast".


Click on the "Designbutton.


Add a Condition Widget and select the "The specified field has been changed from any to another".


 Set "specified" in the phrase to "LastLogOnAttempt" field.


Add the Send E-mail widget and change the Action option from "asynchronously" to "synchronously" and then click on the "Designed" word.


Give the e-mail template a name like "EmailSocialcast".


 Set the From field. Enter the Epicor email address you created for the Epicor SocialCast account.


Set the To field to "share@socialcast.com".


In the Subject field, right-click and select Call Context > callContextClient > CurrentUserID, then press the space bar and type "has logged in!".


In the Message, clear out the existing contents and right click and select "Field Query".


 In the popup, set the name of the field to something like "MyFullName" and check the Updated records field and then find the Field Name called Name and check the box next to it and select "OK".

After the inserted token, press the space bar and type in "has logged in:" and press the enter key.
Right-click and select Table Query.
 Name the field "MyUserData" and check the Updated records field and then enable the following fields from the list: UserID,  LastLogOnAttemptPwdLastChanged and select "OK".
Review your template and then click the "OK" button if everything looks good.

Now, connect the Start Widget to the Condition Widget. 

Then, from the True side of the Condition Widget to the Send E-mail Widget, it should look something like this:

Select the Save and Exit button to get back to the Data Directive screen.  There, enable the Enabled checkbox and save.

Now, just log out of Epicor and log back in

Within a few minutes, if you monitor your SocialCast, you should see the email message populate as a post in the Epicor User Feed.


Once you have confirmed it works, you should recall the Data Directive in Data Directive Maintenance and disable the Enabled checkbox, Save, and Delete the Data Directive. Otherwise, you will be sending an email to SocialCast every time someone logs in. (Before deleting, I always save records where I have disabled something just to make sure any actions triggered by changing the value actually happen so that abandoned records are not accidently created).                                               

In SocialCast, email notifications can be sent on several things. To be able to only receive Email Notifications from certain BPM's, the email message needs to contain a tag, basically a # with a word following it; in this case we could add #loggedin

Once SocialCast has one post with the tag, each user can setup what is called a "Stream" for any message that contains that tag.  Then, the user can enable or disable email notifications for that Stream:
                 1.  Click on your SocialCast Company logo to go to your home page.

                2.   Once on Home, click on the Home Menu and select "New Custom Stream".

                3.   Now select the type of stream, "Tag/Keyword".

               4.  Give the Stream a descriptive name, like "Logged In". Your users can either create one stream that they". Your 

                       users can either create one stream that they are subscribed to and add additional tags or they can create a 

                       stream per tag.

5.  Type in the tags or keywords that should be included in the stream.

In this case #loggedin. I recommend using tags so that other unintentional posts are not included and notifying your users unnecessarily.

                6.   Now select the "Create Stream" button.  This will create the stream and take you to the stream.

7.   To receive emails for new posts to the stream, select the Stream's Cog icon and select "Receive Email".

                8.  To stop receiving emails from the stream, select the "Don't Receive emails for new posts".

Now, you just need to invite your users, train them on how to create and subscribe to streams, and convert many of your BPM's over to email SocialCast instead.  This isn't ideal for every situation, but for users who want to be in control of their notifications, this is a good option.  Some users may not even use the email notifications and instead just follow the Epicor user account or a stream.  Here are some ideas for BPM's notifications to SocialCast:
  • DMT PowerShell Activities
  • New Part Numbers
  • Parts added to a PO with Zero Std Cost
  • Nonconformance Created
  • New Customer Created
  • New Vendor Created
  • Part Bin Negative Qty on Hand
  • Corrective Action Issued
  • Certain PO's Have Closed (Watch List)

Really anything where a group of people could benefit from seeing the activity relatively close to when it happened.  This could even be used to kick off a process or discussion where everything is tracked as comments on the original post.  You could even use web services like Zapier and KissFlow together to kick off a KissFlow process by having an Epicor BPM email Zapier. Creative, flexible and quick to deploy integrated solutions like this is what I love to do.  How can I help you use tools like this to align your business and your software?

If you found this post helpful, be sure to like, share and comment.

Need help implementing this BPM or with anything else Epicor?

Contact me and let's get something scheduled!