IMIconnect communications platform makes it easy for you to send automated emails to your customers in 200+ countries. This tutorial provides a step-by-step description on how you can use IMIconnect to send automated emails.

Prerequisites

  - Access to IMIconnect platform(request your trial access here)

  - Postman App (or an alternative tool) to invoke the APIs -  You can install the         Postman app from https://www.getpostman.com/apps

   - Configure E-mail Applications


Setup Tasks

A. Create a Service
B. Configure Email Settings
C. Create a Custom Event
D. Create a Flow to Setup Email Service
E. Configure a Rule to Invoke the Flow
F. Invoke the Flow using Postman or any alternative tools


A. Create a Service 

A service is a workspace that allows you to create and manage communication flows, APIs, integrations and configuration settings for any particular communication use case. Here are the steps to create a service:

Step 1 – Add New Service

Click on the Services tab on the top left corner of the screen and choose ADD NEW SERVICE. You will arrive at the CREATE NEW SERVICE dialog box.

Note: Alternatively, you can find ADD NEW SERVICE from the top right corner of IMIconnect.

  1. Choose a name for the service and optionally, add the description.
  2. Click on the NEXT button at the bottom. You will arrive at the General Settings page, which will have the service key. See the image below.

Note: Service key is used to identify incoming API calls for messaging and event APIs.

Step 2 – Configure the Service Status

Choose the Live option in the Service Configuration section to activate the service.

Note: Click on the REGENERATE button, if you wish to regenerate the service key. Once the service key is regenerated, replace the existing key with the new key in the API request. Please use this option ONLY in case your current service key is not functioning.

Step 3 – Choose Events

  1. Choose the events that you wish to receive on the Callback URL by choosing from the EVENT FILTERS section.
  2. Click on SAVE on the top-right corner of the screen.


B. Configure Email Settings

Step 1 - Configure the Email Applications

  1. Click on Apps from the top menu of IMIconnect.

2. Ensure that the required email apps are configured .

For details about how to configure the email App, please contact  IMIconnect support.

Step 2 -  Choose the desired Template 

  1. On the top right corner of IMIconnect, click the below icon highlighted in red rectangle. You arrive at the Email Templates option.

2. Click the Email Templates option.

3. Click on the Create Template button.

4. In the Template Details window:

  • Enter a name for the Template.
  • Enter the Reference ID.
  • Select Full template or Partial template.
  • Enter the subject.
  • Click the Next button at the bottom. You will arrive at the Email Composure Screen.

5. Click the Add Layout button on the Email Composure screen.

6. From the Layout Pallette, drag the Header on to the Compose area, and then click the Save and Exit button at the top right corner of Email Composure screen.

7. Follow the same process for creating Footer, and Body  elements including Text, Table, and Buttons etc.


C. Create a Custom Event

A custom event is a user-defined event. It can be used to invoke a flow while passing the required API parameters.Follow the steps below to configure a custom event in IMIconnect:

Step 1 – Add a New Custom Event

  1. Click Custom Events under Settings in the left menu. You will arrive at the Custom Event screen. 
  2. Click ADD NEW CUSTOM EVENT on the Custom Event screen.
  3. Choose Version 1 on the Custom Event screen. 

Step 2 - Name the Custom Event

  1. Choose a name for the custom event.
  2. Click ADD NEW at the bottom on the Create New Custom Event screen. 

Step 3 – Configure Parameters

  1. Choose String from the Type drop-down and enter ODID in the Variable Name field. 
  2. Check the Mandatory checkbox.
  3. Click ADD NEW at the bottom.
  4. Choose String from the Type drop-down and enter Cust_Name in the Variable Name field. 
  5. Check the Mandatory checkbox.
  6. Click ADD NEW at the bottom.
  7. Choose String from the Type drop-down and enter emailid in the Variable Name field. 
  8. Check the Mandatory checkbox
  9. Click on SAVE at the bottom.

The Custom event is created. See the screenshot below.



D. Create a Flow to Setup the Email Service 

