Transactional email API
Ometria's transactional API is used to trigger instant email messages to recipients for transactional purposes, e.g. order confirmation emails. The API ignores suppression lists for transactional sends, so your contacts will receive transactional emails regardless of their opt-in status.
Ometria's rate limit for sending transactional emails is 30 requests per second.
Transactional email API endpoint
https://api.ometria.com/v2/transactional-email/send
Implementation
A typical implementation would involve a queue based system making calls to the Ometria API.
You can set up a different sending domain or subdomain to provide differentiation between marketing and transactional emails. E.g. customerservice.yourdomain.com
Email templates
There are two ways to handle transactional email templates:
- Hosted in Ometria
- Passing the HTML template in the API call
Ometria hosted templates
This method is great if you'd like Ometria to code your templates for you, and all the template assets such as images can be hosted by the Ometria asset manager.
This means it's potentially easier for marketers to make creative changes to templates without help from developers.
Speak to your Customer Success Manager about pricing.
Once the template is created, you’ll need to pass the template ID and all the fields to merge in the API call.
HTML templates via API
This option is quicker to implement if you are already generating your own templates, and allows you to manage the merging of data.
You'll need to include the full HTML with all the data merged into it in the API call.
Adding PDF attachments to transactional sends
You can attach PDF attachments to your transactional sends for files such as invoices, return labels, order summary, etc.
To do this, call the Transactional API adding attachments
as a list.
You can see an example payload here.
You must encode your PDF file in base64. Be aware that if only one of your PDFs fail, the entire call will fail.
See also: Transactional API data sets: Attachments
PDF attachment limits
- Your file must be .pdf extension.
- Maximum of 10 files per message.
- Maximum file size: 10MB total attachment size
- All attachments should be saved with different names.
Testing transactional email
We recommend running your existing transactional email pipeline and the Ometria transactional email API in parallel when testing.
This will allow for a quick switch when you are ready to go live as well as making it easier to rollback if required.
Testing in parallel requires transactional email records to be sent with the "sandbox”:true
flag on the transactional email record.
Updated about 1 year ago