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

  • 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 code used with 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 - optional coupon code associated with the Event

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": ["john@example.com"]
  },
  "origin": {
    "id": 147886587,
    "type": "Purchase",
    "order_number": "450901776",
    "subtotal": 35.03,
    "customer_id": "565659001",
    "ip_address": "127.0.0.1",
    "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":["john@example.com"]},"origin":{"id":654689661,"type":"Purchase","order_number":"426692385","subtotal":29.39,"customer_id":"162638070","order_date":"2019-04-11T07:28:31.258-07:00","coupon_code":"WHT79679","ip_address":"127.0.0.1","traffic_source":"post-checkout"}}' <url>