Email Trigger

The SapphireOne Email Trigger functionality enables the SapphireOne user to set an automated email trigger for invoices, statements, payments and reports. This gives the SapphireOne user the ability to manage Conversions, Postings and Months End by customising their unique Workflow settings. The SapphireOne Email Trigger functionality also allows the SapphireOne user to generate Inbuilt PDF Reports and Custom Reports and schedule them accordingly.

The SapphireOne user can select a specific time for each particular Email Trigger to be sent at, and also provides flexibility by automatically re-triggering the email until the relevant deadline.

Where used: Utilities > Controls > Email Trigger

There are 3 Types of Email Trigger:

The different types of Email Trigger have different settings on the Trigger On setting. These include:

  • Invoice
    • Conversion (Convert Quote Client Invoice (QCI), Order Client Invoice (OCI) to Sales Client Invoice (SCI))
    • Posting (Posting a SCI or JCI)
    • Month End Process (During Month end process)
  • Statement
    • Month End Process (During Month end process)
  • Payment
    • Posting (Posting a VP)
    • Month End Process (During Month end process)

The trigger time can be set up if the SapphireOne user requires the email to be sent at a specific time of the day. For example, you may set the Email Trigger time for 1:00pm. SapphireOne gives flexibility and will retry within 1 hour. This means the deadline will be 2:00pm, the unsent email will be left for the next day.

There are 3 Report Types. The different report types allow for a subsequent setting of the Report.

  1. Inbuilt PDF 
    • This uses the inbuilt Plain Paper Report as a PDF attachment
    • The SapphireOne user has the choice between Plain Paper and Landscape Report
  2. Custom Report PDF
    • This allows the choice to use the default Custom Report and attach as a PDF
      • Invoice Type email: Allows a choice between default Invoice-1Invoice-2 and any Custom Report available under the Sales Transaction Inquiry screen.
      • Statement Type email: Allows a choice between default Statement-1 and Statement-2
      • Payment: Allows a choice between default Remittance-1 and Remittance-2
  3. Custom Report HTML
    • This has exactly the same report choice as Custom Report PDF option, but it generates the Custom Report as a HTML email body and treats it as part of the email content, instead of attaching the Report as a PDF.
    • This option can take advantage of a specific Custom Report feature, such as hyperlinks or HTML scripting.

The Email content of the Email Trigger setup allows input static Email Subject and Email Body. CC allows the user to cc the email to the Sales report of the invoice or Client record.

Both Subject and Body allow simple scripting reference to the table information. For example, putting table information within the <%REFERENCE%> syntax will inject the actual data into the test. Another example is you can replace the Email subject “Invoice for customer” to “Invoice No. <%[Invoices]Internal_Ref%> for <%[Clients]Name%>” This will generate Email Subject result “Invoice No. 12345 for Architects Resource”.

Trigger Process

Once the setup has been completed, the system will follow the setting and trigger the email accordingly. Whenever the trigger criteria matches e.g. posting an invoice, it will generate a background record for the next pending task. The server controller will check the background record and trigger the email four times in an hour i.e. 0, 15, 30, and 45 minutes past each hour.

Any trigger setup without the specific time setup will be triggered at the next checking. If a specific time has been setup e.g. 09:10 on the setting, the system has a 1 hour flexible range to send an email. Any trigger created before 09:15 with this setting will be sent around 09:15. The last chance to post the invoice will be approx. 09:59, and the last chance to send out the 09:10 setting is at 10:00 server process.

Any trigger setup with the Month End process will be sent out during Month End, disregarding the time settings as the statement / invoice / payment needs to be process before the month roll over.

Technical Information

There are 3 Tables involved in this feature.

  • [EmailTrigger]: Setup for the actual trigger to happen.
  • [EmailTriggerLog]: The record created when the condition has matched the setting, e.g. posting a Sales Client Invoice (SCI).
    • Server then processes every 15 mins to check if the time has matched on the trigger
    • If a specific time is not set on the trigger setting, it will be sent immediately by the server (there might be a 30 seconds delay depending on how busy the controller is).
  • [EmailLog]: The existing Email Log can be viewed under Client, Vendor or Company and it is now linked to EmailTriggerLog record for visibility

You can review our Blog and YouTube channel for additional information and resources on SapphireOne ERP, CRM and Business Accounting software.

Was this helpful?

Previous Article

Workflow Rules