Email Script Question | Community
Skip to main content
Jason_Scott
Level 4
Aug 27, 2019 8:51 PM UTC
Question

Email Script Question

I'm looking to use an email script to set a url based on a SFDC custom object which would contain the eventdate and eventname. Below is what I'm looking to do.

For the event custom object

if the eventDate is today and eventName is conference then insert url A

if the eventDate is today and eventName is meeting then insert url B

Else insert url C

Seems so simple and I'm sure this is something that can be done but I'm not sure where to start.  Have you implemented something similar?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

6 replies

Jason_Scott
Level 4
Aug 27, 2019 9:02 PM UTC

No, not looking to output every record.  There should only be one record per day max and I'm only looking to output if the eventdate is today.

Translate
SanfordWhiteman
Level 10
Aug 27, 2019 9:32 PM UTC

"should" isn't good enough for a spec though.

Let's say you will

  • sort the list by by eventDate, descending
  • output the first record whose eventDate matches today, if such a record is present

What timezone are the eventDate values based on (yes, this too matters)?

And have you read such things as https://blog.teknkl.com/velocity-days-and-weeks/ ?

Translate
Jason_Scott
Level 4
Aug 28, 2019 1:39 AM UTC

Thanks for sharing the link, I'll take a look.  There's only on record per day max.  Timezone is eastern.

Translate
SanfordWhiteman
Level 10
Aug 27, 2019 8:58 PM UTC

You're talking about a list of CO records (it's always a list, even if it's a list of 0 or 1). 

Are you outputting every record? (Yes, this matters a lot due to the vagaries of Marketo link tracking.)

Translate