Email Flow with Personalized Coupon Codes (KLAVIYO)

Hello, I want to create this flow via Klaviyo! Does anyone how to do this?

I already read through tons of lectures by Klaviyo but I can’t seem to find an answer to this.

  1. A person places an order (TRIGGER) (I know how to do this)

  2. Receives an email with a personal coupon code for his followers (If his Instagram name is jack_test, I want the coupon code to be „JACK_TEST15“ because I offer him 15% off for his followers, if her name is sophie_cool, I want the coupon code to be “SOPHIE_COOL15” and so on…So everyone who places an order receives a personal code for their followers to share)

  3. I want to track if the particular coupon code by each affiliate was used by his/her followers and how often

  4. If this coupon code was used 2 times: email him/her and tell him/her that their coupon code was used twice and send him/her a personal one-time 100% discount code as a reward for his/her next entire order.

  5. If the coupon codes get used 2 times again, send him/her another one-time 100% discount code

How do I do this?

I’m trying to set this up for my Instagram affiliates.

Thank you!!!