Caseblocks client
Type: Reference to the Caseblocks Node helper (same family as the published package).
This is a reference to the Caseblocks npm package. Use it to work with your Caseblocks environment from script code (within sandbox limits).
requestContext()
const context = requestContext();
Returns transactional metadata you can pass through to further script or API calls.
Example value shape:
{
"txnID": "2f7ab749-260e-41f8-899d-ccee93ec84bd",
"txnSource": "V2API/policy_holder/preSave,CBFunc|/cb/policy_holder/preSave|2025-05-21T10:02:22.561Z"
}
generateGuid()
const myGuid = generateGuid();
Returns a new UUID string, for example:
94ad94ba-105a-4516-b9d9-07da898fed37
graphql(query, variables, url)
graphql(
`
query GetCase($id: ID!) {
case(id: $id) {
title
status
}
}
`,
{ id: "1234" }
)
.then(function (response) {
// use response data
})
.catch(function (error) {
// handle error
});
- query — GraphQL document string.
- variables — Object of variables for the operation.
- url (optional) — Custom GraphQL endpoint; otherwise the platform default.
- Returns — Promise resolving to the JSON response.
Use this for structured reads and writes (cases and related types) instead of ad-hoc REST where GraphQL is supported.