Set State node
The Set State node lets you set the values of any configured attributes in the shared state. The node removes any previous values of the specified attributes from all states (transient, secure, and shared) and resets them to the configured values in the shared state.
| Don’t use this node to add sensitive data, such as passwords, to the shared state. |
Availability
| Product | Available? |
|---|---|
PingOne Advanced Identity Cloud |
Yes |
PingAM (self-managed) |
Yes |
Ping Identity Platform (self-managed) |
Yes |
Configuration
| Property | Usage |
|---|---|
Attributes |
Add the attributes you want to set in the shared state. For each attribute:
|
Example
The following sample journey assumes that an organization wants to overwrite the costCenter of specific employees
when they authenticate.
-
If an employee doesn’t have a
costCenterattribute in their profile, the journey proceeds without changing the user object. -
If the user does have a
costCenterattribute, the journey uses the Set State node to overwrite the value of that attribute.
The user has already authenticated before beginning this journey:
-
The Get Session Data node gets the
userNamefrom the session. -
The Attribute Present Decision node checks the user object to determine whether the user has a
costCentreattribute.-
If the user doesn’t have a
costCentreattribute, the journey proceeds to the success outcome. -
If the user does have a
costCentreattribute, the Attribute Present Decision node stores its value in the shared state.
-
-
The Set State node overwrites the value of the
costCentreattribute with the value set in the node configuration. -
The Patch Object node node updates the user object with the new
costCentre. -
If the patch of the user object is successful, the journey proceeds to the success outcome; otherwise, the journey follows the failure outcome.