Home
System

event_winback_offer

The winback offer occurs when a user has been inactive for an extended period of time.

Request

We send events to your webhook's URL with POST and a JSON body. Events are batched: a request can carry several events of this type. See Receiving Webhooks for batch sizes and retries, and Webhook Event Signatures to verify the request.

Headers

HeaderDescription
x-zinrelo-signatureThe HMAC-SHA512 hex digest of <request body>:<nonce>, computed with the webhook's secret key. See Webhook Event Signatures.
nonceThe Unix time, in milliseconds, at which the request was signed. It's part of the signed message.

Payload

FieldTypeDescription
request_idstringA unique identifier of this webhook request.
total_countintegerThe number of events in the batch (events).
created_datestringWhen the webhook request was created, as MM/DD/YYYY HH:MM:SS.
eventsarray of objectThe events in this batch.
events[].idstringThe unique identifier of the event. Use it to detect events you already processed.
events[].event_typestringThe type of event. One of event_winback_offer.
events[].dataobjectThe event's data.
events[].data.member_info (optional)objectThe member_info object of the event's data. Which fields are present depends on the event.
events[].data.member_info.id (optional)stringThe internal ID generated by TrueLoyal.
events[].data.member_info.first_name (optional)stringThe first name of the member.
events[].data.member_info.last_name (optional)stringThe last name of the member.
events[].data.member_info.email_address (optional)stringThe email address of the member.
events[].data.member_info.address (optional)object
events[].data.member_info.address.city (optional)stringMember's city.
events[].data.member_info.address.country (optional)stringMember's country.
events[].data.member_info.address.line2 (optional)stringThe member address.
events[].data.member_info.address.line1 (optional)stringThe member address.
events[].data.member_info.address.state (optional)stringMember's state.
events[].data.member_info.address.postal_code (optional)stringMember's postal code.
events[].data.member_info.phone_number (optional)stringThe phone number of the member.
events[].data.member_info.member_id (optional)stringThe unique identifier of the member defined by an Admin.
events[].data.member_info.member_status (optional)stringThe current status of the member- ‘active’ , ‘blocked’, ‘opted_out’. ‘active’ member is the one accumulating loyalty points and has access to rewards and earning opportunities. ‘blocked’ member is prohibited from participating in the program. ‘opted_out’ member is the one who has chosen to opt out of the loyalty program.
events[].data.member_info.member_tags (optional)array or stringThe tags assocaited with a member.
events[].data.member_info.number_of_purchases (optional)integerThe number of purchases made by a member.
events[].data.member_info.number_of_redemptions (optional)integerThe number of redemptions made by a member.
events[].data.member_info.birthdate (optional)stringBirthdate of the loyalty member. Expected date format: MM/DD/YYYY or MM/DD Irrespective of the year passed, 1904 will be set as a default value.
events[].data.member_info.churn_status (optional)string
events[].data.member_info.enrollment_date (optional)stringThe date on which the member joined the loyalty program.
events[].data.member_info.last_modified_date (optional)stringThe most recent date on which a member's profile was updated.
events[].data.member_info.first_purchase_date (optional)stringThe first purchase date of the member.
events[].data.member_info.instagram_handle (optional)stringThe instagram handle of the member.
events[].data.member_info.last_purchase_date (optional)stringThe last purchase made by a member.
events[].data.member_info.anniversary_date (optional)stringThe anniversary date of the member. Expected date format: MM/DD/YYYY or MM/DD In case, where a year has not been passed the default year will be set as 1904.
events[].data.member_info.twitter_handle (optional)stringThe twitter handle of the member.
events[].data.member_info.preferred_language (optional)stringThe preferred language of the member.
events[].data.member_info.deprecated_fields (optional)object
events[].data.member_info.deprecated_fields.user_id (optional)string
events[].data.member_info.tier_info (optional)object
events[].data.member_info.tier_info.tier_qualification_units (optional)integer
events[].data.member_info.tier_info.current_period_start (optional)stringThe start date of the current tier cycle.
events[].data.member_info.tier_info.loyalty_tier_name (optional)stringThe name of the current tier.
events[].data.member_info.tier_info.qualified_points (optional)integerThe qualified points for tier calculation.
events[].data.member_info.tier_info.loyalty_tier_id (optional)stringThe unique tier ID stored in TrueLoyal.
events[].data.member_info.tier_info.current_period_end (optional)string or nullThe end date of current tier cycle.
events[].data.member_info.tier_info.qualifid_points (optional)integer
events[].data.member_info.lifetime_points_earned (optional)integerThe total points earned in a member's account since he joined the program.
events[].data.member_info.lifetime_points_expired (optional)integerThe total points expired from a member's account since he joined the program.
events[].data.member_info.available_points (optional)integerThe avaliable points of the member.
events[].data.member_info.points_onhold (optional)integer
events[].data.member_info.lifetime_points_deducted (optional)integerThe total points deducted from a member's account since he joined the program.
events[].data.member_info.lifetime_points_redeemed (optional)integerThe total points redeemed from a member's account since he joined the program.
events[].data.member_info.number_of_referral_purchase (optional)integer
events[].data.member_info.number_of_referral_share (optional)integer
events[].data.member_info.referral_URL (optional)stringThe unique referral url of the member.
events[].data.member_info.custom_attributes (optional)object
events[].data.member_info.custom_attributes.Nationality (optional)string
events[].data.member_info.custom_attributes.City_Name (optional)string
events[].data.member_info.custom_attributes.Marital_Status (optional)string
events[].data.member_info.custom_attributes.Income_Source (optional)string
events[].data.member_info.custom_attributes.Age_In_Years (optional)string
events[].data.member_info.custom_attributes.Gender_Identity (optional)string
events[].data.member_info.custom_attributes.Graduation_Date (optional)string
events[].data.member_info.custom_attributes.Number of purchases (optional)integer
events[].data.member_info.custom_attributes.Favourite Destination (optional)string
events[].data.member_info.custom_attributes.Last traveled (optional)string
events[].data.member_info.custom_attributes.Gender (optional)string
events[].data.member_info.custom_attributes.List of favourite place (optional)array of string
events[].data.member_info.custom_attributes.Review date (optional)string
events[].data.member_info.custom_attributes.traveled destination (optional)string
events[].data.member_info.custom_attributes.Preferences (optional)string
events[].data.member_info.custom_attributes.Subscription Plan (optional)string
events[].data.member_info.custom_attributes.Active Camera (optional)integer
events[].data.member_info.revenue (optional)integer
events[].data.member_info.aov (optional)number or null
events[].data.member_info.deleted_date (optional)null
events[].data.member_info.referral_code (optional)stringThe unique referral code of the member.
events[].data.offer_info (optional)objectThe offer_info object of the event's data. Which fields are present depends on the event.
events[].data.offer_info.offer_valid_till (optional)string
events[].data.offer_info.bonus_points (optional)integer
events[].data.offer_info.activity_to_complete (optional)object
events[].data.offer_info.activity_to_complete.id (optional)stringThe internal ID generated by TrueLoyal.
events[].data.offer_info.activity_to_complete.activity_id (optional)stringThe unique ID of the activity assigned by TrueLoyal.
events[].data.offer_info.activity_to_complete.metadata (optional)objectThe metadata associated with an activity.
events[].data.offer_info.activity_to_complete.metadata.Category (optional)string
events[].data.offer_info.activity_to_complete.metadata.Location (optional)string
events[].data.offer_info.activity_to_complete.metadata.Gender (optional)string
events[].data.offer_info.activity_to_complete.activity_name (optional)stringThe activity name stored with TrueLoyal.
events[].data.offer_info.activity_to_complete.is_active (optional)boolean
events[].data.offer_info.activity_to_complete.approval_method (optional)string
events[].data.offer_info.activity_to_complete.show_on_guest_dashboard (optional)boolean
events[].data.offer_info.activity_to_complete.activity_card_background_image_url (optional)string"Activity Tile Image" configuration in TrueLoyal admin console.
events[].data.offer_info.activity_to_complete.enduser_activity_short_description (optional)string"Description" configuration in TrueLoyal admin console.
events[].data.offer_info.activity_to_complete.enduser_activity_description_html (optional)string"Points earning description HTML" configuration in TrueLoyal admin console.
events[].data.offer_info.activity_to_complete.last_modified_date (optional)stringThe most recent date on which a transaction was updated.
events[].data.offer_info.activity_to_complete.created_date (optional)stringThe date and time on which the transaction was created.
events[].data.offer_info.activity_to_complete.is_qualified_for_tier_upgrade (optional)booleanThe activity qualifies for a tier upgrade.
events[].data.offer_info.activity_to_complete.rules_config (optional)array of object
events[].data.offer_info.activity_to_complete.rules_config[].rule_type (optional)string
events[].data.offer_info.activity_to_complete.rules_config[].rule_value (optional)integer
events[].data.offer_info.activity_to_complete.rules_config[].is_active (optional)boolean
events[].data.offer_info.activity_to_complete.rules_config[].conditions_matching_policy (optional)string
events[].data.offer_info.activity_to_complete.rules_config[].conditions (optional)array of object
events[].data.offer_info.activity_to_complete.rules_config[].conditions[].operator (optional)string
events[].data.offer_info.activity_to_complete.rules_config[].conditions[].attribute (optional)string
events[].data.offer_info.activity_to_complete.rules_config[].conditions[].value (optional)array of string
events[].data.offer_info.activity_to_complete.activity_benefit_type (optional)stringActivity benefit type is based on activity_type” - For 'fixed' activity types, the benefit type is 'points.' - For 'fixed and coupon-based' activity types, the benefit type is 'points_and_coupon_code.' - When the activity type is 'bonus_multiplier,' the benefit type is 'points.' - For 'bonus and coupon-based' activity types, the benefit type is 'points_and_coupon_code.' - For 'coupon-based' activity types, the benefit type is 'coupon_based.'" Please Note: For coupon_based activity, the points_config will be empty.
events[].data.offer_info.activity_to_complete.points_config (optional)object
events[].data.offer_info.activity_to_complete.points_config.points_computation_type (optional)string
events[].data.offer_info.activity_to_complete.points_config.attribute_to_multiply (optional)string
events[].data.offer_info.activity_to_complete.points_config.multiplier (optional)integer

