All Collections
Webhooks
New Signup (lead_signup) webhook
New Signup (lead_signup) webhook
Virgil avatar
Written by Virgil
Updated over a week ago

The 'lead_signup' webhook is fired when a new lead is created with/switched to the "signup" state - more exactly, when the user signs up to a trial or free account. The most important data sent with the webhook event payload:

Event

This object contains information about the event webhook. The most important fields are:

  • type - eq. "lead_signup" - webhook event type. All webhooks contain the event.type field, you need to use this field in a condition to determine the actions needed to take for this kind of webhook.

  • created_at - eq. "2017-10-13T15:46:01.606Z" - date and time when the event occurred.

Data

This object contains the data of the object who determined the event.

  • id - eq. "90" - lead id

  • state - eq. "signup" - current state of the lead. Most likely it will be "signup" in this case.

  • first_name - eq. "John" - lead first name

  • last_name - eq. "Doe" - lead last name

  • email - eq. "[email protected]" - lead email. It can't be be blank.

  • uid - eq. "cust_43gret43ggdt5gf" - billing customer id which was passed as the "uid" parameter through the javascript signup tracking function. This is an alternative(and more precise identification) for "email" in case the email is not stored in the billing provider or can be changed in the trial period. If you haven't passed this information, the field will be empty.

  • customer_since - eq. "null" - this will always be null at the "signup" state

  • plan_name - eq. "null" - this will always be null at the "signup" state

  • promoter - JSON containing information about the promoter who referred the lead.

  • promotion - JSON containing information about the promotion who referred the lead.

Promoter JSON :

  • id - eq. "234" - id of the promoter

  • cust_id - eq "23452" - an ID to help you identify the promoter in you system in case he/she is a customer/user.

  • auth_token - eq "da954kn43856nacueroytnjrwg46k5" - authentication token

  • earnings_balance - eq. "{'cash' : 20000}" or "{'free_month' : 2} or "{'credits' : 20}- JSON containing the total amount of rewards promoter earned

  • current_balance - JSON containing remaining amounts after payments/fulfillments

  • paid_balance - JSON containing paid/fulfilled amounts

  • email - promoter email

  • temp_password - eq. "dsf23fd3" - temporary password generated - can be used for login only if the promoter sign up page doesn't include the password field and promoter hasn't set his own password

  • profile - eq. "{'first_name':'John', 'website':'mywebsite.com'}" - JSON containing information about the promoter including name, website, social accounts, etc

Promotion JSON:

  • campaign_id - eq. "234" - id of the campaign where the promotion runs

  • promoter_id - eq "23452" - id of the promoter/affiliate who runs this promotion

  • status - eq. "offer_running" or "offer_inactive" - current offer status. 

  • promo_code - eq. "JOHN20" - discount/credit coupon used(if applied)

  • ref_id - eq. "johndoe" - the promotion referral id

  • ref_link - eq. "http://yourwebsite.com/#_r_johndoe" - the promotion referral link

  • current_offer - eq. "{ 'name': '1 free month', amount: 1, unit: 'free_months'}" - JSON with information about the current offer available to the lead. If the promotion status is "offer_running" than you can apply it to the lead.

To add a webhook in FirstPromoter, you will need to access Campaigns - Edit Campaign - Finish - Show extra options (campaign level-up and webhooks) - Webhook URLs - Add the desired webhook URL and test it by clicking on "Test webhook" - Save.

Did this answer your question?