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 — unique SEO friendly ID

    • type — either “StandaloneCampaign” or “DoubleSidedDealCampaign”

    • tag_names — array of campaign’s tags

    • origin_min_age — timeframe from first site visit when an offer is available to Advocate

    • origin_max_age — timeframe from first site visit when an offer is available to Advocate

    • new_customer — “yes/no” whether offer requires Advocate to be a new customer

  • 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 — person’s email address

    • phone_number — person’s phone number

    • first_name — person’s first name

    • last_name — person’s last name

    • username — person’s username (optional)

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

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

    • opted_in_at — date person has subscribed (optional)

    • unsubscribed_at — date person has unsubscribed (optional)

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

    • referral_counts - subhash of Advocate’s referral counts

      • total — created referrals count

      • approved — approved referrals count

      • pending — count of waiting for approval referrals

  • 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 page which triggers a

        referral campaign)

    • id — unique identifier of the origin event

    • email — email address of the Advocate 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

    • 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

    • 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 Page.

Sample payload

  "campaign": {
    "id": 83587635,
    "type": "StandaloneCampaign",
    "cached_slug": 83587635,
    "tag_names": ["default"],
    "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": "",
    "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",
    "sub_choice": true,
    "referral_counts": {
      "total": 0,
      "approved": 0,
      "pending": 0
    "is_loyalty_member": false,
    "loyalty_member": null
  "origin": {
    "id": 147886587,
    "type": "Purchase",
    "order_number": "450901776",
    "subtotal": 35.03,
    "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 --data 'key=<key>&site=<site>&type=post_share_web_hook&payload={"campaign":{"id":83587635,"type":"StandaloneCampaign","cached_slug":83587635,"tag_names":["default"],"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":"","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","sub_choice":true,"referral_counts":{"total":0,"approved":0,"pending":0},"is_loyalty_member":false,"loyalty_member":null},"origin":{"id":147886587,"type":"Purchase","order_number":"450901776","subtotal":35.03,"email":"","customer_id":"565659001","order_date":"2019-04-11T07:28:31.258-07:00","ip_address":"","coupon_code":"WHT29123","traffic_source":"post-checkout"}}' <url>