Business Central Service Management Email Queue πŸ“¨

The service management module of Business Central has an emailing feature which is designed to inform internal employees if service level agreements (SLA) are being missed. It also has a feature to update a customer on completion of a repair for a specific service item. The standard documentation on this area isn’t that great. Therefore I will explain in brief more about the feature and the required setups to make the most of it. At the time of writing this area is not part of the enhanced email capabilities and has little scope for configuration. An area I hope that improves in the future.

Part 1 is the Internal warning emails:

In the service management setup page you can determine the duration of time (in hours) that a series of warnings should fire off to internal staff members. In the “Send <> Warning To” fields just add the email address. It could be the same person each time or it could be a group email, the choice is yours.

Now that’s in place how is it being calculated that something has hit a “warning”? Over on a service contract we start to piece the puzzle together:

Each service item line can have a differing “Response Time (Hours)”. Note you can set this at header level too – in the “Service” fast tab. In my case the time to respond is seconds – like to set the bar high πŸ˜‚ worth noting here that a service item must be part of a service contract for the SLA to count.

Once a service order is logged we have a date and time for that taking place – “Order Date”, “Order Time”.

This data coupled with the “Response Time (Hours)” value on the order, which just so happens to come from the service contract, gives us the expected SLA.

You can see the detail on the line level of the service order. Note it is the calculated value. In an earlier screenshot there is a field called “Warning Status” – this is where we can see what warning message has been sent. In my case it will jump straight to the third warning. Of course in a real life scenario it will step through as the clock ticks. Worth noting that the message will only ever happen once. So, if a user manually resets to the “Warning Status” but a message about it has already been sent then no new message will appear.

**Emails will only send if the Service Order has a status of Pending and the service order line has a “Repair Status Code” which is marked with “Initial” true** The out of the box setup here is something worth sticking to if you can but if you have your own repair status codes then I am referring to this setup:

In the case the service order line must be INITIAL for a warning email to send. Which effectively means, no one has started working on it yet. The interesting pat about this is when you have a multi line service order and you start work on it the overall “Status” of the order changes. Again I will state only “Pending” service orders get warnings. This is a good use case for the setup option “One Service Item Line/Order” – which would then give you greater control over getting warnings for all service items πŸ‘

So, what do we need for the emails to start flying out? Two codeunits adding to the job queue entries page. Set them up to run as you need.

An example of the data in the service email queue:

Thing we can’t do is configure the “Subject Line” – would like that to change in future releases. If we need different detail then a customisation is needed here 😐 The table has a “Body Line” field which then produces the below email:

Part 2 – Customer notifications

A customer can be kept informed of the order with email messages when the codeunits from part 1 are in place. On the header of the service order there is a field called “Notify Customer” with a series of set options. Unfortunately, as standard the field is blank when the header is created. You would expect it to be linked to a customer record or even set at service order type, but no…..This means we have to set this manually per order, without customisation. You will also need the “Email” field to be populated, as standard it is blank too πŸ‘€ – you can see what I mean by having this area catch up with the enhanced email features:

To trigger an email to the chosen address you must mark the “Repair Status Code” to a value which sets the overall service order “Status” to Finished.

Upon doing that you will get this kind of message:

Unlike the warning messages this one will fire off multiple times if you chop and change the repair status code:

Final email looks like this. Again, with no current configuration options for changing what the email body is…

Some limitations in the standard offering but could be a nice thing to use if you have this module. The details mentioned are applicable to older versions of NAV which have the same module.

Business Central Inventory/Sales Analysis – Item Group Dimension Code❓

I’ll be the first to admit that when I don’t locate a report in BC I will knock something up in Jet Reports or Power BI. Nothing wrong with that approach, as you often end up with something that has nicer visuals and better aggregation. However, when possible shouldn’t we push the boundaries with standard? When it comes to inventory or sales analysis what can we do? Finance have account schedules. Well, if you weren’t aware, inventory/sales analysis have a similar set of options. Search for “Sales Analysis Report” or “Inventory Analysis Report”. There are some good blogs for explaining the necessary setups for these – just search for “business central sales analysis report” to find them. Just think of account schedules but for item ledger entries/item budget entries. I’m skipping the basics in this post and attacking a specific scenario.

The part I want to focus on is shown below:

The “Item Group Dimension Code” is part of the inventory setup page. What does it do? Why should I use it? How can I maintain the data in an easier way? All relevant questions that I will try to address. My aim in this blog is to tackle the usage of this field and the relating data.

The first point where this could be used is when building a set of sales analysis line templates:

A user can create a view where item groups are aggregated to give a top level summary of performance or other metrics of their choosing.

If I choose the “Insert Item Groups” option I get the following error message:

This ties back to the earlier screen grab around the “Inventory Setup” field. But that is just a regular dimension code. How do I make it so I can tie that dimension back to data users recognise on the item? Surely it should be related to item categories or a different field? Maintaining both item categories and a standalone dimension is an admin headache if not tackled correctly. Or do I create something which is truly standalone and then expect a user to fill that detail in on an item record too? Such a predicament πŸ€”

