---
title: Scripting tips
description: User self-service journeys primarily use PingIDM nodes.
component: pingoneaic
page_id: pingoneaic:self-service:scripting-for-user-self-service
canonical_url: https://docs.pingidentity.com/pingoneaic/self-service/scripting-for-user-self-service.html
keywords: ["Journeys", "Nodes &amp; Trees", "Shared State", "Scripts"]
section_ids:
  access_idm_properties_in_scripts: Access IDM properties in scripts
---

# Scripting tips

## Access IDM properties in scripts

User self-service journeys primarily use PingIDM nodes.

Nodes save data in the shared state of journeys. PingIDM nodes save data in the shared state differently than other nodes.

You can extend the functionality of journeys using scripts you write in the [Scripted Decision node](https://docs.pingidentity.com/auth-node-ref/latest/scripted-decision.html).

When you use a [Scripted Decision node](https://docs.pingidentity.com/auth-node-ref/latest/scripted-decision.html) node to access properties saved in the shared state by PingIDM nodes, you must reference the IDM properties using the `objectAttributes` object.

For example, to access the first name (`givenName`) from the shared state, returned from an PingIDM node, you would use the syntax:

```js
var firstName = objectAttributes.get("givenName").asString();
```

Find information on accessing [IDM properties](../identities/user-identity-properties-attributes-reference.html#reference-tables) in scripts and the shared state in [auth scripting](../developer-docs/scripting-auth.html).
