ApplicationExperience

Group: Get

Get Experience Group Node

The Group: Get Node allows a workflow to retrieve one or more Experience Groups from the current application and add them to the current workflow payload.

Node Properties

Get Experience Group Node Configuration

Query Method

The first step is selecting a query method to use to find a group or group of groups. The Device: Get Node has four query options:

  • Group ID: Give a template or hardcoded Experience Group ID input to retrieve that group and place the group on the payload.

  • Group Name: Give a template or a hardcoded Experience Group name as input to retrieve a specific group, and put that value on the payload.

  • Match All Tags Query: Give a set specific tag key/value pairs to retrieve one or more groups. Any group(s) returned will match all tags in the query. The key/value can be hardcoded or derived from a property on the current payload.

    You may also query by key only or value only. If a key is set without a value, any device that has that key set regardless of the value will be returned. If a value is set without a key, any device that has that value set regardless of the key will be returned.

  • Match Any Tags Query: Give a set specific tag key/value pairs to retrieve one or more groups. Any group(s) returned will match any tags in the query. The key/value can be hardcoded or derived from a property on the current payload.

    You may also query by key only or value only. If a key is set without a value, any device that has that key set regardless of the value will be returned. If a value is set without a key, any device that has that value set regardless of the key will be returned.

Configuration

Depending on the query method selected, you will be able to input a specific Group ID, Group Name, or the tag key/value pairs to find a group or group of groups.

Extra Get Multiple Properties

If Match Any Tags Query or Match All Tags Query has been selected an extra set of properties will appear besides the tags input:

  • Return multiple experience groups?: If you want to return multiple groups from this query, you will need to check this box. This will also alter the return type of the result. If this is checked and nothing is found, an empty array will be returned instead of null. If this is checked and one or more groups have been found they will be returned as an array.

  • Results Per Page: This templatable input is the maximum number of groups to return with one query. The max number of groups that can be returned at once is 1000. The default is 100.

  • Page Number: This is a templatable input that resolves to a number. This number must be greater than 0, and the default is 0. This defines the number of results to skip by multiplying this number by the Results per Page field.

  • Sort Field: This is the field on the group to sort the results by. By default, this field is name. The following are the valid sort fields: name, id, creationDate or lastUpdated.

  • Sort Direction: This is the field that tells the sort field which direction to sort in. By default, this field is Ascending.

Result Path

Get Experience Group Node Result

Result path is required, and is the location on your payload where the results of the query will be placed.

Node Example

The following is an example of retrieving one group with a result path of groupResult:

{
  "data": {
    "query": {
      "name": "myGroup"
      ...
    },
    "groupResult": {
      "name": "myGroup",
      "description": "I'm a group",
      "creationDate": "2017-03-30T00:18:23.902Z",
      "lastUpdated": "2017-03-30T00:18:59.019Z",
      "applicationId": "58dc4ec29e8df60001fbea01",
      "groupTags": [{
        "key": "myKey", "value": "val"
      }],
      "deviceIds": [ "58dc4ec29e8df60001fbea02" ],
      "parentId": null
    }
  },
  ...
}

The following is an example of retrieving multiple groups with a result path of groupResult:

{
  "data": {
    "query": {
      "name": "myGroup"
      ...
    },
    "groupResult": [
      {
        "name": "myGroup",
        "description": "I'm a group",
        "creationDate": "2017-03-30T00:18:23.902Z",
        "lastUpdated": "2017-03-30T00:18:59.019Z",
        "applicationId": "58dc4ec29e8df60001fbea01",
        "groupTags": [{
          "key": "myKey", "value": "val"
        }],
        "deviceIds": [ "58dc4ec29e8df60001fbea02" ],
        "parentId": null
      },
      { ... },
      { ... },
      { ... }
    ]
  },
  ...
}

Node Errors

An error can only halt your workflow when returning multiple groups. If your sort field is not valid (see section above), if page number less than 0 or if results per page is less than 0 or greater than 1000.