Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel3

What is external data?

External data can be added to various data types such as ScenarioSessions, and ScenarioSessionParts. This external data is usually supplied during the creation of these data types. A good example is through our DeepLinks, where extra query params within the link are then added as external data to the new ScenarioSession that is created. For more details on adding external data parameters to sessions see : https://scopearcloud.atlassian.net/wiki/spaces/API/pages/1671987201/Using+Deeplinks#Extensibility

...

Certain data types can be queried using external data. For example, this might be useful when trying to retrieve sessions using a work order number that was added as external data.

What data types support external data?

Currently there are a few data types that have external data:

  1. Calls

  2. Scenario Sessions

  3. Scenario Steps

  4. Scenario Session Parts

What types of queries are supported for external data?

...

In the following examples, both ways will be used.

...

Use Cases

There are numerous use cases for external data to retrieve records.

Retrieving Scenario Sessions with External Data

Sessions are created when a user follows a deep link. The extra query parameters get added to the external data of the scenario session.

...

Code Block
{"partNumbers": ["1234-ABCD", "5678-EFGH"]}

There are When using the CONTAINS type, you can have many values for the part numbers so the CONTAINS type should be used if only a single part number is knownnumber. Any session that has one or more of these values for the part number field will be returned by the query.

CONTAINS Query

Code Block
query FetchScenarioSessionsWithContains(
  $first: Int!,
  $type: String!,
  $key: String!,
  $value: Alphanumeric!
) {
  scenarioSessions(
    first: $first, 
    externalData: {
      type: $type, 
      key: $key, 
      value: $value
    }
  ) 
  {
    nodes {
      nodes {
        id
        databaseId
        sessionType
        externalData
        user {
          id
        }
      }
    }
  }
}

...