Using inside JavaScript area

If you want to access session parameters inside a JavaScript editor in a flow, you can access them like _scd.userName. Check the table at the end of the page for the complete set of variables.

Using on components (such as Label)

You may also put session variables inside any component that can show a text value. For example, you may create a profile page and set the text value of a Label component from session variables by setting the value to something like ${scd.userName}.

Using on REST editor and Model filters

It is also easy to use session variables on Parameter pages. When you choose User/Session for the Source field, you can send session values. You don't need to use scd or _scd prefix on Parameter dialogs. You may use the variable name directly, as shown in the picture below. In this case, it is userId.

Complete list of session variables

Complete a list of session variables with sample values.

Key

Sample Value

Description

roleId

"roleId":"ZCMLupofhy"

User's Role Id

fullName

"fullName":"Test User"

User's Name

rbac

"rbac": 1

If Role Based Authentication Control is enabled for the project via User Management Plugin.

sessionId

"sessionId": "31BFCA8576E417D36999B8AE0159C734"

Session Id If user logged in

userName

"userName":"user@user.com"

User’s Username

locale

"locale":"en"

Locale

userId

"userId":552

User’s Id

projectName

"projectName":"Eatit.com"

Project Name

projectId

"projectId":"e003548a-a8c9-40d2-86b9-4346cd993baa"

Project Id

email

"email":"user@user.com"

User’s Email Address

preview

"preview":"true"

If the session is in Preview mode

Did this answer your question?