Handle a customer case from first message to close
Open the case, reply to the customer or leave staff-only notes, and move it through its life — take it, resolve it, close it.
Customers · a play in 3 steps.
The steps
- Open the case. — createCsCase
- Reply — visible to the customer, or a staff-only note; messages are permanent. — addCaseMessage
- Move the case on — take it, resolve it, close it. — transitionCsCase
The calls
Every operation this use case runs, in the order it first appears, with the request and the response its reference page shows.
createCsCase
createCsCase — mutation · Create a new customer-service case at your organization.
Example request
mutation ExampleCreateCsCase($input: NewCsCaseInput!) {
createCsCase(input: $input) {
id
sysId
type
caption
status
parentId
rootId
createdAt
updatedAt
revisionNum
revision
caseType
priority
origin
consumerId
organizationId
orderId
appointmentId
returnId
fulfillmentId
paymentId
warrantyId
linkedFromCaseId
assignedTo
slaDueAt
}
}
Variables:
{
"input": {
"caption": "Blue jeans",
"caseType": "<case type>"
}
}
Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.
Example response
{
"data": {
"createCsCase": {
"id": "01900000-0000-7000-8000-37386ae00000",
"sysId": "CS-EXMP-0000-000F",
"type": "CsCase",
"caption": "Blue jeans",
"status": "open",
"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",
"caseType": "<case type>",
"priority": "<priority>",
"origin": "<origin>",
"consumerId": "01900000-0000-7000-8000-6e8c92ec0000",
"organizationId": "01900000-0000-7000-8000-44b781470000",
"orderId": "01900000-0000-7000-8000-f6d8263a0000",
"appointmentId": "01900000-0000-7000-8000-d4398f970000",
"returnId": "01900000-0000-7000-8000-4d4c03d20000",
"fulfillmentId": "01900000-0000-7000-8000-82dcede40000",
"paymentId": "01900000-0000-7000-8000-a7c488a40000",
"warrantyId": "01900000-0000-7000-8000-5da144780000",
"linkedFromCaseId": "01900000-0000-7000-8000-f5ec54b10000",
"assignedTo": "01900000-0000-7000-8000-f10ad02c0000",
"slaDueAt": "2027-01-31T00:00:00.000Z"
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": {
"name": "genesis",
"number": 0
},
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}
addCaseMessage
addCaseMessage — mutation · Add a reply to a customer-service case, as staff.
Example request
mutation ExampleAddCaseMessage($input: NewCaseMessageInput!) {
addCaseMessage(input: $input) {
id
type
caption
status
parentId
rootId
createdAt
updatedAt
revisionNum
revision
authorKind
authorId
visibility
body
}
}
Variables:
{
"input": {
"caseId": "01900000-0000-7000-8000-4559fce40000",
"body": "Restock before the weekend.",
"visibility": "<visibility>"
}
}
Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.
Example response
{
"data": {
"addCaseMessage": {
"id": "01900000-0000-7000-8000-37386ae00000",
"type": "<type>",
"caption": "Blue jeans",
"status": "<status>",
"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",
"authorKind": "<author kind>",
"authorId": "01900000-0000-7000-8000-0046e40b0000",
"visibility": "<visibility>",
"body": "Restock before the weekend."
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": {
"name": "genesis",
"number": 0
},
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}
transitionCsCase
transitionCsCase — mutation · Move a service case through its life — take it, resolve it, close it, or cancel it.
Example request
mutation ExampleTransitionCsCase($id: ID!, $revision: ID!, $op: CsCaseTransitionOp!, $reason: String) {
transitionCsCase(id: $id, revision: $revision, op: $op, reason: $reason) {
id
sysId
type
caption
status
parentId
rootId
createdAt
updatedAt
revisionNum
revision
caseType
priority
origin
consumerId
organizationId
orderId
appointmentId
returnId
fulfillmentId
paymentId
warrantyId
linkedFromCaseId
assignedTo
slaDueAt
}
}
Variables:
{
"id": "01900000-0000-7000-8000-37386ae00000",
"revision": "01900000-0000-7000-8000-b7960e180000",
"op": "start",
"reason": "Correcting a miscount."
}
Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.
Example response
{
"data": {
"transitionCsCase": {
"id": "01900000-0000-7000-8000-37386ae00000",
"sysId": "CS-EXMP-0000-000F",
"type": "CsCase",
"caption": "Blue jeans",
"status": "open",
"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",
"caseType": "<case type>",
"priority": "<priority>",
"origin": "<origin>",
"consumerId": "01900000-0000-7000-8000-6e8c92ec0000",
"organizationId": "01900000-0000-7000-8000-44b781470000",
"orderId": "01900000-0000-7000-8000-f6d8263a0000",
"appointmentId": "01900000-0000-7000-8000-d4398f970000",
"returnId": "01900000-0000-7000-8000-4d4c03d20000",
"fulfillmentId": "01900000-0000-7000-8000-82dcede40000",
"paymentId": "01900000-0000-7000-8000-a7c488a40000",
"warrantyId": "01900000-0000-7000-8000-5da144780000",
"linkedFromCaseId": "01900000-0000-7000-8000-f5ec54b10000",
"assignedTo": "01900000-0000-7000-8000-f10ad02c0000",
"slaDueAt": "2027-01-31T00:00:00.000Z"
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": {
"name": "genesis",
"number": 0
},
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}