Re: How to use "oN24 Attendee" script-accessible objects

Yan_Mak
Level 2

How to use "oN24 Attendee" script-accessible objects

Hi, 

 

I am trying to see what I can do with the:
${oN24Attendee_cList.get(0).eventid} or ${oN24Attendee_cList.get(0).email} On24 Attendee Object.

 

My idea is to look up the ON24 event id to check if the lead $attendee the webinar or not. I think this should be possible by using oN24Attendee_cList.get(0).eventid?? 

Something like this? 

 

#foreach( $attendee in $oN24Attendee_cList )
#if($attendee.eventid == 3046872)
<h4>I watched Webinar</h4>
#elseif ( Lead is noshow??)
<h4>I did not watched Webinar</h4>
#end
#end

 

14 REPLIES 14
SanfordWhiteman
Level 10 - Community Moderator

Re: How to use "oN24 Attendee" script-accessible objects

Hi,

 

Why would you be using the first (0th) object in the list?  Don’t you want to act on the object that pertains to their most recent webinar?

SanfordWhiteman
Level 10 - Community Moderator

Re: How to use "oN24 Attendee" script-accessible objects


#foreach( $attendee in $oN24Attendee_cList )
#if($attendee.eventid == 3046872)
<h4>I watched Webinar</h4>
#elseif ( Lead is noshow??)
<h4>I did not watched Webinar</h4>
#end
#end

This is somewhat of a start, though you should be using .equals(), not ==.

 

But you have to know the property names (field names on the CO). Not sure what you’re trying to do here. It seems like you want to switch on some other property name, but you need to find that name in the tree in Script Editor.

Yan_Mak
Level 2

Re: How to use "oN24 Attendee" script-accessible objects

Hi, 

I don't see other names on the tree in Script Editor. 😖

I am trying to show content on top of the email or on the bottom of the email depending on the lead attendee some webinars from the past. 

 

I did a test on myself, which I attended the webinar, and the "I watched webinar" and the "I did not watch the webinar" both show up on the email. So I am just thinking maybe I can add an "else if" for the "did not watch"? 

SanfordWhiteman
Level 10 - Community Moderator

Re: How to use "oN24 Attendee" script-accessible objects


I don't see other names on the tree in Script Editor. 😖

Then you have no other fields to determine what they did during the webinar or not? That isn’t right. There should be a number of fields detailing the person’s attendance (minutes watched, etc.). That’s what makes the custom object useful as opposed to just program status (which you also must have).

 

Anyway, your other logic does not make sense. You need to avoid code for the moment because I can tell Velocity is unfamiliar. Describe your technical goals in full — don’t try to write Velocity.

Yan_Mak
Level 2

Re: How to use "oN24 Attendee" script-accessible objects

Here are the goals:

In a smart campaign, it will send out a dynamic content email:

- If watched the selected webinar, then that related content will show at the bottom of the email.

- If did not watch the selected webinar, then that related content will show at the top of the email.

 

There will be 5 past-selected webinars.  So I want to look up 5 webinar IDs.

*But I will talk with our Admin, I don't know why I only see oN24 Attendee on the tree, hope is something show and hides on the setting. 

Jo_Pitts1
Level 10 - Community Advisor

Re: How to use "oN24 Attendee" script-accessible objects

@Yan_Mak ,

are you saying you want to display content for EACH of the five webinars - with content for the un-watched Webinars at the top and the content for the watched Webinars at the bottom?

Cheers

Jo

Yan_Mak
Level 2

Re: How to use "oN24 Attendee" script-accessible objects

@Jo_Pitts1 

Yes.

Jo_Pitts1
Level 10 - Community Advisor

Re: How to use "oN24 Attendee" script-accessible objects

OK.  And does the ON24 list ONLY have records for the Webinars that have been viewed by a Person?

 

Yan_Mak
Level 2

Re: How to use "oN24 Attendee" script-accessible objects

@Jo_Pitts1 

Yes, only oN24 Attendee on the tree.