---
title: Scripting tips
description: Access managed object attributes in Advanced Identity Cloud journey scripts using the objectAttributes object in Scripted Decision 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
llms_txt: https://docs.pingidentity.com/pingoneaic/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
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

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).