IMIconnect allows you to rapidly configure communication flows using a drag-and-drop flow builder. Here are the steps to configure the flow:

Creating a New Flow

Step 1- Add a Flow

  1. Click on Flows on the left menu under Settings.
  2. Click on Add New Flow on the top right corner of the Flows screen.

Step 2 – Name the New Flow

  1. Enter a Name for the flow on the CREATE NEW FLOW screen.
  2. Choose the Flow type as Workflow.
  3. Choose Create blank flow from the drop-down.
  4. Click on CREATE FLOW on the top right corner.

Configure the Email Node

Step 1- Add the Send Node 

Drag and drop the Send node on to the flow canvas from the NODES menu under UTILITIES.

Step 2 – Configure the Node 

Double-click on the Send node to open the Settings menu. See the image below

  1. Click on Email on the SETTINGS window.

Note: This option appears only when the email apps are configured successfully.

2. Choose $(emailid) in the Destination field. 

3. Choose Email Id from the Destination Type drop-down.

4. Enter the email id from which the email has to be sent to the customer in the From Email field.

5. Enter a name to be displaced in the From Name field.

6. Enter the message to be displayed in email in the Subject field. 

Note: In the figure below, the message contains $(ODID) variable. This variable will be replaced with the actual order id when the email is triggered.

7. Enter a name for the node in the Name field.

8. Choose Email Header from the drop-down in the Partial templete 1 field.

9. Choose Email Body from the drop-down in the Partial templete 2 field.

10. Choose Email Footer from the drop-down in the Partial templete 3 field.

11. Enter a name for the node in the Name field.

12. Click on OK at the bottom.

Step 3 – Configure the 'onerror' event

The 'onerror' event is configured to record the instance when the flow fails due to any internal error.

To configure the onerror event:

  1. Drag the red dot next to Send node.


2. Choose the onerror from the Node event drop-down on the END FLOW - SETTINGS tab.

3. Choose 102 – Flow completed with an error [Error] from the Custom flow result drop-down.

4. Click on OK at the bottom to save the changes.

Step 4 - Configure the 'onsuccess' event

  1. Drag and drop the green dot next to Send node to configure the onsuccess event. 


2. Choose the onsuccess from the Node event drop-down on the END FLOW - SETTINGS tab.

3. Choose the 101 – Successfully completed flow [Success] option from the Custom flow result drop-down. 

4. Click on OK at the bottom.

Step 5 - Connect the Start and Send Node

Drag and drop the green dot from the Start node to the Send node.

Publish the Flow 

  1. Click on MAKE LIVE on the top right corner. You will arrive at Confirm – Make Live message box. 
  2. Click on OK on the Confirm – Make Live message box.

Note: If you wish to add a comment, enter it in the Add an update comment box (optional).


E. Configure a Rule to Invoke the Flow

Configure a rule to invoke the flow whenever the custom event is triggered. Follow the steps below to configure a rule: 

Step 1 – Create a New Rule

  1. Click on Rules under Settings on the left menu.
  2. Click on ADD NEW RULE button on the top right corner of the screen. 
  3. Click on Email on the Choose a trigger channel screen.

4. Click on SendOrderUpdate on the Choose an Event screen.

5. Click on SKIP TO ACTIONS on the Enter trigger conditions screen.

Step 2 – Invoke Flow

  1. Click on Invoke a flow on the Choose an action screen.

2. Choose the flow for which the rule has to be applied from the drop-down, and then click on COMPLETE RULE button.

Step 3 – Configure Rule Settings

  1. Choose a name for your rule. Choose the start date and time by clicking on the popup calendar. 

Note: The end date is optional. 

2. Choose Active from the Set the status of your rule drop-down, and click on the SAVE & SUBMIT button at the bottom.

The Rule is created. See the screenshot below.


F. Invoke the Flow using Postman or any alternative tools

Postman is a Google Chrome app, used to interact with HTTP APIs.

Follow the process mentioned in Sending automated SMS using IMIconnect Visual Flow Builder tutorial to configure Postman.

Did this answer your question?