Sending Emails using Orixa
Orixa can be used to send emails. These can be automatically generated in response to particular actions in the system, or can be manually added. Automation can be added to automatically generate PDFs or other documents and data which can be added as attachments to these emails.
This is particularly useful to:
- Automatically send a customer or supplier business documents such as purchase orders and sales invoices without leaving the system.
- Sending management information to staff regularly.
- Sending warnings or information to staff, for example an email could be triggered when sales levels exceed a certain level or when stocks run low.
- Sending automated requests from the system in response to particular set of circumstances.
Orixa can also receive email sent back from recipients. At present this facility is not activated by default, as users tend to use tools such as Gmail or Outlook for these purposes for receiving email, and it is easier to manage email there. But if necessary fuller email management can be added to a system.
Orixa contains pre-written structures for a "Communications" BusinessObject. If this BusinessObject is added to your system all email-related functionality will automatically be added, with the ability for users to write, send and receive emails from your App. It is frequently useful to add the Communications BusinessObject even if you are not using Orixa for general email purposes, as it makes it easy to enable a wide range of email automation processes from your App.
Once the Communications BusinessObject is added users can create and send emails manually from within the system, and attach any system-generated documents they wish as attachments. Alternatively database procedures can be written to automate this process.
Auto-generated Emails
Actions within the system include options such as "Send This Sales Invoice as PDF to the Customer". These actually surface database procedures which call dynamic link libraries within Orixa to generate and send email. These procedures are visible in the System Modeller and Database Management Utility (covered by other Help documents in the system).
When such an action is clicked, the system will:
- Run a SQL SELECT statement to generate a dataset. Send this dataset to the Reporting system and use it to generate a PDF.
- Add a record to the "Communications" data-table.
- Copy in a "To" email address from the Customer's data. This means for the system to work, emails addresses must have been added for Customers.
- Set the "From" email address, based on the email linked to the staff member entering the data.
- Add details of the file-name for the PDF as an Attachment to the record.
- Copy default text into the "Content" of the email.
- At this point the procedure may stop, leaving the staff member to complete writing the email in the Communications Edit Form, and then press "send", or the process might be completely automated, so that as soon as an order is dispatched the Invoice PDF is automatically generated.
Editing a communications record
Communications Main Form
- The top section of the edit-form includes the email title, and date.
- Details of who the email is sent to (blurred in the image). Within the Orixa database this data is stored in "WhoTo" and "EmailCCList" fields which are fully searchable. Each Communication is also linked automatically to a recipient Organisation.
- Editors to allow addition and viewing of plain-text email content and "HTML" (rich text formatted content). HTML content can include bold and other font-variations. HTML content is not used by the Orixa server when it generates automated emails.
- File Attachments added to any email (for example a customer-invoice, or farmer-inspection record output from Orixa as a PDF file.
- Additional "meta data" columns in the communications record. The StatusID is used commonly in Orixa to manage records, allowing those with different status to be viewed separately. The StaffID defaults to the name of the person responsible for the email.
Note that Orixa is not as clever as Gmail or Outlook. The "WhoToList" and "CCList" are simple text fields. In Outlook it is possible to write in a person’s name and Outlook will substitute in their email address when they send the message. The System doesn’t do this.
The following forms of email addresses are OK:
- John Smith <js@theexchange.com>
- js@theexchange.com
- js@theexchange.com, email@gmail.com
- "John Smith" <js@theexchange.com>
- 'John Smith' <js@theexchange.com>
It is OK to include "braces" "<" and ">", but it is not required. It is OK to include a name but only if the email is added in braces. It is OK to have as many emails as you like, separated by commas.
The following forms of email addresses are NOT OK:
- <js@theexchange.com
- js@theexchange.com>
- <js@theexchange.com, email@gmail.com>
- "email@gmail.com"
Some of the above emails have braces which have not been correctly formatted, this is not OK. It is also not OK if the email address itself is in quotes or double-quotes. If entered like this the email will not send.
All emails are stored in the "EmailAddresses" data table, linked to Organisations and People. Most problems with sending emails occur if the email addresses are entered incorrectly into the data-table.
Creating Emails and using Email Addresses
Communications: send personal email Communications send organisation email |
Emails are often auto-generated by Orixa, but it is possible for users to write emails directly. Navigate to either a person's record, or and organisations record and select the correct actions, following the steps shown in the images.
|
Communications select emails |
Orixa can only send emails to customers and people if their email addresses are added to the database. Of course requests must be made and consent must be given before adding people to your database, to ensure you are complying with data-protection rules and laws. Once added emails can be used. In a communication record all email addresses linked to the Organisation selected, or linked to any People connected to the selected Organisation will be listed to pick from. In addition all emails can be searched and added to the "CCList" of an email from the Emails Menu. (Shown in detail below) |
Communications Content Templatel |
Email Content Template When a new user-created email is created a text file is pulled into the PlainContent" field of the new Communications Record. If you want to customize or personalize emails sent by your Organisation you can add or edit this template. |
Sending Emails
Communications Email Menu |
Once emails have been written, they are held in the database until the user (or automated system processes) marks them ready to send. Then, if an automated email sending process is in place on your Orixa Server these emails will be sent when it next runs. If no automated sending process is set up, emails will be sent when the user chooses.
|
Communictions Send Emails Action |
|
Knowing Which Emails are "Sent" and "Waiting"
Communictions Dataviewer |
On the main "System Entities" page there is an "Emails DataViewer" This lists all "Out" and "Sent" emails (1. and 2. in the image). Clicking on any blue link will immediately open the communications record, allowing the user to review and access the record. Those listed under "Emails Out" should send in the next 15 minutes, if an automated email server process is set up, or will be sent whenever a user selects. Note that emails which have not yet been sent and have some sort of issue (i.e. bad attachment file or wrong email address) are shown in a different colour in the data-viewer. Sometimes it is necessary to review and correct emails to make sure they are working correctly.
|
Communictions View-Grid |
If you want to view any emails sent / created by any user of the system, at any time this is possible. The System also includes a number of choices for viewing Communications data via a data-grid, as per the systems for any other BusinessObject. These are accessed via the System Entities screen (1. On the left) Click on the Search of your choice (2. on the left) to access different views of Communications data. The searches are named in a way which is pretty self explanatory. |