Skip to main content
Answered

Send event based SMS without customer email


Hi, I am trying to send an automated outbound SMS message for a referral program, which is triggered by an event we send from within our backend software. 

In the past, we have been able to use the customer’s email to identify their contact info in Intercom, but in this case, we want to send texts to new users whose email we may not have yet, we will have just their phone number. 

Is there a way to send an event without needing the email field, or a way to workaround this limitation?

Typically we’d send an event with the payload like this: 

const data = {
      eventName: InterCommEventNames.refer_a_friend_invite,
      createdAt: Math.round(Date.now() / 1000),
      email: "",
      metadata: {
        referrer_customer_id: lytCustomer.id,
        referrer_customer_email: customer.email,
        referrer_first_name: customer.firstName,
        referrer_last_name: customer.lastName,
        referral_code: referral.referral_code,
      },
    };

But if I try to drop the email parameter and include phone instead, it gets rejected by the API client for missing parameter. 

Best answer by Racheal

Hey Daniel Racheal from the support engineer team here👋 

 

In order to submit an event for a user you will need either their user_id, Intercom_id, or email. So as long as you replace email with one of the two emails you should be able to send that request over! You can read more on this here.

View original
Did this topic help you find an answer to your question?

3 replies

Racheal
Intercom Team
Forum|alt.badge.img+5
  • Customer Support Engineer
  • 512 replies
  • Answer
  • August 29, 2023

Hey Daniel Racheal from the support engineer team here👋 

 

In order to submit an event for a user you will need either their user_id, Intercom_id, or email. So as long as you replace email with one of the two emails you should be able to send that request over! You can read more on this here.


Thanks Racheal, I was able to get this worked out as you described. I first had to create a new user with just a phone number and retrieve their id, and I can send the event that way. 


  • New Participant
  • 1 reply
  • August 29, 2023

An SMS-to-email gateway allows you to send and receive SMS messages through a virtual number via email. Without getting too technical, email to ...


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings