Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Click on the links below to launch the training and other content.

Table of Contents

You can create, read, and update the user information using the User Manager node.

For example, using this node you can create/update a user in orbita, or you can impersonate a user.

...

The User Manager supports three action types:

  • Read. Query data based on the query defined in the payload

  • Create. Create a new user record based on the payload

  • Update. Update an existing user record based on the payload

Payload

The Payload is a JSON query. See examples in this topic regarding how to construct query params/payload data.

Output

The output from this node is available at msg.data.userData

Read

Getting user information by the logged-in user-id

Code Block
{ "_id": "{{msg.payload.session.user.currentUserId}}"}

Getting user information by a custom user property

Code Block
{ "personaProfile.deviceid": "{{msg.deviceId}}" }

Get orbita user information using firstname

Code Block
{ "firstName" : "john"}

Create

You can create a new record using this option.

Code Block
{ 
    "firstName" : "John",
    "lastName" : "Smith",
    "username" : "jsmith@orbita.ai",
    "provider" : "local",
    "password" : "test",
    "suspended": false,
    "roles": ["admin"],
    "personaProfile": {"title": "CEO", "email": "jsmith@orbita.ai"},
    "avatarSrc": "img/avatar0.jpg",
    "personaType": "58c1733b838fc9bb55ed0828"
}

"username" should be a valid email Id.
"provider" is an Optional parameter.
"suspended" is an Optional parameter.
"roles" is an Optional parameter.
"avatarSrc" is an Optional field.

Update

You can update an existing record with this option

Example 1

Updating the first name.

Code Block
{ 
  "data":{ 
    "firstName" : "Johnny" 
  }, 
  "_id": "58eb67b56e0973476d240425" 
}

Example 2

Updating the persona profile.

Code Block
{ 
  "data": {
    "personaProfile" : {
      "title": "CEO - CoFounder"
    }
  }, 
  "_id": "58eb67b56e0973476d240425" 
}

Video Content

https://cdn.orbita.cloud/assets/orbita/experiencedesigner/Usermanagement.mp4

Supporting Documentation

User Manager node

http://orbita.ai

Related Content

Page Tree
root3.2 Experience Designer Technical Training

...