We are building an automation for a company that sells online courses. The automation works as follows:
- New Order in Shopify
- Filter if order contains a class
- Lookup in a gsheet the first unused course code (we have a sheet of codes, with blanks for student info, we look up the first unused code)
- Fill in the remainder of that row on the sheet with the customer information
- Update Mailchimp customer record with course code
- Fire an event to Mailchimp to begin an email automation
Where we cannot solve is if the customer buys 2 or more of the same course (one for them, one for a friend).
We would want to do the following:
- New Order in Shopify
- Filter if order contains a class
- Lookup in gsheet the first unused code
- Add student info to that row
- Lookup in gsheet the next unused code and add the same student info to that (repeat for quantity)
- Update Mailchimp customer record with course code
- Fire an event to Mailchimp to being an email automation
Can someone help with some direction as to how to accomplish this?