---
title: "loadUserInfo | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/ui-framework/widgets/design-editor-commands/load-user-info/"
---

# loadUserInfo

> This command enables you to populate the product in the editor with user data. This is an equivalent of the [loadUserInfo](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/howto/user-info.md) method from the IFrame API.

## Params

- `data` is a set of key-value pairs in the [IUserInfo](https://customerscanvas.com/docs/on-premises/design-editor/iframe-api/reference/design-editor-iframe/interfaces/Editor.Editor.IUserInfo.md) format.
- `options` define how this info should be reflected in the history.

## Example of how to replace text with an option value

Let's imagine that you have a text layer **Name** in your design. Here is a simple example of how to automatically change it to the value selected in the `options` widget:

```json
{
    "type": "design-editor",
    "name": "design-editor",
    "params": {
        "inital": {...},
        "loadUserInfo": {
            "data": {
                "Name": "{{ $['options']._.props.name  }}"
            }
        }
    }
}
```

## Example of working with history

The UI Framework supports the editor restoration by using the [snapshot approach](https://customerscanvas.com/docs/on-premises/ui-framework/howto/restore-editor.md). You can skip adding the loaded user changes to the history as well as replace the last snapshot. In this example, we change the default behavior and do not add a new snapshot, but replace the previous one with user data changes.

```json
{
    "type": "design-editor",
    "name": "design-editor",
    "params": {
        "inital": {...},
        "loadUserInfo": {
            "data": {
                "Name": "John Wood"
            },
            "options": {
                "addSnapshot": false,
                "replaceLastSnapshot": true
            }
        }
    }
}
```
