Action - Iterate over a List
-
OSS/BSS Answers
Access Control Admin Audit B3Network Master Account Channel App Contract App Customer App Discount App Edge Server File Management Finance App Invoice App Number Management Payment Portal Settings Price List Product App Release V2 SMS Gateway Supplier App Support Center Support Hub Business Hub Sales Hub
- App Model - Organization Management
- App Model - Communication Apps Answers
- License Model - Organization Management
-
License Model - CPaaS Solution Answers
Phone System - Admin Guide Phone System - End-user Guide Mobile App Desktop App Web Phone Auto Attendant - Admin Guide Developer Hub - Admin Guide Microsoft Teams Operator Connect - Admin Guide Microsoft Teams Direct Routing - Admin Guide Contact Center - Supervisor Guide Contact Center - Agent Guide Omni-Channel SIP Trunk CPaaS - SIP Trunk Power SIP Trunk CPaaS Fax Contact Dashboard Campaign File Explorer
- Telcoflow
- Integrations Answers
- Updated Regulations
- Ideas Portal
Table of Contents
Introduction
This action supports handling each item in the item list sent from API and can only be used to trigger a subroutine.
REQUIRED INPUTS
- List: pre-defined from the trigger event (normally it is API - General Purpose)
- Iterated Action: pre-created Subroutine.
- Max Allowed Iteration: the maximum number of items will be handled each time.
OUTPUT
- List (the output of looping action)
Note:
Items will be handled in order.
Sample Configuration
Requirement
Send customized SMS to Customers with unique Voucher information every time Developers call API and send an item list to the Flow.
Configuration
I. Create a Subroutine
- Click Create Flow > choose Event: When triggered by other flows > Create
-
Input:
- Parameter Name 1: Name - Data type: String
- Parameter Name 2: Number - Data type: String
- Parameter Name 3: Voucher - Data type: String
-
Input:
2. Click on the (+) icon to add Action > choose Action: Send SMS Message (legacy) > Create
- Destinations: Click the 3-dash icon to choose the output of the Event > choose <Number>
- Sender Name: choose a purchased number
-
Message: Type in as follows:
- "Hi <Name>, thanks for being our loyal customer. To show our appreciation, here is a 30% voucher for your next purchase <Voucher>"
3. Click Deploy to make the Subroutine active
II. Create a Main Flow
- Click Create Flow > choose Event: API - General Purpose > choose Advanced > Create
-
Template: add the data template that you will send to this Flow over Open API > Click Extract Properties > the system will automatically extract the Field names properly
- Sample:
-
Template: add the data template that you will send to this Flow over Open API > Click Extract Properties > the system will automatically extract the Field names properly
1
2{
3 "customers": [
4 {
5"name": "John",
6 "voucher": "JH30T",
7"number": "+6581234567"
8}
9 ]}
3. Click on the (+) icon to add Action > choose Action: Iterate over a List
- List: click the 3-dash icon to choose the output of the Event > choose API - General Purpose > choose $['customers']
-
Iterated Action: choose the pre-created Subroutine > choose data for the Subroutine's Inputs:
- Name: click the 3-dash icon > choose API - General Purpose > $['customers'] > $['name']
- Number: click the 3-dash icon > choose API - General Purpose > $['customers'] > $['number']
- Voucher: click the 3-dash icon > choose API - General Purpose > $['customers'] > $['voucher']
- Max Allowed Iteration: 100
4. Click Deploy to make the Main Flow active