Post Share Webhook

Talkable Post Share Webhook provides notification of a share event performed within a referral campaign workflow. Use cases for the Post Share Webhook include:

  • Sending automated ‘Thank You’ email to an Advocate for performing a share

  • Any event that should be triggered when a user shares

  • Data for Business Intelligence and analytics systems

When does Talkable call the Post Share Webhook?

Talkable Post Share Webhook is triggered any time an Advocate (referrer) shares offer details with a Friend (referee) via the corresponding form provided by campaign workflow. Which includes any time:

  • An advocate shares with a Friend via Email or any other channel from inside a referral campaign workflow

  • An Advocate copies a share link from a referral campaign workflow share screen

Note: the Post Share Webhook triggers every time a share occurs. For example, if an Advocate shares with a Friend via email (or any channel), then shares with a second Friend via email (or any channel), the Post Share Webhook will be triggered twice.

Payload parameters provided for Post Share Webhook

  • 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

  • share_type“email”, “facebook”, “twitter”, “facebook_message”, “facebook_sponsored”, “whatsapp”, “sms”, “linkedin”, “other”

    • Note: custom share_type’s can be created

  • share_info — share-specific information

    • For Facebook share:

      • facebook_share_post_id — Facebook post ID

      • facebook_share_user_id — Facebook user ID

    • For email share:

      • recipients — an array of email addresses

  • sharer_info — subhash of parameters describing the person who shared the offer

    • email — sharer’s email address

    • phone_number — sharer’s phone number (optional)

    • first_name — sharer’s first name (optional)

    • last_name — sharer’s last name (optional)

    • username — sharer’s username (optional)

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

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

    • opted_in_at — date sharer has subscribed (optional)

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

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

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

    • is_loyalty_member — whether the sharer participates in loyalty program

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

    • referral_counts — referral counts of sharer as Advocate

      • total — created referrals count

      • approved — approved referrals count

      • pending — count of waiting for approval referrals

    • gender [deprecated]

  • share_link — link sent in share message (optional, present only for Facebook and Twitter shares)

  • origin — contains data about the event that issued an offer:

    • type

      • “Purchase” for post-purchase placement

      • “AffiliateMember” for standalone, floating widget, or gleam placements

      • “Event” for post-event placement (such as a signup/share page which triggers a

        referral campaign)

    • id — unique identifier of the origin event

    • email — email address of the person

    • customer_id — unique external identifier of a customer who triggered the origin event

    • traffic_source — traffic source of the origin event

    • ip_address — IP address of the origin event

    For Purchase:

    • order_number — unique identifier of the Purchase

    • subtotal — order subtotal for the Purchase

    • currency_iso_code — currency code of the Purchase, defaults to the Site’s currency

    • coupon_code — coupon codes used with the Purchase (separated by , if multiple)

    • order_date — date of the Purchase

    For Event:

    • event_category — identifier of an action that trigger the Event (e.g. app_installed)

    • event_number — unique identifier of the Event within the associated event_category

    • subtotal — optional monetary attribute of the Event

    • currency_iso_code — currency code of the Event, defaults to the Site’s currency

    • coupon_code — coupon codes used with the Event (separated by , if multiple)

Note contains the email saved at the moment when the campaign is first shown to the Advocate. It could be null. For the most up-to-date information about the Advocate, use sharer_info property which is updated with the email address the Advocate has entered on the Advocate Signup/Share Page.

Sample payload

  "campaign": {
    "id": 83587635,
    "type": "StandaloneCampaign",
    "cached_slug": 83587635,
    "tag_names": ["default"],
    "joinable_category_names": ["affiliate_member"],
    "origin_min_age": null,
    "origin_max_age": null,
    "new_customer": null
  "share_type": "email",
  "share_info": {
    "recipients": [""]
  "sharer_info": {
    "first_name": "Bob",
    "last_name": "Smith",
    "email": "",
    "phone_number": null,
    "username": "username",
    "unsubscribed_at": null,
    "subscribed_at": "2018-09-27T22:55:13.860+03:00",
    "opted_in_at": "2018-09-27T22:55:13.860+03:00",
    "phone_opted_in_at": null,
    "sub_choice": true,
    "custom_properties": {},
    "referral_counts": {
      "total": 0,
      "approved": 0,
      "pending": 0
    "is_loyalty_member": false,
    "loyalty_member": null,
    "gender": null
  "origin": {
    "id": 147886587,
    "type": "Purchase",
    "order_number": "450901776",
    "subtotal": 35.03,
    "currency_iso_code": "USD",
    "email": "",
    "customer_id": "565659001",
    "order_date": "2019-04-11T07:28:31.258-07:00",
    "ip_address": "",
    "coupon_code": "WHT29123",
    "traffic_source": "post-checkout"

cURL example

curl <url> \
     -d "key=<key>" \
     -d "site=<site>" \
     -d "type=post_share_web_hook" \
     -d "extras={}" \
     -d 'payload={"campaign":{"id":83587635,"type":"StandaloneCampaign","cached_slug":83587635,"tag_names":["default"],"joinable_category_names":["affiliate_member"],"origin_min_age":null,"origin_max_age":null,"new_customer":null},"share_type":"email","share_info":{"recipients":[""]},"sharer_info":{"first_name":"Bob","last_name":"Smith","email":"","phone_number":null,"username":"username","unsubscribed_at":null,"subscribed_at":"2018-09-27T22:55:13.860+03:00","opted_in_at":"2018-09-27T22:55:13.860+03:00","phone_opted_in_at":null,"sub_choice":true,"custom_properties":{},"referral_counts":{"total":0,"approved":0,"pending":0},"is_loyalty_member":false,"loyalty_member":null,"gender":null},"origin":{"id":147886587,"type":"Purchase","order_number":"450901776","subtotal":35.03,"currency_iso_code":"USD","email":"","customer_id":"565659001","order_date":"2019-04-11T07:28:31.258-07:00","ip_address":"","coupon_code":"WHT29123","traffic_source":"post-checkout"}}'