Action not working in preparation of email

Action not working in preparation of email


Platform version 9.1.501 in cloud.

I've got an action that calls an email.  In the preparation of that email I call an action (Session_GetDomain) that exists in a different espace to get the domain so I can insert it into an expression for a URL (they could be coming from one of two subdomains).  It looks like this - note that the first two actions are the same ones that happen in the preparation of the EmailAccountActivation, but since it wasn't working there I tried running them here and passing them as parameters:

Here is the preparation of the EmailAccountActivation:

I've added four expressions to the email - two for the parameters that are passed and two for the output of the functions in the preparation.  The Session_GetDomain returns nothing when it is run in the preparation of the email, the passed parameter has exactly what I am expecting. 

Any thoughts as to why the preparation of the email wouldn't be able to get the same results?  Session_GetDomain has no inputs, it is a very simple function that gets a session variable from an underlying espace and passes it back.



Hi Cory,

Session variables are stored per user on the client side and the emails are handled server side that does not have access to the session variables, that would be why the session variable is returning nothing.

You would need to call the Session_GetDomain before you call the email, and pass it in as a parameter to the email in order to get this value.

Let me know if this helps,



Your explanation matches what I see happening.