Alloy provides awesome platform for building actions, which send SMS and email to group of recipients. 


            


The core concept there is Group, which is essentially a named list of recipients. To manage groups - use the "Email Groups" and "SMS Group" actions. Alternatively, you can build an action of your own utilizing an "Edit List" task with one of supported Group Data Types.


There are standard Email (s:emailGroups) and Phone (s:phoneGroups) groups used across all the built-in tasks and actions, though you can create and store your custom groups using any other variables.


You can use Groups:

  1. To define recipients at a design time for TO, CC, BCC fields of Email and SMS tasks - tap the "+" button and choose Groups.
  2. To define recipients at runtime using a previously selected group, for example: $(group.recipients).
  3. To iterate through all Group's recipients and do needed action for each particular recipient, for example:
FOR EACH (item in group.items)
   SMS to $(item.tokenValue)
}


The following are properties of Group.

  

Property

Type

Description

name

String

group name

items

Array<String>

group items. If an item represents a recipient - it maybe formatted as name<value> e.g. John Doe<+1 555 123 6734> orJohn Doe<john.doe@email.com>. You can use tokenName and tokenValue properties to access name and value respectively for each recipient. 

recipients

String

comma-delimited list of recipients e.g. phone numbers or emails 
recipientNames  String  comma-delimited list of recipient's names