SOLVED

Custom object field token based on edge object

Subscribe
Go to solution
Diego_Lineros2
Level 7

Hello,

 

I have a Many to Many setup, this is not the real case but imagine I have my CO bridge as email and Course. Then I have an edge CO with Course and availability.

Email |<--> | Email -- Course |<--> |Course --Availability|

 

I want to send an email to people who has course availability = yes , which is not a problem from the smart list perspective, but I want to say in the email which course. The problem is that the Edge CO is not available in the scripting to apply the logic, is this possible somehow or a very long shot ?

 

Dear email

1 ACCEPTED SOLUTION
SanfordWhiteman
Level 10 - Community Moderator

Set up a static {{my.token}} like so:

#set( $edges = [
  { 
     "edgeField1" : "value",
     "edgeField2" : "value"
  },
  { 
     "edgeField1" : "value",
     "edgeField2" : "value"
  }
] )

 

Then you can read the junction objects at runtime and look up in the array of edge objects to get the edge props.

View solution in original post

3 REPLIES 3
SanfordWhiteman
Level 10 - Community Moderator

Sorry, no. You can’t access the edge object. What we sometimes do is inject the edge objects (if there aren’t too many of them) as JSON in {{my.tokens}} and then read from there.

Diego_Lineros2
Level 7

Interesting, I actually don't have many. Do you have more information about injecting the edge objects as JSON?

SanfordWhiteman
Level 10 - Community Moderator

Set up a static {{my.token}} like so:

#set( $edges = [
  { 
     "edgeField1" : "value",
     "edgeField2" : "value"
  },
  { 
     "edgeField1" : "value",
     "edgeField2" : "value"
  }
] )

 

Then you can read the junction objects at runtime and look up in the array of edge objects to get the edge props.