User

A user within the CloudVault system.

Fields

address_1 (String)

User address line 1.

address_2 (String)

User address line 2.

city (String)

User city.

country_code (String!)

User country code (ISO 3166-1).

email (String!)

The email address for the user.

enterprise_license_agreement (Boolean!)

Has this user's employer opted into the enterprise license agreement.

first_name (String!)

The first name of the user.

last_name (String)

The last name of the user.

license_type (UserLicense!)

The type of license currently assigned to the user.

logos (LogosQueryResult)

A list of logos for this user.

Argument Type Description
pagination Pagination!

Paginate the results.

sentera_id ID

Retrieve the logo with the given Sentera ID.

organization (Organization!)

The organization this user belongs to.

organization_maps (JSON!)
Deprecation notice

Please use the organizations query instead to build the organization hierarchy.

A list of organization hierarchies comprised of the user's home organization
and any organizations the user is partnered with, returned as a JSON array of
hashes. Available keys in each hash are sentera_id (string), name (string) and
children (array). This structure is recursive.

phone_number (String)

The phone number for the user.

preferences (UserPreferences!)

The app preferences for this user.

roles ([UserRole!]!)

An array of all of the user's roles.

sentera_id (ID!)

A system-generated key identifying a specific instance of a user.

signatures (SignaturesQueryResult)

A list of signatures for this user.

Argument Type Description
pagination Pagination!

Paginate the results.

sentera_id ID

Retrieve the signature with the given Sentera ID.

state (String)

User state/province/region code (ISO 3166-2).

status (UserStatus!)

The current status of the user.

zip_code (String)

User zip code.

Examples

User

Return the current user.

Try this example in GraphiQL
query FetchUser {
  user {
    first_name
    last_name
    sentera_id
    address_1
    address_2
    city
    state
    country_code
    zip_code
    status
    roles
    license_type
  }
}

{
  "data": {
    "user": {
      "first_name": "John",
      "last_name": "Doe",
      "sentera_id": "vivlax4_US_sdwwAcmeOrg_CV_shar_b292b84_180501_214632",
      "address_1": "123 Apple St.",
      "address_2": "Apt 1",
      "city": "Peoria",
      "state": "IL",
      "country_code": "US",
      "zip_code": "54321",
      "status": "ACTIVE",
      "roles": [
        "CLIENT_ADMIN",
        "DOCUMENTATION_READER",
        "API_INTEGRATOR"
      ],
      "license_type": "ENTERPRISE"
    }
  }
}

User with Organization Maps

Returns the current user's organization maps. In FieldAgent, every user has a "Home" organization, which is the organization the user belongs to. In addition, a user can be partnered with one or more other organizations. Being partnered with another organization means this user is allowed to access information in that organization, as well as information in its child organizations. In the example below, the current user's home organization is named "Acme Organization", and this user is partnered with the "Roadrunner Organization". The "Roadrunner Organization has one child organization named "Coyote Organization".

Try this example in GraphiQL
query FetchUser {
  user {
    organization_maps
  }
}

{
  "data": {
    "user": {
      "organization_maps": [
        {
          "sentera_id": "i1iqp00_OR_sdwwAcmeOrg_CV_shar_b292b84_180501_214559",
          "name": "Acme Organization",
          "children": []
        },
        {
          "sentera_id": "m8jdw49_OR_xcweRoadrun_CV_shar_p0364z92_190917_348923",
          "name": "Roadrunner Organization",
          "children": [
            {
              "sentera_id": "g72sa3v_OR_xcweCoyoteO_CV_shar_p0364z92_190923_155321",
              "name": "Coyote Organization",
              "children": []
            }
          ]
        }
      ]
    }
  }
}

User preferences

Returns the current user's application preferences. This currently includes preferred language and preferred units of measurement.

Try this example in GraphiQL
query FetchUser {
  user {
    preferences {
      language_code
      unit_system
      notification_delivery {
        growth_stage
        disease
      }
    }
  }
}

{
  "data": {
    "user": {
      "preferences": {
        "language_code": "EN",
        "unit_system": "IMPERIAL",
        "notification_delivery": {
          "growth_stage": true,
          "disease": true
        }
      }
    }
  }
}

User signatures

Gets a list of a user's signatures to select for display on a report.

Try this example in GraphiQL
query FetchUserSignatures {
  user {
    signatures(pagination: { page: 1, per_page: 100 }) {
      total_count
      results {
        title
        body
      }
    }
  }
}

{
  "data": {
    "user": {
      "signatures": {
        "total_count": 1,
        "results": [
          {
            "title": "My signature",
            "body": "Lorem Ipsum"
          }
        ]
      }
    }
  }
}

User logos

Gets a list of a user's logos to select for display on a report.

Try this example in GraphiQL
query FetchUserLogos {
  user {
    logos(pagination: { page: 1, page_size: 100 }) {
      total_count
      results {
        title
        file {
          filename
        }
      }
    }
  }
}

{
  "data": {
    "user": {
      "logos": {
        "total_count": 1,
        "results": [
          {
            "title": "Report Logo",
            "file": {
              "filename": "logo.jpg"
            }
          }
        ]
      }
    }
  }
}