In my case I have opted for the Item Category as the field of choice to flesh out what my dedicated “Item Group” dimension will have. I haven’t included it in my solution but I chose this field because it has a parent/child aspect which lends itself well to Dimensions values. The solution for any new items is to use Power Automate to create a default dimension for the item record when it is created. Any existing item records could be resolved with a variation on this or by using a more standard method like a configuration package. Check out this blog post to see how I solved this: https://joshanglesea.wordpress.com/?p=714

Nicely leads on to a further predicament. If you intend to use this feature then you need to have the dimension setup in advance of any postings. The current “Dimension Correction” feature of BC does not cover the item ledger entries – so all prior postings are out of scope unless corrective action, in another form, is taken. My suggestion would be to start it in a new sales year to avoid conflicts. Reason being that you can plug a sales/inventory budget into the data – very similar theme to account schedules with a budget vs. actual comparison.

This is exactly what I did. Created a new sales budget and then devised it against the new “Item Group” dimension determining an amount of sales per grouping.

Generate a sales analysis view and use the “Item Group” dimension

If you intend to use the budget area ensure you “Include Budgets” so that data pulls through as well. Note I have left the “Update on Posting” off as it can be a system overhead. Common practice is to have that running as a job queue entry.

Now that the “Item Group” dimension is setup it is possible to use the earlier page action we got an error on to flood the template with data:

Use the “Sales Analysis Report” to then throw together each of the elements:

Which produces a visual like below. Again, perform a wider search on the inner workings of the reporting capabilities. My aim was purely to show how to get the “Item Group” aspect working:

It is possible to apply some of the logic you’ve read here to the fields shown below. If we track back to the Sales Analysis Lines setup you can setup reporting based on the dimension values within:

*Customer Group Dimension Code and Salesperson Dimension Code

Business Central – Automatically add default dimensions with Power Automate β˜‘οΈ

A scenario came up in a different blog post where I needed this solution: https://joshanglesea.wordpress.com/?p=681

What was the aim from the scenario? I required a default dimension to be added to an item record based on a different field value. I’d made the decision to use the Item Category as a dimension so I could use it for inventory/sales reporting. This solution could be applied to other scenarios as you see fit.

  • The starting point for my scenario was to use the creation of an item record as the trigger.
  • A variable to store the ID value for the dimension in the company you intend to use
  • A delay because you are using a “creation” trigger so you need to ensure, as best you can, that the user has keyed in the field you will use – in my case it is the Item Category Code.
  • Get the detail of the record which has been created.
  • The find records action is being used to check if the Item Category Code exists as a dimension value code for the dimension being used.

Check out the below gallery for a view on each step of the flow I took. I have added a note on each step for explanation purposes.

The interesting takeaway from using the “Find Records” action of the BC connector was that you need to handle the possibility of it throwing back an error. This is where the “scope” facility of Power Automate is supremely useful 😁

An example of the result from using this flow. πŸ‘ no manual input required. Plenty of other use cases for this for sure.

Download the flow if you like: https://github.com/JAng13sea/Blogs/blob/master/CreateaDefaultDimension-ItemGroupCode.zip

Business Central Multi Journal Line Dimension Update πŸ”ƒ

In Business Central we have a few areas where working with dimension updates takes place for many records at a time. For instance, when assigning default dimensions there is a method to apply the same values to many records. Or when working on a document, like a purchase order, you can set the dimensions on the header and BC asks to pass them to the lines. With a journal line though it is very much an individual way of working and a user relies heavily on default dimensions values being inherited from related records. Granted edit-in-excel can be seen as the remedy here as you can make updates to the shortcut dimension columns on mass. What about when it’s not a shortcut dimension? Or the user doesn’t have access to edit-in-excel (no O365 or the add-in is blocked)?

As the gif loops through notice that all dimensions can be chosen despite whether they are on the page or not (shortcut dimensions). If the line already has previous dimension values it keeps them and the new one’s are added.

The Selection page is based on the dimension set entry table so it handles the errors for you. For example if a user tries to add the same Dimension Code twice:

For the purpose of a compare and contrast to edit-in-Excel the user does not get the captions of the dimensions and no lookup. Not attempting to have a versus battle with edit-in-Excel, just stating the idea may have some merit.
Feels like it nicely compliments the “Journal Check” functionality by letting you action this for more than one line at a time too.

And what about if you update a default dimension and don’t want to add the Account No. again to validate the data. In my example the “DEPARTMENT” has been made code mandatory for this G/L Account:

Performing a test with 5000 journal lines proved to be faster than edit-in-Excel by some distance. I clocked about 3.5 mins to update just one dimension code. Which is completely fair given it is done outside of BC and then pushed back. Doing the same with my idea takes considerably less time for that volume of lines:

It is something I logged as an idea a while back but wasn’t sure how to go about creating for myself: Microsoft Idea  Β· Add dimension values to multiple journal lines at the same time (dynamics.com)

Give it a try for yourself or vote for the idea (if you like it πŸ™ˆ) in the hope it could be part of the standard product πŸ‘

https://github.com/JAng13sea/Blogs/tree/master/MultiDimLines