Underlying all IT architectures are core systems of records that are often not readily available due to its complexity and connectivity concerns. System APIs provide a means of hiding that complexity from the user while exposing data and providing downstream insulation from any interface changes or rationalization of those systems. This API provides an implementation best practice for a notification service that integrates with multiple systems like Gmail and Twilio and exposes a RESTful interface that triggers a notification.
This API is one of many components included in the Accelerator for Salesforce Commerce Cloud, the Accelerator for Banking, and the Accelerator for Retail. It provides organizations with connectivity assets that accelerate project delivery, including pre-built API designs and implementations that support core business processes.
The implementation.xml view in Studio for this API:
This template is subject to the conditions of the MuleSoft License Agreement. Review the terms of the license before downloading and using this template. You can use this template for free with the Mule Enterprise Edition, CloudHub, or as a trial in Anypoint Studio.
This API allows you to send notifications via email as well as text messages via Twilio based on the input JSON message.
To get this template to run, there are preconditions to consider. Failing to do so can lead to unexpected behavior of the template.
- APIs security considerations - Deploy this API on CloudHub and manage using Runtime Manager.
Run Stand Alone
In this section we detail the way you should run your template on your computer.
Where to Download Anypoint Studio and the Mule Runtime
If you are new to Mule, download this software:
Import Template in Studio
In Studio, click the Exchange X icon in the upper left of the taskbar, log in with your
Anypoint Platform credentials, search for the template, and click Open.
Run in Studio
After opening your template in Anypoint Studio, follow these steps to run it:
- Locate the properties file
mule.dev.properties, in src/main/resources.
- Complete all the properties in the "Properties to Configure" section.
- Right click the template project folder.
- Hover your mouse over
Mule Application (configure).
- Inside the dialog, select Environment and set the variable
mule.envto the value
Run Stand Alone
Complete all properties in one of the property files, for example in mule.prod.properties and run your app with the corresponding environment variable to use it. To follow the example, use
Run in CloudHub
After adding your application to Runtime Manager, go to Manage Application > Properties to set the environment variables listed in the "Properties to Configure" section.
Deploy in CloudHub
In Studio, right click your project name in Package Explorer and select Anypoint Platform > Deploy on CloudHub.
Properties to Configure
To use this template you need to configure properties (credentials, configurations, etc.) either in a properties file or in Runtime Manager as Environment Variables.
SMTP Services Configuration
Twilio Services Configuration