IMIconnect cloud communications platform makes it easy for you to send automated SMS messages to your customers in 220+ countries. This tutorial provides a step-by-step description of how you can set-up outbound SMS flows using IMIconnect.

Prerequisites

1.) Access to IMIconnect platform (request your trial access here)

   – Login to the IMIconnect platform using your registered email ID and password 

2.) Postman App (or an alternative tool) to invoke the APIs

   – You can install the Postman app from https://www.getpostman.com/apps


Setup Tasks

A. Create a Service
B. Get a Phone Number and assign it to the service
C. Create the Flow to send SMS
D. Configure a Custom Event
E. Configure a Rule to invoke the Flow
F. Invoke your flows 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. Follow the below steps to create a service:

Step 1 – Add New Service

  1. 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.

2. Choose a name for the service and optionally, add the description. 

3. 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.
 

Tip: 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. Use this option ONLY if your current service key is not functioning.

Step 3 – Choose Events

  1. Select the event types that you wish to receive on the Callback URL from the EVENT FILTERS section.

    2. Click on SAVE on the top-right corner of the screen.


B. Get a Phone Number and assign it to the Service

Now that the service is created, assign a number to it. Follow the below steps to assign a number to the service:

Step 1 – Go to Numbers

Click on Numbers under the Services menu to get to Numbers settings.

Step 2 – Assign the Number

  1. Choose the number from the drop-down under the SHORTCODES & PHONE NUMBERS FOR SMS section. 
  2. Save the choices by clicking on SAVE on the top right corner of the screen.


C. Create a Flow

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

Step 1 - Add a New Flow

  1. Click on Flows on the left menu under Settings. You will arrive at the Flows screen. 
  2. Select the ADD NEW FLOW option.

Step 2 – Name the New Flow

  1. Choose a name for the flow and then choose Create blank flow from the drop-down on the CREATE NEW FLOW screen. 
  2. Click on CREATE FLOW on the top right corner.

Step 3 – Configure SMS settings

  1. Drag and drop the Send node on to the flow canvas by dragging from the Nodes menu under UTILITIES

2. Double-click on the Send Node to configure its parameters. You will arrive at the Settings window.

3. Click on SMS on the Settings window. 

4. Enter $(msisdn) in the Destination field. 

Note: MSISDN stands for Mobile Station ISDN number, which refers to the mapping of telephone number to SIM card.


5. Choose msisdn from the Destination Type drop-down and Text from the Message Type drop-down.

6. Choose the senderid from the drop-down. 

7. Enter the message to be sent to the customer in the Message box and click on OK at the bottom.

Step 6 – Configure the 'onsuccess' event

  1. Drag the green dot that is next to SMS 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 select 101 – Successfully completed flow [Success] option from the Custom flow result drop-down. Click on OK at the bottom.

Step 7 – Configure the 'onerror' event

  1. Drag the red dot that is next to SMS Node to configure the onerror event.

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 and click on OK at the bottom to save the changes. 

Step 8 – Publish your flow 

  1. Click on MAKE LIVE at the top right corner of your screen to publish your flow. 
  2. Click on OK in the Confirm – Make Live message box, to make the flow live.

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


D. Configure 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 New Custom Events

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

Step 2 - Name the Custom Event

  1. Choose a name for the custom event.
  2. Click on 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 msisdn in the Variable Name field. 
  2. Check the Mandatory checkbox, and then click on SAVE at the bottom.

The Custom event is created. See the screenshot below.

 

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 Custom Event on the Choose a trigger channel screen.

4. Click on SKIP TO ACTIONS on the Enter trigger conditions screen to choose trigger Condition.

Step 2 – Invoke a 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. 
  2. Choose Active from the Set the status of your rule drop-down, and click on the SAVE AND SUBMIT button at the bottom.

Note: The end date is optional.
The Rule is created. See the screenshot below.


F. Invoke your Flows using Postman or any alternative tools

Click here for Postman API.

Postman is a Google Chrome app, which is used to interact with HTTP APIs. To configure the Postman app, you need to specify the type of application and service key in the header, and code and msisdn in the body section of Postman. Follow the steps below to configure Postman app:

Step 1 – Welcome Screen

  1. After logging in to IMIconnect, click the below icon from the top left menu. 

2. Click on Send and Receive SMS on the Welcome to IMIconnect screen. 

Step 2 – Run Postman

  1. Click on Run in Postman on the Send and Receive SMS screen.  You will arrive at the Open with… screen with Chrome and Windows options. 
  2. Click on any one of Chrome or Windows based on your preference.

Step 3 – Open a new tab

Click on + symbol to open a new tab on the Postman screen.

Step 4 – Post URL

  1. Choose POST from the drop-down.
  2. Enter https://api.IMIconnect.io/resources/v1/events/externalevent/ in the box next to it by copying it from custom event API section in help.imiconnect.io.

Step 5 – Update Header

  1. Click on Header, and enter the Content-Type under the Key field.
  2. Enter application/json under Value field. 


3. In the second row, enter key under Key field

4. Copy the Service key from the General Settings in IMIconnect, and paste it in the Value field. See the screenshot below:

Step 6 – Update Body

  1. Click on the Body tab and choose raw. Replace the text with 4 digits Custom Event ID generated when the service was created.
  2. Replace the word mobile with msisdn. Enter the mobile number for which the SMS has to be delivered followed by the country code.
  3. Remove this text from the code: "ReceivedOTP":"Use the OTP received by making the first API call here for successful OTP authentication.
  4. Click on SEND to trigger the Custom Event API.

The Custom Event is triggered. See the screenshot below.

Did this answer your question?