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:
![](https://d2x3xhvgiqkx42.cloudfront.net/c94ab348-5fb1-4c1d-89b1-fa79e3e916d0/81ec6e6f-2b1b-45dc-9193-b23c4a10d966/2022/08/16/3ec05399-5197-4765-83d1-e483f408e517/083e4e7b-74fb-4206-9749-10ff6ef49886.gif)
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
![](https://d2x3xhvgiqkx42.cloudfront.net/c94ab348-5fb1-4c1d-89b1-fa79e3e916d0/81ec6e6f-2b1b-45dc-9193-b23c4a10d966/2022/08/16/23f2bf1c-a5db-448a-9543-9a29ccc35fe5/b5dfd498-32fd-41e7-8e3b-5e9950f5eea8.gif)
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 ]}
![](https://d2x3xhvgiqkx42.cloudfront.net/c94ab348-5fb1-4c1d-89b1-fa79e3e916d0/81ec6e6f-2b1b-45dc-9193-b23c4a10d966/2022/08/16/b539051b-ac6c-4428-97bc-65920bac6d46/21aed796-1076-43da-be86-ec154737bfe4.gif)
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
![](https://d2x3xhvgiqkx42.cloudfront.net/c94ab348-5fb1-4c1d-89b1-fa79e3e916d0/81ec6e6f-2b1b-45dc-9193-b23c4a10d966/2022/08/16/a328fd3f-ef4b-4b71-bc2f-6cc556a62ab6/e2343922-bf34-4f73-b9ac-829b82f12376.gif)