This event is triggered any time a customer refers a friend that satisfies the referral program requirements. This event is useful for sending an email thanking the customer for the referral.

📘

Please note:

This webhook is relevant to Shopify merchants who joined Yotpo Loyalty & Referrals after August, 2024.

If you're joined earlier, please see this webhook.

Important AttributesDescription
emailThe email address of the customer who made the referral
referral_codeObject has information about their overall referral stats. Useful for including an overview in an email.
referral_code.completed_referral_customersAn array of friends the referring customer has referred so far
referred_customer.emailThe email address of the referred friend
referred_customer.first_nameThe first name of the referred friend
perk.reward_pointsThe number of points the referring customer earned for a successful referral
perk.redemption.reward_textThe discount code the referring customer earned for a successful referral
perk.redemption_option.nameThe name of the discount code the referring customer earned for a successful referral
{
  "topic": "yotpo/referral/completed",
  "name": "Yotpo Referral completed",
  "website_url": "http://sara-yotpo.myshopify.com",
  "store_name": "Sara Yotpo",
  "perk": {
    "id": 1,
    "campaign_id": null,
    "merchant_id": 69962,
    "customer_id": 1,
    "reward_points": null,
    "completed": true,
    "completed_at": "2024-08-08T07:38:27.000Z",
    "awarded": true,
    "awarded_at": "2024-08-08T07:38:27.000Z",
    "pending": false,
    "reversed": false,
    "reversed_at": null,
    "expired": false,
    "expired_at": null,
    "expires_at": null,
    "redemption_option_id": 1,
    "history_title": "Refer a friend",
    "created_at": "2024-08-08T07:38:27.000Z",
    "redemption_option": {
      "id": 1,
      "cost_text": "0 points",
      "amount": 0,
      "applies_to_product_type": "ALL",
      "duration": "single_use",
      "type": "Coupon",
      "discount_amount_cents": 1000,
      "discount_rate_cents": 100,
      "discount_percentage": null,
      "discount_type": "fixed_amount",
      "discount_value_cents": null,
      "name": "$10 off",
      "description": "Get $10.00 off your next purchase for 0 points",
      "unrendered_name": "$10 off",
      "unrendered_description": "Get $10.00 off your next purchase for 0 points",
      "cart_greater_than": "0",
      "discount_with_currency": "$10"
    },
    "redemption": {
      "id": 1,
      "reward_text": "CODEXWEX",
      "approved": true,
      "approved_at": "2024-08-08T07:38:28.000Z",
      "is_admin": false,
      "is_pos": false,
      "at_checkout": false,
      "amount": null,
      "token": "1",
      "third_party_id": null,
      "third_party_rule_id": null,
      "code": "CODEXWEX"
    }
  },
  "referral_code": {
    "code": "CODE22",
    "customer_id": 1,
    "total_shares": 31,
    "email_shares": 30,
    "sms_shares": 0,
    "whatsapp_shares": 0,
    "copy_link_shares": 1,
    "personal_email_shares": 0,
    "links_clicked_from_email": 49,
    "links_clicked_from_sms": 0,
    "links_clicked_from_whatsapp": 0,
    "links_clicked_from_personal_email": 0,
    "links_clicked_from_copy_link": 1,
    "friends_orders": 0,
    "friends_amount_spent_cents": 0,
    "friends_average_amount_cents": 0,
    "expired": false,
    "customer": {
      "total_spend_cents": 281990,
      "total_purchases": 4,
      "perks_redeemed": 22,
      "last_purchase_at": "2024-08-08T06:09:15.000Z",
      "first_name": null,
      "last_name": null,
      "is_member": false,
      "accepts_marketing": false,
      "email": "[email protected]",
      "points_balance": 4743,
      "points_earned": 4843,
      "last_seen_at": "2024-08-08T07:38:27.000Z",
      "thirty_party_id": null,
      "third_party_id": null,
      "referral_link": "rwrd.io/ref_CODE22",
      "referral_discount_code": null,
      "is_opt_in": true,
      "loyalty_opt_in_date": "2024-07-31",
      "has_store_account": false,
      "credit_balance": "$0",
      "credit_balance_in_customer_currency": "$0",
      "is_affiliate": false,
      "points_expire_at": null,
      "referred_by_customer": null,
      "vip_tier_name": null,
      "vip_tier_ends_at": null,
      "payout_percentage": null,
      "has_provided_tax_details": null,
      "affiliate_email": null,
      "total_amount_earned": null,
      "birthday_month": null,
      "birth_day": null,
      "birth_year": null,
      "anniversary_month": null,
      "anniversary_day": null,
      "anniversary_year": null
    },
    "completed_referral_customers": [
      {
        "email": "[email protected]",
        "first_name": "aa",
        "last_name": "aa",
        "reward_type": "REWARD_OPTION",
        "referral_status": "COMPLETED",
        "last_seen_at": "2024-08-04T06:45:17.000Z"
      },
      {
        "email": "[email protected]",
        "first_name": "bb",
        "last_name": "bb",
        "reward_type": "REWARD_OPTION",
        "referral_status": "COMPLETED",
        "last_seen_at": "2024-08-01T10:12:27.000Z"
      }
    ],
    "email": "[email protected]",
    "unique_clicks": 22,
    "total_clicks": 56
  },
  "friend_referral_code": {
    "code": "CODE33",
    "customer_id": 1,
    "total_shares": 0,
    "email_shares": 0,
    "sms_shares": 0,
    "whatsapp_shares": 0,
    "copy_link_shares": 0,
    "personal_email_shares": 0,
    "links_clicked_from_email": 0,
    "links_clicked_from_sms": 0,
    "links_clicked_from_whatsapp": 0,
    "links_clicked_from_personal_email": 0,
    "links_clicked_from_copy_link": 0,
    "friends_orders": 0,
    "friends_amount_spent_cents": 0,
    "friends_average_amount_cents": 0,
    "expired": false,
    "customer": null,
    "completed_referral_customers": [],
    "email": "[email protected]",
    "unique_clicks": 0,
    "total_clicks": 0
  },
  "email": "[email protected]",
  "friend": {
    "total_spend_cents": 62000,
    "total_purchases": 1,
    "perks_redeemed": 3,
    "last_purchase_at": "2024-08-08T07:38:18.000Z",
    "first_name": "name",
    "last_name": "lname",
    "is_member": false,
    "accepts_marketing": false,
    "email": "[email protected]",
    "points_balance": 645,
    "points_earned": 645,
    "last_seen_at": "2024-08-08T07:38:23.000Z",
    "thirty_party_id": null,
    "third_party_id": null,
    "referral_link": "",
    "referral_discount_code": "",
    "is_opt_in": true,
    "loyalty_opt_in_date": "2024-08-08",
    "has_store_account": false,
    "credit_balance": "$0",
    "credit_balance_in_customer_currency": "$0",
    "is_affiliate": false,
    "points_expire_at": null,
    "referred_by_customer": "[email protected]"
  },
  "published_at": "2024-08-08T07:38:37.748+00:00"
}