SOLVED

Re: Condition: If a field value equals other field

Go to solution
Eben_Saputra
Level 3

Condition: If a field value equals other field

Hey guys,

I want to create an appointment reminder where it can show multiple appointments in one email

Let' say a client is going for treatment at these clinics, in one same day

Appt 1: Place A

Appt 2: Place A

Appt 3: Place B

And we want to show clinic info, for different places they will go to

The catch is, we don't want to show duplicate info. In this case, we only want to show "Place A" info once in the email

How can I achieve this?

I have been looking at smart list condition, but the don't have anything close to "if fields 1 equal to ANY fields 2 or 3"

There are 150+ clinics btw, so typing "if fields 1 equal to <clinic name>" one by one is out of the question.

Tags (1)
2 ACCEPTED SOLUTIONS

Accepted Solutions
Josh_Hill13
Level 10 - Champion Alumni

Re: Condition: If a field value equals other field

No, you cannot do that matching in Marketo.

You can create a webhook or other process to do that data for you. Openprise maybe?

Velocity scripting may work better to handle this situation.

View solution in original post

SanfordWhiteman
Level 10 - Community Moderator

Re: Condition: If a field value equals other field

Well, it looks like you’re trying to pass JavaScript, but that would use keyword true, not True.

 

But infinitely more important: you need to have a webhook-compatible service! You can’t pass JS to itself, it needs to hit a service that runs the code and instantly returns the result.

 

Once you have that, your payload would be as simple as:

sameDomain = {{lead.Email Domain}} === {{lead.Email Domain (A)}};

 

View solution in original post

6 REPLIES 6
Josh_Hill13
Level 10 - Champion Alumni

Re: Condition: If a field value equals other field

No, you cannot do that matching in Marketo.

You can create a webhook or other process to do that data for you. Openprise maybe?

Velocity scripting may work better to handle this situation.

SanfordWhiteman
Level 10 - Community Moderator

Re: Condition: If a field value equals other field

No need to do it at the qualification (Smart List) level, like Josh says this is easy-peasy in Velocity as you have access to all the appts before you output anything.

Julietmc
Level 1

Re: Condition: If a field value equals other field

Hi Sanford,

 

I am trying to work with similar logic but for the sake of a smart list to qualify program members. We have a SFDC data issue that is causing outsider contacts to be added under accounts improperly, and we are tending to this but are unsure if it will be resolved by the time we need my program to deploy. I am trying to make sure that the smart list only qualifies records whos email domain matches the email domain listed on the account record. So what I am trying to say is:
Email Domain is equal to Email Domain (A)

(First field at person level and second one at account level)

 

Is this only possible through the webhook function?

 

Julietmc_0-1655393055118.png

 

Darshil_Shah1
Level 10 - Community Advisor

Re: Condition: If a field value equals other field

You'd need a webhook to compare the values in both the fields, you can write the result (values are same or not) in a seperate field  (i.e., map the webhook response with the result field) and go about using the contents of this result field in your SL to identify the people for whom the values match/doesn't match.

 

Julietmc
Level 1

Re: Condition: If a field value equals other field

Thanks Darshil! Can you check my logic and let me know if I am on the right track?

 

if {{lead.Email Domain:default=edit me}} = {{company.Email Domain (A):default=edit me}}; let SameDomainTrueBoolean = True 

Julietmc_0-1655414458637.png

 

Julietmc_1-1655414478671.png

 

+ an operational smart campaign. 

SanfordWhiteman
Level 10 - Community Moderator

Re: Condition: If a field value equals other field

Well, it looks like you’re trying to pass JavaScript, but that would use keyword true, not True.

 

But infinitely more important: you need to have a webhook-compatible service! You can’t pass JS to itself, it needs to hit a service that runs the code and instantly returns the result.

 

Once you have that, your payload would be as simple as:

sameDomain = {{lead.Email Domain}} === {{lead.Email Domain (A)}};