Advanced Identity Cloud

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.

Compatibility

Product Compatible?

Advanced Identity Cloud

Yes

PingAM (self-managed)

Yes

Ping Identity Platform (self-managed)

Yes

Inputs

This node reads any attributes stored in the shared state by previous nodes in the journey.

Dependencies

This node has no specific dependencies.

Configuration

Property Usage

Attributes

Add the attributes you want to set in the shared state. For each attribute:

  1. Click .

  2. In the Key field, enter the attribute name.

  3. In the Value field, enter the value of the attribute you want to set.

  4. Click Save when you have finished.

Outputs

This node writes any configured attributes and their values to the shared state.

Outcomes

None

Errors

This node doesn’t log any errors or warnings.

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 costCenter attribute in their profile, the journey proceeds without changing the user object.

  • If the user does have a costCenter attribute, the journey uses the Set State node to overwrite the value of that attribute.

journey set state

The user has already authenticated before beginning this journey:

  • The Get Session Data node gets the userName from the session.

  • The Attribute Present Decision node checks the user object to determine whether the user has a costCentre attribute.

    • If the user doesn’t have a costCentre attribute, the journey proceeds to the success outcome.

    • If the user does have a costCentre attribute, the Attribute Present Decision node stores its value in the shared state.

  • The Set State node overwrites the value of the costCentre attribute 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.