Example

{
  "request_id": "638729c94f8f0345970b6d96",
  "total_count": 1,
  "events": [
    {
      "id": "63872a654f8f0345970b6d99",
      "event_type": "event_winback_offer",
      "data": {
        "member_info": {
          "id": "john286",
          "first_name": "John",
          "last_name": "Doe",
          "email_address": "johndoe@gmail.com",
          "address": {
            "city": "Palo Alto",
            "country": "US",
            "line2": "530 Lytton Ave",
            "line1": "Suite #200",
            "state": "CA",
            "postal_code": "94301"
          },
          "phone_number": "+1-6507017759",
          "member_id": "john.doe23",
          "member_status": "active",
          "member_tags": "winbackmember",
          "number_of_purchases": 7,
          "number_of_redemptions": 3,
          "birthdate": "08/26/1986 00:00:00",
          "enrollment_date": "02/05/2022 00:00:00",
          "last_modified_date": "12/10/2022 00:00:00",
          "first_purchase_date": "02/05/2022 00:00:00",
          "instagram_handle": "www.instagram.com/john",
          "last_purchase_date": "12/10/2022 00:00:00",
          "anniversary_date": "12/06/2014 00:00:00",
          "twitter_handle": "www.twitter.com/john",
          "preferred_language": "English",
          "deprecated_fields": {
            "user_id": "abgjdyo2"
          },
          "tier_info": {
            "tier_qualification_units": 100,
            "current_period_start": "03/01/2022 00:00:00",
            "loyalty_tier_name": "Silver",
            "qualified_points": 1000,
            "loyalty_tier_id": "zrl_silver",
            "current_period_end": "02/28/2023 23:59:59"
          },
          "referral_code": "ERGH12309",
          "number_of_referral_purchase": 0,
          "number_of_referral_share": 0,
          "lifetime_points_earned": 5000,
          "lifetime_points_expired": 0,
          "available_points": 5000,
          "points_onhold": 10,
          "lifetime_points_deducted": 100,
          "lifetime_points_redeemed": 1000,
          "referral_URL": "https://zinrelo.com/ref/ERGH12309",
          "custom_attributes": {
            "Subscription Plan": "Basic",
            "Active Camera": 2
          },
          "revenue": 2000,
          "aov": 20,
          "deleted_date": null
        },
        "offer_info": {
          "offer_valid_till": "11/30/2022, 15:30:41",
          "bonus_points": 100,
          "activity_to_complete": {
            "id": "63206d4d19da5f27de385ead",
            "activity_id": "made_a_purchase",
            "metadata": {
              "Category": "T-Shirt",
              "Location": "London",
              "Gender": "Male"
            },
            "activity_name": "Purchase on website",
            "is_active": true,
            "approval_method": "immediate",
            "show_on_guest_dashboard": true,
            "activity_card_background_image_url": "",
            "enduser_activity_short_description": "Earn points for every dollar you spend in purchases.",
            "enduser_activity_description_html": "",
            "last_modified_date": "11/23/2022 10:29:40",
            "created_date": "09/13/2022 11:45:17",
            "is_qualified_for_tier_upgrade": true,
            "rules_config": [
              {
                "rule_type": "Fixed Points",
                "rule_value": 123,
                "is_active": false,
                "conditions_matching_policy": "match_all",
                "conditions": [
                  {
                    "operator": "Contain any of",
                    "attribute": "Transaction Tags",
                    "value": [
                      "winback",
                      "sendoffer"
                    ]
                  }
                ]
              }
            ],
            "activity_benefit_type": "points",
            "points_config": {
              "points_computation_type": "multiplier_based",
              "attribute_to_multiply": "order_subtotal",
              "multiplier": 1
            }
          }
        }
      }
    }
  ],
  "created_date": "11/30/2022 10:00:41"
}

Responses

StatusDescription
200Acknowledges receipt of the events. Return 200 as soon as you receive the request and process the events afterwards, so the request doesn't time out.
OtherAny status code other than 200 is a failure: the request is sent again every 5 minutes until your endpoint returns 200 or the maximum number of attempts (5 by default) is reached. Your Customer Success Manager can change these settings.