Friend Email Gating Webhook

The Talkable Friend Email Gating Webhook notifies your endpoint that a Friend Email Gating form was submitted (on Friend Claim Page).

Use cases for the Friend Email Gating Webhook include:

  • Tracking when users select the checkbox to opt into your email newsletter

  • Collection of data for Business Intelligence and analytics systems to track users who become Friends

  • Sending automated ‘Thank You’ or ‘Don’t forget to shop’ emails after a Friend passes the email gating form

When does Talkable call the Friend Email Gating Webhook?

Talkable Friend Email Gating Webhook is triggered any time an Friend Email Gating form is submitted. This is the form a Friend completes after receiving a share from an Advocate, and before receiving their discount code.

Friend Email Gating form example:

Friend Email Gating Form

Payload parameters provided

  • offer — subhash of parameters describing the offer

    • emailAdvocate’s (referrer) email address

    • short_url_code

    • ip_address

  • campaign — subhash of parameters describing the campaign

    • id — unique campaign ID

    • cached_slug — same as id, SEO friendly

    • type — either “StandaloneCampaign” or “DoubleSidedDealCampaign”

    • new_customer — whether the Advocate has to be a new customer to see the campaign

    • origin_min_age — seconds passed since the first site visit before the Advocate can see the campaign

    • origin_max_age — seconds passed since the first site visit during which the Advocate can see the campaign

    • joinable_category_names — categories of origins that trigger the campaign

    • tag_names — array of campaign’s tags

  • email — friend’s email address

  • phone_number — friend’s phone number (optional)

  • first_name — friend’s first name (optional)

  • last_name — friend’s last name (optional)

  • username — friend’s username (optional)

  • sub_choice — subscription choice (optional, present only if the form included subscription checkbox)

  • subscribed_at — date friend has subscribed (deprecated; use opted_in_at instead)

  • opted_in_at — date friend has subscribed (optional)

  • phone_opted_in_at — date friend has subscribed with email (optional)

  • unsubscribed_at — date friend has unsubscribed with phone number (optional)

  • custom_properties — hash of friend’s custom properties (optional)

  • is_loyalty_member — whether the friend participates in loyalty program

  • loyalty_member — details of the friend as a loyalty program participant (optional)

  • referral_counts — referral counts of friend as Advocate

    • total — created referrals count

    • approved — approved referrals count

    • pending — count of waiting for approval referrals

  • gender [deprecated]

  • ip_address — friend’s IP address

Sample payload

{
  "offer": {
    "email": "referrer@example.com",
    "short_url_code": "1a2PV",
    "ip_address": "127.0.0.1"
  },
  "campaign": {
    "id": 465427859,
    "type": "StandaloneCampaign",
    "cached_slug": 465427859,
    "tag_names": ["default"],
    "joinable_category_names": ["affiliate_member"],
    "origin_min_age": null,
    "origin_max_age": null,
    "new_customer": null
  },
  "email": "john@example.com",
  "phone_number": null,
  "first_name": null,
  "last_name": null,
  "username": null,
  "ip_address": "127.0.0.1",
  "sub_choice": true,
  "subscribed_at": "2018-09-27T22:54:28.345+03:00",
  "opted_in_at": "2018-09-27T22:54:28.345+03:00",
  "phone_opted_in_at": null,
  "unsubscribed_at": null,
  "custom_properties": {
    "preferred_style": "oversize"
  },
  "referral_counts": {
    "total": 0,
    "approved": 0,
    "pending": 0
  },
  "is_loyalty_member": false,
  "loyalty_member": null,
  "gender": null
}

cURL example

curl <url> \
     -d "key=<key>" \
     -d "site=<site>" \
     -d "type=claim_signup_web_hook" \
     -d "extras={}" \
     -d 'payload={"offer":{"email":"referrer@example.com","short_url_code":"1a2PV","ip_address":"127.0.0.1"},"campaign":{"id":465427859,"type":"StandaloneCampaign","cached_slug":465427859,"tag_names":["default"],"joinable_category_names":["affiliate_member"],"origin_min_age":null,"origin_max_age":null,"new_customer":null},"email":"john@example.com","phone_number":null,"first_name":null,"last_name":null,"username":null,"ip_address":"127.0.0.1","sub_choice":true,"subscribed_at":"2018-09-27T22:54:28.345+03:00","opted_in_at":"2018-09-27T22:54:28.345+03:00","phone_opted_in_at":null,"unsubscribed_at":null,"custom_properties":{"preferred_style":"oversize"},"referral_counts":{"total":0,"approved":0,"pending":0},"is_loyalty_member":false,"loyalty_member":null,"gender":null}'