Set a policy value — thresholds and limits
Schedule a policy value for an organization or a location — a fraud-alert threshold, for instance — and see exactly which value applies right now.
Compliance · a play in 2 steps.
The steps
- Schedule the value — it takes effect on its start instant. — createPolicyValueRecord
- See the value that applies right now — the location’s, else the organization’s, else the platform default. — resolvePolicyValue
The calls
Every operation this use case runs, in the order it first appears, with the request and the response its reference page shows.
createPolicyValueRecord
createPolicyValueRecord — mutation · Schedule a policy value for an organization or a location — e.g. a fraud-alert threshold.
Example request
mutation ExampleCreatePolicyValueRecord($input: NewPolicyValueRecordInput!) {
createPolicyValueRecord(input: $input) {
id
sysId
type
caption
status
parentId
rootId
createdAt
updatedAt
revisionNum
revision
level
key
valueInt
startAt
endAt
}
}
Variables:
{
"input": {
"caption": "Blue jeans",
"key": "<key>",
"valueInt": 1,
"endAt": "2027-01-31T00:00:00.000Z"
}
}
Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.
Example response
{
"data": {
"createPolicyValueRecord": {
"id": "01900000-0000-7000-8000-37386ae00000",
"sysId": "PC-EXMP-0000-000F",
"type": "PolicyValueRecord",
"caption": "Blue jeans",
"status": "active",
"parentId": "01900000-0000-7000-8000-065235280000",
"rootId": "01900000-0000-7000-8000-a093dd800000",
"createdAt": "2027-01-31T00:00:00.000Z",
"updatedAt": "2027-01-31T00:00:00.000Z",
"revisionNum": 1,
"revision": "01900000-0000-7000-8000-b7960e180000",
"level": "<level>",
"key": "<key>",
"valueInt": 1,
"startAt": "2027-01-31T00:00:00.000Z",
"endAt": "2027-01-31T00:00:00.000Z"
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": {
"name": "genesis",
"number": 0
},
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}
resolvePolicyValue
resolvePolicyValue — query · What policy value applies right now (or at a chosen moment) for a location or organization.
Example request
query ExampleResolvePolicyValue($key: String!, $organizationId: ID!, $logicalFacilityId: ID) {
resolvePolicyValue(key: $key, organizationId: $organizationId, logicalFacilityId: $logicalFacilityId) {
key
valueInt
source
recordId
level
startAt
endAt
}
}
Variables:
{
"key": "<key>",
"organizationId": "01900000-0000-7000-8000-44b781470000",
"logicalFacilityId": "01900000-0000-7000-8000-8026f71c0000"
}
Example response
{
"data": {
"resolvePolicyValue": {
"key": "<key>",
"valueInt": 1,
"source": "<source>",
"recordId": "01900000-0000-7000-8000-ea0d77e10000",
"level": "<level>",
"startAt": "2027-01-31T00:00:00.000Z",
"endAt": "2027-01-31T00:00:00.000Z"
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": null,
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}