Deprecated: Array and string offset access syntax with curly braces is deprecated in /www/wp-content/plugins/Ultimate_VC_Addons/admin/bsf-core/auto-update/admin-functions.php on line 11 Using Business Events to Create Transactions - Employee Birthday Checks

Using Business Events to Create Transactions – Employee Birthday Checks

Business Events in Acumatica

Acumatica ERP Business Events provide a powerful platform to monitor data and events and to create actions such as an email notification or an import scenario. This post will demonstrate the flexibility of Business Events and how they can be used to update business data.

Our demonstration company has a practice of sending employees a “Happy Birthday” check the week of their birthday. While Recurring Transactions could be defined, the management of them could become cumbersome. To address this need we will use a Business Event with a Generic Inquiry that identifies upcoming birthdays and an Import Scenario that creates AP Bills. Additionally, we will inform an administrator that AP Bills were generated.

Before we dig into our Birthday Check Business Event, let’s review the primary elements of a Business Event. The elements are:

Business Events in Acumatica

Our Birthday Check Business Event will take the action of initiating an import scenario on a schedule for all results that meet our conditions.

The Birthday Check Business Event

As noted above, the Birthday Check Business Event is a schedule-based event using a Generic Inquiry that identifies specific employees. The screens below will describe the Generic Inquiry, the import scenario, a notification and the schedule.

Business Events in Acumatica

The Data to Monitor

We created a Generic Inquiry based on our employee table using the data of birth to determine our selection and to define the fields that will be used by our Import Scenario to create AP Bills. Our Trigger Conditions return employees who have a birthday in the next two weeks. This will provide sufficient time to process payments and for the check to arrive in time for their birthday.

Our Generic Inquiry includes only Active Employees and uses a CDate formula to calculate the employee’s birthday for the current year. Our Generic Inquiry also uses a variety of formulas to assign an invoice date, number and amount.

Business Events in Acumatica

Business Events in Acumatica

We added a filter to the Results of our Generic Inquiry to match the condition set on the Birthday Check Business Event. This provides a preview of what is to come and can serve as a reconciliation/comparison tool.

Business Events in Acumatica

 

The Action(s) To Take

With our data to monitor defined we need to set the actions to take. Our actions will be an import scenario and an e-mail notification to our administrator.

Business Events in Acumatica

Our Import Scenario defines the screen name, provider, and provider object to support the mapping and fields to update. The Business Event will only pass the employees that meet our condition (their birthday is two weeks away).

Business Events in Acumatica

After the Import Scenario is complete we will send an e-mail notification. We used the Notification Templates form to define our e-mail message:

Business Events in Acumatica

The <foreach> and </foreach> are used to list the event’s data.

When to Act

We created a schedule to run every week on Friday afternoon:

Business Events in Acumatica

The Result

On Friday afternoon, two things happen: our bills are created and our administrator is notified.

The AP Bills

Business Events in Acumatica

The Notification

Business Events in Acumatica

Extending the Concept

Acumatica has shared similar examples of updating data such as creating a task for someone to complete when an event occurs (this was shown at Acumatica Summit 2019) and updating the status of Support Cases (this was shown in a Technical Tuesday post). The framework described above, and in the other examples, can be used as a model to create or update virtually any data in Acumatica. The possibilities are endless – let us know what you come up with. Happy building!

We have shown how Business Events provide a way to monitor data and events and create actions through configuration specific to business needs and to help automate unique processes as well as increase efficiency and improve communication. If you have questions about Business Events, Generic Inquiries, or Import Scenarios or need assistance with these areas, please contact us at support@crestwood.com.

Leave a Reply