Iterator

An iterator is a tool that helps businesses and developers to achieve complex automation that needs to be executed in a loop

It works when the data is coming to the connector in an Array format where the number of data or type of array may vary below are a few examples for better understanding ;

Ecommerce

The items in the cart may vary from one customer to another so one order may contain multiple items, here using Iterator it’s possible to extract line items and send messages to the customer to admin like how many items, item details, item total, etc

Sales Report

If a business wants to send a daily sales report via WhatsApp, Email to one or many users as below;

  1. Executive Wise Sales Report to Manager

  2. Manager Wise Sales Report to Sales Head

  3. Total Sales Report to CEO

This can be achieved using Iterator if the business stores the sales reports in any of the CRM in the required format, for an example from the Zoho CRM Deals module it can extract this information and send it via WhatsApp, Email on a daily basis

Personalized Offers

If an eCommerce business wants to send a personalised offer to a group of customers who purchased from the store between specific dates with the above specific value for an example you want to offer 20% discount for customers who purchased between 1st of December to 31st of December whose total amount is more than $100

By making use of HTTP Module, Iterator, Filter, Formatter, Send Messages business can fully automate the process all without any coding

Abandoned Carts

You can setup to send periodic reminders and followup to complete the purchases by directly giving the URL to checkout to their WhatsApp

Data Sync from Any Sources

Businesses can sync the contacts periodically from any of the source like your CRM, Google Sheets etc where the system expects more than one data like sync the new contacts from your existing CRM to Picky Assist Contacts so that you can automatically send them a welcome message, enroll them into a drip campaign, start a conversation in the teambox and assign to an agent and much more

Kindly note Iterator supports only looping upto 2000 execution at a time, so make sure the total records and steps you create accordingly, execution above 2000 will be failed

Setting Up Iterator

Every step in the connector has an option to enable “Iterator” kindly note this works only with data coming as an array format.

Select Field

This is where you need to select an array from an HTTP API response or Webhook which needs to be processed with Iterator

Limit Line Items

An array may contain many items like a search result many contain 1000 of results and you want to filter only the first 10 results and then select 10

Execute Further Steps in Loop

By default Iterator loops only the step in which the Iterator is enabled so if you wish to Iterate other steps then you need to tick this, kindly note this will create a looped action and a maximum number of execution is limited to 2000 irrespective of your array count. Use this feature carefully and only when you need the same.

Remap Subscriber for Iterator

This feature helps you to select the contact dynamically for each iterator which helps you to perform more complex filters and actions based on each contact data saved with Picky Assist, make sure you are mapping the Mobile Number field with the correct field from the array.

How it Works

The iterator simply means an object which holds an array of data, think about an excel sheet with many rows and columns you can see each column and row is named like A, B, C, and D which helps you define the relationship of a row or columns with others like AA, AB, BA etc

Important Points & Limitations

  1. The iterator works only if the selected data is in an array format

  2. Maximum 2000 execution will take place in a single iteration step irrespective of the number of records and actions you configured to Iterate

  3. Only the steps and actions configured below the Iterator step will consider for Iteration so kindly place the Iterator position accordingly in a step

  4. Kindly do a test with data containing few arrays thoroughly before making this live as a wrong configuration can lead to performing mass actions like if you configure to send WhatsApp Messages then a wrong configuration can send upto 2000 messages to a single contact

  5. Always double-check that your configuration doesn't lead to any infinite circular loops.

  6. It's possible to process an array of array, nested arrays by processing the iterator output in another step with the iterator enabled.

Last updated