Group: Update Node

The Group: Update Node allows a workflow to update an existing Experience Group inside the current application, and optionally add the updated group to the current workflow payload.

Group: Update Node

Configuration

For finding the group to update, the node can find by group ID. This field is templatable, so it supports finding a group based on the current workflow payload. The example below is doing exactly that, and is referencing the field working.groupId on the workflow payload.

Group: Update Node Configuration

Individual Fields

Group: Update Node Individual Fields

Using this option, the block configuration is separated into various string templates fields:

  • Name—Name of the group.
  • Description—Description of the group.
  • Group ParentParent group of the group to be updated.
  • DevicesAdvanced query that defines the devices to be associated with the updated group.
  • Group TagsTags to apply to the new group.
  • Members—Add, remove, or replace all existing group users.

JSON Template

The input must be a JSON template string that can be parsed into a JSON object that validates against the Experience Group Patch schema:

{
  "description": "{{working.group.description}}",
  "name": "{{working.group.name}}"
}

Payload Path

The input must be a payload path that points to an object on the current workflow payload that validates against the Experience Group Patch schema.

Result

Optionally, you may provide a payload path at which to place the result of the operation.

Group: Update Node Result

Node Example

Upon successful execution, this is a possible result for a successful group update:

{
  ...
  "working": {
    "groupResult": {
      "experienceUserIds": [],
      "experienceEndpointIds": [],
      "deviceTags": [],
      "deviceIds": [],
      "parentId": null,
      "id": "60a2b1575847af0006534391",
      "experienceGroupId": "60a2b1575847af0006534391",
      "groupTags": {},
      "lastUpdated": "2021-05-20T21:54:34.911Z",
      "creationDate": "2021-05-17T18:09:27.157Z",
      "applicationId": "5f15cb3e09710700069925ec",
      "name": "ChangedName"
    }
  }
  ...
}

Node Errors

If the Group: Update Node encounters an error, it will be placed on the payload at the configured result path like so:

{
  ...
  "working": {
    "groupResult": {
      "error": {
        "message": "name is wrong type",
        "type": "Validation"
      }
    }
  }
  ...
}

Was this page helpful?


Still looking for help? You can also search the Losant Forums or submit your question there.