Introduction
  • 23 Sep 2021
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

Introduction

  • Dark
    Light
  • PDF

Article Summary

The app runtime provides the following suite of objects - always accessible to your scripts. Collectively, they are referred to as a graph.

Documentation describing each object's properties and functions is also provided.

NameDescription
debugAccess debugging features useful during testing
runtimeAccess to runtime information
toolsAccess to a collection of general purpose tools
scriptAccess input parameters to your script (when applicable)
userAccess user interactions such as alerts and input validation
appAccess your app and its objects directly
teamsAccess your organization's Teams communications
avatarAccess connected avatar (person, place, or thing)
aiAccess intelligence features (i.e. insights, models, etc)
iotAccess measurements captured from the Internet of Things (IoT) (i.e. medical devices)
cacheAccess a cache resource throughout the entire app lifecycle
networkAccess external Internet resources

Using Graph Objects

To demonstrate how scripting objects are used, below is an example app script that gets the user's first name from an app object (named 'firstName' in your app) and then displays a personalized welcome message (i.e. 'Hello, Jane!').

This task is easily accomplished using the app and user objects in just two lines of code!

// read the user's first name
var name = app.get('[firstName]');

// display a personalized welcome message
user.alert('Hello, ' + name + '!');

Note: Scripting objects are always accessible within your scripts.


What's Next