Event - Guest
This includes user create, update, and delete events triggered as they happen in the Punchh system.
Note: Punchh sends guest events for users with the following statuses: active, banned, or deactivated. Guest events are not sent for deleted, anonymized, or archived users, as personally identifiable information (PII) is not stored once a guest is moved into these statuses.
{
"content_id": "49776936-69e4-4ce8-b1d0-9f0065c8c31b",
"timestamp": 1585735899930,
"business_id": 1,
"business_uuid": "BUSINESS_UUID_GOES_HERE",
"event_name": "users",
"event_type": "",
"action": "create",
"payload": {
"business_id": 1,
"business_uuid": "BUSINESS_UUID_GOES_HERE",
"user_id": 111111111,
"email": "test@example.com",
"first_name": "FIRST_NAME_GOES_HERE",
"last_name": "LAST_NAME_GOES_HERE",
"phone":null,
"secondary_email":null,
"birthday": "1999-01-01",
"anniversary": null,
"preferred_locale": "",
"fb_uid":null,
"gender": "female",
"unsubscribed": false,
"signup_channel": "ApplePay",
"address_line1": "ADDRESS_GOES_HERE",
"city": "Jaipur",
"state": "Rajasthan",
"zip_code": "302001",
"title": null,
"guest_type": "Loyalty",
"external_source": "",
"external_source_id": "SOURCE_ID_GOES_HERE",
"marketing_email_subscription": true,
"marketing_pn_subscription": true,
"sms_subscription": false,
"unsubscribe_reason": "Banned by Admin (test@example.com)",
"user_status": "active",
"referral_code": "REFERRAL_CODE_GOES_HERE",
"favourite_store_numbers": "202,234",
"sign_in_count": 0,
"joined_at": "2019-10-05T12:49:52Z",
"last_activity_at": "2019-10-05T12:49:52Z",
"updated_at": "2019-10-05T12:49:52Z",
"created_at": "2019-10-05T12:49:52Z",
"previous_changes":["id", "email", "first_name", "last_name", "created_at", "updated_at", "gender"],
"user_relations": [
{
"user_relation_id":1234,
"relation": "spouse",
"name": "FIRST_NAME_GOES_HERE LAST_NAME_GOES_HERE",
"birthday": "1999-01-01"
}
],
"fav_locations": [
{ "user_id":111111111,
"location_id":1,
"business_id":1,
"channel":"Favourite",
"user_favourite_location_id":91
}
],
"profile_fields": [
{
"answer": "2022-02-12",
"code": "anniversary",
"question": "Anniversary",
"upf": "upf0"
},
{
"answer": "all",
"code": "fav_menu_item",
"question": "Favorite menu item",
"upf": "upf1"
},
{
"answer": "FishbowlCloud",
"code": "input_source",
"question": "Input source",
"upf": "upf2"
},
{
"answer": "2021-10-21",
"code": "join_date",
"question": "Join date",
"upf": "upf3"
},
{
"answer": "Breakfast",
"code": "dine_time",
"question": "Dine Time",
"upf": "upf4"
},
{
"answer": "Yes",
"code": "truck_driver",
"question": "Are you a professional truck driver?",
"upf": "upf5"
},
{
"answer": "LastWeek",
"code": "last_time_visit",
"question": "Last Time Visit",
"upf": "upf6"
},
{
"answer": "Asian",
"code": "race",
"question": "Race",
"upf": "upf7"
},
{
"answer": "storecamp",
"code": "tagsrtp",
"question": "tags",
"upf": "upf8"
},
{
"answer": "bigB",
"code": "busloc",
"question": "BussLocations",
"upf": "upf9"
}
],
"account_balance":{
"user_id":111111111,
"banked_currency": null,
"current_membership_level_name": "Silver Level",
"last_visit": null,
"loyalty_points": 0,
"net_balance": 10,
"net_debits": 0,
"pending_points": 0,
"total_credits": 10,
"total_debits": "0.0",
"total_lifetime_points": 10,
"total_point_credits": 10,
"total_redeemable_visits": null,
"total_visits": 0,
"unbanked_points": null,
"unredeemed_cards": null
}
}
}
Meta Fields
Meta Fields are common attributes such as content_id, timestamp, etc. that are returned in event responses, providing additional information about events. Click here to view the descriptions of the attributes.
Response Parameters
| account_balance | Object | |
| account_balance. banked_currency |
Float | Total banked currency or dollar amount available with the user (applicable in case of a currency-based program) |
| account_balance. current_membership_level_name |
String | Name of the current membership level of an end-user |
| account_balance. last_visit |
Date_time | Last loyalty visit timestamp of the user |
| account_balance. loyalty_points |
Float | Total loyalty points earned from loyalty check-ins/visits |
| account_balance. net_balance |
Float | Net available balance of the current account. This value always shows the available balance of the user whether visits, banked rewards, or points. |
| account_balance. net_debits |
Float | Total points redeemed/donated/transferred by the user |
| account_balance. pending_points |
Float | Pending points of the user (if check-in is in a pending state) |
| account_balance. total_credits |
Float | Total points credited via earnings for a user (removing expired points) |
| account_balance. total_debits |
Float | Total points debited/redeemed for a user (removing expired points) |
| account_balance. total_lifetime_points |
Float | Sum of all the loyalty points earned by an end-user from the time the user signed up (excluding expired points) |
| account_balance. total_points_credits |
Float | Total points credits of the user, including initial points (e.g., membership level bump) |
| account_balance. total_redeemable _visits |
Integer | Total redeemable visits available/unredeemed with the user (applicable in case of a visit-based program) |
| account_balance. total_visits |
Integer | Total of the visits that an end-user has earned by doing loyalty check-ins and those visits that were migrated from an older loyalty program (in case a business had an older loyalty program and wants to migrate its users to Punchh's loyalty program) |
| account_balance. unbanked_points |
Float | Available points that have not been converted yet for the user (applicable in case of points conversion based program) |
| account_balance. unredeemed_cards |
Integer | Total unredeemed cards available with the user (applicable in case of a visit-based program) |
| account_balance. user_id |
Integer | User ID generated by the Punchh system |
| address_line1 | String | Address of the end-user |
| anniversary | Date | Anniversary date of the end-user in YYYY-MM-DD format |
| avatar_remote_url | String | Avatar remote URL |
| birthday | Date | Birthday of the user in YYYY-MM-DD format |
| business_id | Integer | Business ID in Punchh |
| city | String | City where the end-user lives |
| confirmation_sent_at | Date_time | Verification email sent to the user |
| confirmed_at | Date_time | Verification confirmed |
| created_at | Date_time | Date/time when the user was created in the system in ISO 8601 format |
| previous_changes | Array | Lists the specific user attributes that have been updated in a particular event within the Punchh system. For example, if the phone number and address are updated in the guest profile, the event triggered by this update may contain many different parameters in its payload, not just the ones that have been updated. However, previous_changes will only include the keys for the attributes that were updated in this case, "phone" and "address". |
| String | Email address of the user | |
| external_source | String | Signifies the external source user identifier ingested from |
| external_source_id | String | Returns the ID stored in Punchh against the external source. If external_source is not being used or is blank, then by default it will return Punchh user_id. |
| fav_locations.channel | String | Channel for favorite location |
| fav_locations.location_id | Integer | Location ID generated by the Punchh system |
| fav_locations. user_favourite_location_id |
Integer | User’s favorite location ID generated by the Punchh system |
| fav_locations.user_id | Integer | User ID generated by the Punchh system |
| fav_locations. business_id |
Integer | Business identification at the Punchh platform |
| fav_locations. business_uuid |
String | UUID of the business configured in the Punchh platform. This code is used for POS integration |
| fav_locations. created_at |
Date_time | Date/time when the user's favourite location was created in the system in ISO 8601 format |
| fav_locations. updated_at |
Date_time | Date/time when the user's favourite location was updated in the system in ISO 8601 format |
| favourite_store_numbers | String | List of store numbers of favorite locations of the user |
| fb_uid | String | Facebook ID that identifies the end-user |
| first_name | String | First name |
| gender | String | Gender |
| guest_type | String | Type of user (i.e., eClub or loyalty) |
| joined_at | Date_time | Timestamp when the loyalty user signed up |
| last_activity_at | Date_time | User’s last activity timestamp |
| last_name | String | Last name |
| marketing_email_ subscription |
Boolean | Whether the end-user has subscribed to marketing emails or not |
| marketing_pn_ subscription |
Boolean | Whether the end-user has subscribed to marketing push notifications or not |
| phone | Integer | Phone number |
| preferred_locale | String | Preferred language |
| profile_fields.answer | String | Custom profile field answers as configured in Punchh |
| profile_fields.code | String | Custom profile field code as configured in Punchh |
| profile_fields.question | String | Custom profile field question as configured in Punchh |
| profile_fields.upf | String | Custom profile field upf number as configured in Punchh. It could range from upf0-upf24 (Punchh supports a maximum of 25 custom profile fields). |
| referral_code | String | Referral code of the end-user |
| secondary_email | String | Secondary email of the user is configured when a user signs up with Facebook but does not share the email ID. The app asks for an alternate email, which is kept as the `secondary_email`. |
| signup_channel | String | Sign-up channel of the user |
| sms_subscription | Boolean | Whether the end-user has subscribed to SMS services or not |
| state | String | State where the end-user lives |
| terms_and_conditions | Boolean | Whether terms and conditions of a business have been accepted by an end-user or not |
| title | String | Salutation as selected by the end-user |
| updated_at | Date_time | Date/time when the user was updated in the system in ISO 8601 format |
| user_id | Integer | User ID generated by the Punchh system |
| user_relations.birthday | Date | Birthday of the person related to the end-user in YYYY-MM-DD format |
| user_relations.name | String | Name of the person related to the end-user |
| user_relations.relation | String | The relationship of the person with the end-user. Valid relations are spouse and child. |
| user_relations.user_id | Integer | User ID generated by the Punchh system |
| user_relations. user_relation_id |
Integer | ID assigned to the person related to the end-user |
| user_relations. business_id |
Integer | Business identification at the Punchh platform |
| user_relations. business_uuid |
String | UUID of the business configured in the Punchh platform. This code is used for POS integration. |
| user_relations. created_at |
Date_time | Date/time when the user relation was created in the system in ISO 8601 format |
| user_relations. updated_at |
Date_time | Date/time when the user relation was updated in the system in ISO 8601 format |
| user_status | String | Status of the user (i.e., active, banned, or deactivated) Note: Punchh does not send guest events for users with deleted, anonymized, or archived status, as personally identifiable information (PII) is not stored once a guest is moved into these statuses. |
| unsubscribe_reason | String | Unsubscribe reason |
| unsubscribed | Boolean | Unsubscribe status |
| zip_code | String | Zip code where the end-user lives |
| current_sign_in_at | Date_time | Date and time when a user most recently logged into the system |
| current_sign_in_ip | String | IP address of the device from which the user has most recently logged in |
| invite_code | String | Invitation code received by the user via e-mail or social media channels (e.g., WhatsApp, Facebook, etc.) |
| last_user_agent | String | User agent string of the most recent session or request made by the user. This string identifies the software, device, and application initiating the request, providing information about the client. |
| referred_by_ID | Integer | Unique identifier of the user who referred the user to the Punchh loyalty program. This ID helps in tracking referral activities, attributing new user sign-ups or actions to the correct referrer, and managing referral programs. |
| time_zone | String | Time zone in which the business is located |
| email_confirmation_url | String | URL that is sent to a user as part of an email verification process. This URL is designed to confirm the user's email address, ensuring it is valid and belongs to the user. |
| reset_password_url | String | URL that is sent to a user for resetting the password. This URL opens a page in the browser where the user can set a new password. |