Custom Object Data within a Text Message or Webhook

James_Walsh
Level 3

Custom Object Data within a Text Message or Webhook

Hello,

I currently have a generic text message campaign that goes out to customers who missed a monthly payment on their policy. We would like to start including the amount of money they owe as well as the date the payment was due. Unfortunately this data is only stored within a Custom Object. I tried to use Velocity Scripting in order to populate the text but I do not believe Texts/Webhooks can utilize Custom Object data. Is anyone aware of a workaround for this? Or is it possible to send the data that is within the person Custom Object to the person object so that we can use it?

Thanks,

Jim

9 REPLIES 9
SanfordWhiteman
Level 10 - Community Moderator

Re: Custom Object Data within a Text Message or Webhook

Send an alert to an SMTP processing endpoint (using SMTP more as a transport protocol here, not as "mail" in the informal sense). Then relay the contents to your next-hop HTTP service.

We currently do this for a couple of clients, with great success, using AWS SES & Lambda.

James_Walsh
Level 3

Re: Custom Object Data within a Text Message or Webhook

Thanks for this Sanford. I was able to do this using Parsuer. One additional question that I'm not sure you'd be able to answer but when I send this information (policy number, payment amoun etc) to Zapier to upload the person object back into Marketo, it looks like the unique identifier it is using is email address. Unfortunately a large amount of our clients do not have an email address. Is it possible to update the record based on Marketo ID?

SanfordWhiteman
Level 10 - Community Moderator

Re: Custom Object Data within a Text Message or Webhook

I wouldn't use Zapier, you're just adding opacity compared to building your own function.

Yes, a Marketo API-based upsert can certainly dedupe on the Lead ID (I assume the Zap can but I'm not interested enough to check ).

But I'm confused about your approach here. If, as in your original question, you want to send the CO data via SMS, then why do you ever need to write back to Marketo? It's a losing battle: when you write CO data back to a flat lead field, you lose the one-to-many relationship that would lead you to use COs in the first place. If, in contrast, you wrote the whole list of COs back to a Textarea field (as JSON) then you wouldn't lose anything -- but you also couldn't send that whole {{lead.token}} to the SMS provider and would need to send it via another webhook gateway to parse it out!

Amit_Jain
Level 8 - Community Advisor

Re: Custom Object Data within a Text Message or Webhook

I have used Zapier and confirm it only updates marketo based on email address.

At the same time, agree to Sanford, why are you syncing data back in Marketo? Since you mentioned Zapier, assuming you are using Zapier email parser, why don't you send SMS from Zapier itself?

Regards,
Amit

bpavuluru
Level 1

Re: Custom Object Data within a Text Message or Webhook

Hi Sanford,

I am new to Marketo, may i know how we can setup SMTP in marketo? i dont have clue about that. Kindly help me.

 

Regards,

Bhaskar

SanfordWhiteman
Level 10 - Community Moderator

Re: Custom Object Data within a Text Message or Webhook

Not sure what you mean by “setup SMTP” but can you please open a new thread in Products explaining your goal?

Jay_Jiang
Level 10

Re: Custom Object Data within a Text Message or Webhook

If you're using Salesforce - you can write some Apex or try using process builder to populate the customfield on the lead/contact object. Marketo can trigger off that field being changed && not empty and then clear that field after sending the SMS

But if you're not using salesforce - then as Sanford mentioned, you'll need to utilise email alerts + velocity script with custom object data to an email parsing service that can extract data and send it back to the lead record via a webhook. Google email parser and you'll find some vendors

James_Walsh
Level 3

Re: Custom Object Data within a Text Message or Webhook

Thanks for this Jay. I was able to do this using Parsuer. One additional question that I'm not sure you'd be able to answer but when I send this information (policy number, payment amoun etc) to Zapier to upload the person object back into Marketo, it looks like the unique identifier it is using is email address. Unfortunately a large amount of our clients do not have an email address. Is it possible to update the record based on Marketo ID?

Jay_Jiang
Level 10

Re: Custom Object Data within a Text Message or Webhook

To answer your question directly:

I'm not sure about Zapier's customisation. I've always written my own "zaps" when it comes to Marketo using php + our webserver. You can do something similar - Marketo webhook to Parsuer to [php] handler to Marketo. You'd need to apply REST API to send the data back to marketo.

To echo Sanford's point above:

Why don't you go directly from Parsuer to SMS?