SaaS nOra User Guide
Overview
nOra
nOra is a framework within nHanced for 365 that allows a Business Central system to react to triggers or events that occur in a system, and on the back of those triggers to perform certain actions. There are a certain number of nOra Processes that are delivered by other areas of the system to perform certain actions. For example, nOra can be used to handle nHanced nForms or Workflows. These are covered in this guide.
Other processes can be added by users and developers and are covered in a separate guide for configuring Processes.
nOra Processes
A nOra Process is the definition of the triggers, actions etc that should be taken when a process is invoked. This could be considered the ‘template’ for the Process. This guide will review the standard process for understanding and ‘debugging’ those processes. Adding New Processes and amending Standard Processes will not be covered in this guide. A Process must be released for it to be triggered.
nOra Process Instances
A nOra Process Instance is the specific Process that was invoked for each given event/trigger in the system, for example when a specific file was dropped onto the ‘Drop File Here’ Role Centre area.
From any given nOra Process you may navigate to all of the Instances of that process that have been triggered by clicking on the ‘Instances’ option in the ‘Process’ menu.
From each nOra Process Instance you can navigate to the connected records from the FactBox on the right side of the page.
Standard Processes
Identify nHanced Emails
The Identify nHanced Emails process is used to ascertain if an email that has been received into the nHanced Email ‘Inbox’ should be processed as an nHanced Form or as an nHanced Workflow response.
It contains a trigger that begins the process when an Email is received. It then carries out 2 actions, the first checks if the email has an nForm and if it creates an nForm record. This record is then broadcast to see if there is a further process to handle the specific form.
The second action is to check to see if the Email is a Workflow response. If this is true then an event is fired. This is then collected by the Workflow Response Email Arrived Process
Identify nHanced Files
This process contains one trigger that responds to a file being dropped onto the ‘Drop File Here’ part of the Role Centre.
The only action that is triggered is to identify if the file is an nForm. If it is then the nForm record is created and a trigger is fired to see if there is a process to handle the nForm of that type.
Workflow response Email arrived.
This process responds to the trigger above, from the Identify workflow email action in the Identify nHanced Emails process.
The action in this process tries to respond to the appropriate workflow if it is still active.
Send Workflow Notification
When a new nHanced Group Workflow is created and notifications are required an event is broadcast to check if there is a process to handle sending the outbound emails.
This process responds to that broadcast with its Trigger Listener. The action in the process sends the notification. A new process instance is created for each notification to be sent.
nForm Arrived
The nForm Arrived processes are slightly different from the previous standard processes. When a nForm is registered (see nForm document) the system creates a process that is specific to that nForm code. For example EX02 – nForm Arrived.
There will be one process created per nForm Code.
The trigger listener in this process has a predefined filter to only run if the nForm record short code is the correct one for the process. If the code is correct for the process then the Process nForm action is run. This action handles processing the form as per the nForm definition.
Setting up nOra
nORA Setup
After installing nOra navigate to the nOra setup in Business Central, in the nOra contact field find the nOra contact you want to use. If you don’t have a nOra contact setup, create a new contact which needs to have an email address. Add the new contact to the nOra contact field
SMTP Mail Setup
The SMTP mail setup has to be configured to use nOra. The details you need can be provided by your IT administrator. If you are using BC20 and above you will need to use an ‘Email Account’ as SMTP Mail Setup is no longer supported by Microsoft from this version.
nHanced Email Account
A nHanced email account needs to be set up to send and receive emails for nHanced products. This is where nOra will read emails. The address will need to be given by the IT administrator. The Folders section is where the emails will go once received in Outlook for the nhanced email account.
See the nHanced Emailing Manual for full details on how to set up your nHanced Email accounts.
nOra Processes
After creating the nHanced email account go to nOra processes then reopen and delete the below processes.
After deleting the above processes go to actions then Update standard procedures. This will update the processes for nOra.
You should have the 4 processes below after updating procedures.
Diagnostic Emails for handling errors.
Nora will sometimes have an issue with the incoming record that will need to be processed, the sender of this must be made aware of this error and given guidance on how to resolve the issue.
Nora Diagnostic Setup
nHanced Base Setup needs a diagnostic sender setup, this is then used in conjunction with an email scenario.
Example HTML Response below
Within the NORA Setup, we can define HTML templates at a top level for all processes.
Clicking within the Yes / No link will allow adding / editing and previewing of the HTML Template.
Nora Processes Setup with HTML Templates
To further allow for flexibility per Process it is possible to define templates per process that relate to each nHanced product.
The below example outlines the setup for nHanced Workflows, these are located within Nora Processes.
The Process Workflow Response Email arrived and handles the incoming Workflow responses that have been approved via email. Sometimes errors can occur such as.
Workflow Approval has already been closed.
The approval Code has an error due to being overtyped or spelled incorrectly. Permission Error when replying to workflow.
To gather the data to populate an HTML template you need to review the data in Nora Processes.
Upon opening the nOra processes you will see the relevant processes that have been set up alongside compatible nHanced products. The example below displays the process.
This relates to nHanced Workflow and its Workflow Response process that handles the approvals of incoming email requests.
Click on the Workflow Response Code. This will display the process, then select Related > Instances from the menu.
You will then be presented with the Nora process instances records.
Clicking on the Workflow Response Email arrived will display more information on the process.
The key part here is to recognize the step codes within the process, each step will allow you to build up the HTML Code.
To have the Sent Date Time included in our email, we need to first define it.
Workflow / Response Email Received Stepping into this code will display the Email Code.
We can use this code in conjunction with the first step code to build our HTML Line: WORKFLOW RESPONSE EMAIL RECEIVED / EMAIL.
Once navigated into the Email Code we have a lot of the data we can use to build the HMTL Document.
WORKFLOW RESPONSE EMAIL RECEIVED / EMAIL / SENT DATE-TIME.
Below is an example of the HTML Code used for the Workflow Process and error reporting.
Markup | Copy |
<h1>nHanced Workflow Error Email</h1>
<p>Hello,</p>
<p>Based on this email received to this workflow:</p> <ul> <li><b>Sent Date/Time:</b> [[@ WORKFLOW RESPONSE EMAIL RECEIVED / EMAIL / SENT DATE TIME ]]</li> <li><b>Rcv. Date/Time:</b> [[@ WORKFLOW RESPONSE EMAIL RECEIVED / EMAIL / RECEIVED DATE TIME ]]</li> <li><b>From :</b> [[@ WORKFLOW RESPONSE EMAIL RECEIVED / EMAIL / FROM ]]</li> <li><b>Subject :</b> [[@ WORKFLOW RESPONSE EMAIL RECEIVED / EMAIL / SUBJECT ]]</li> <li><b>Company :</b> [[@ WORKFLOW RESPONSE EMAIL RECEIVED / WORKFLOW RESPONSE / COMPANY ]]</li> <li><b>Workflow No. :</b> [[@ WORKFLOW RESPONSE EMAIL RECEIVED / WORKFLOW RESPONSE / WORKFLOW NO ]]</li> <li><b>Workflow Desc.:</b> [[@ WORKFLOW RESPONSE EMAIL RECEIVED / WORKFLOW RESPONSE / WORKFLOW DESCRIPTION ]]</li> <li><b>Group WF No. :</b> [[@ WORKFLOW RESPONSE EMAIL RECEIVED / WORKFLOW RESPONSE / GROUP WORKFLOW NO ]]</li> <li><b>Info. Text :</b> [[@ WORKFLOW RESPONSE EMAIL RECEIVED / WORKFLOW RESPONSE / INFORMATION TEXT ]]</li> <li><b>Record Descr. :</b> [[@ WORKFLOW RESPONSE EMAIL RECEIVED / WORKFLOW RESPONSE / RECORD / DESCRIPTION ]]</li> </ul>
<p>The following problem occurred:</p> <ul> <li><b>Status :</b> [[Status ]]</li> <li><b>Status Message:</b> [[Status Message]]</li> </ul>
<p>If the error relates to the response code, it is likely that the response code "[[@ WORKFLOW RESPONSE EMAIL RECEIVED / WORKFLOW RESPONSE / RESPONSE CODE]]" in the email does not match one of the available options:</p> <ul> <li>Approved</li> <li>Denied </li> </ul>
<p>Please, make sure the response email is sent in the correct format as proposed by the workflow approval request email.</p> |
nHanced Form Example
Markup | Copy |
<h1>nHanced Form Error Email</h1>
<p>Hello,</p>
<p>Based on this email received to this nHanced Form</p>
<ul> <li>Sent Date/Time: : [[@ NFORM REQUEST RECEIVED / EMAIL / SENT DATE TIME ]]</li> <li>From : [[@ NFORM REQUEST RECEIVED / EMAIL / FROM ]]</li> <li>Sent To : [[@ NFORM REQUEST RECEIVED / EMAIL / TO ]]</li> <li>Subject : [[@ NFORM REQUEST RECEIVED / EMAIL / SUBJECT ]]</li> <li>Company Name :[[CurrentCompanyName]]</li> <li>Current Company Name :[[CurrentCompanyName]]</li> <li>Requested nForm Message : [[@ NFORM REQUEST RECEIVED / EMAIL / BODY ]]</li> </ul>
<p>The following problem occurred:</p>
<ul> <li>Status : [[Status ]]</li> <li>Status Message: [[Status Message]]</li> </ul>
<p>If the error relates to the nHanced Form code, it is likely that the form code is spelt incorrectly and does not match an existing nHanced Form.</p>
<p>The nHanced Forms that can be requested are:</p>
<ul> <li>Sales Order</li> <li>Purchase Order</li> </ul> |
Once the template is ready it can be uploaded and previewed if required.