Sample Flows

This article shares a possible use cases you can support, as well as an example flow that could support each use case. You're certainly not limited to these use cases, but it can be a helpful jumping off point as you plan your implementation.

Create a group for a predefined list of people

For example, create a group for each class at a school or each fitness class (yoga, TRX, etc) in a gym.

  1. Create a list of site members to add to the relevant group, identified by one of the following: name, email address, phone number, contactId.
  2. Create a group by calling Create Group.
  3. Call Query Members to get the site member data.
  4. Map the site members to add to the group by their member IDs as returned in step 3.
  5. Add the site members to the group by calling Add Group Members with the member IDs collected above.

Manage bulk emailing to group members

For example, send automated emails to group members.

  1. Get all members of a group by calling List Group Members.
  2. From the response, collect the member IDs.
  3. Call Query Members, with the member IDs you collected, to get their email addresses.
  4. Call Query Email Subscriptions to confirm that the members have agreed to receive emails.
  5. Prepare and send the automated emails.

Provide analytical reports

For example, create a report including aggregated group info: total amount of groups created, the most popular groups by member count, idle groups;

  1. Get the total amount of groups by calling List Groups.
  2. From the response, collect the metadata total.
  3. Get the most popular groups by calling Query Groups and sorting by group size.
  4. Get the idle groups (with the least recent activity) by calling Query Groups and sorting by date of most recent activity.
  5. Prepare and display the report.

Send promotional emails based on members' interests

You can identify group members who are interested in a certain topic by searching for keywords in their answers to the membership questions. Then, you can send emails to the identified members informing them about upcoming events or special offers.

  1. Add membership questions by calling Create or Replace All Membership Questions.
  2. At any time you want to send emails to selected members, call List Answers.
  3. Identify the relevant members via a keyword search.
  4. Call Query Email Subscriptions endpoint to confirm that the identified members have agreed to receive emails.
  5. Prepare and send the automated emails.

Bulk update group rules

When Wix users manually update the rules for one group, you can apply the new rules to other relevant groups.

  1. Listen to Rule Updated, and/or regularly get the updated group rules by calling List Rules.
  2. Save the rules on your server and update them if needed by calling Create or Replace All Rules.
  3. Retrieve a list of all group IDs by calling List Groups.
  4. Iterate over the list of group IDs and update the rules for each relevant group by calling Create or Replace All Rules.
Did this help?