Updated on 2025-03-31 GMT+08:00

Creating a Case

Description

This is a machine-machine interface for creating a case.

Method

POST

URI

https://Domain name/service/AICC__Case/1.0.0/openapi/case (For example, the domain name is service.besclouds.com.)

Request Description

Table 1 Request header parameters

No.

Parameter

Type

Mandatory or Not

Description

1

Content-Type

String

Yes

Request body type, which is JSON

2

access-token

String

Yes

Token for a user to access a tenant space. For details about how to obtain the access token, see Authentication Machine-Machine Interface (SaaS Integrated Deployment).

Table 2 Request body parameter

No.

Parameter

Type

Mandatory or Not

Description

1

caseInfo

Object

Yes

Case information. For details about the parameters of this object, see Table 3.

The fields in caseInfo are only standard fields required by any case. Other fields can be dynamically extended based on the template referenced by the case.

Table 3 caseInfo parameters

No.

Parameter

Type

Length (Bytes)

Mandatory or Not

Description

1

title

String

128

Yes

Case title

2

description

String

20,000

Yes

Case description

3

type

String

20

Yes

Case type ID

4

ownerId

String

20

No

Case owner. In the automatic case assignment mode, this parameter can be left blank. The case creation interface will automatically assign the case to an owner based on the assignment logic.

5

isAtuoAssigned

Boolean

-

Yes

Whether to automatically assign the case

6

priority

String

-

No

Priority, which can Low, Medium, High, or Critical

7

origin

String

-

No

Case source, which can be Voice, Whatapp, webchat, or Email

8

dueDate

Datetime

-

No

Deadline, in YYYY-MM-DD HH:mm:ss format

9

contactId

String

20

Yes

Case contact

10

attachment

String

-

No

Attachment. The total size of attachments cannot exceed 5 MB, and the number of attachments cannot exceed 5. JPG, PNG, PDF, JPEG, GIF, DOC, and DOCX attachments are supported.

11

creatorId

String

20

Yes

Creator

12

contactPhone

String

20

No

Contact phone number

13

beId

String

20

No

Parameter for distinguishing customer regions seeing that there are many CRM customers

If the case type involved in the case creation is associated with a customized case template, extended fields in the case template can be added to the request body.

Response Description

  • Status code: 200
Table 4 Response body parameter

No.

Parameter

Type

Mandatory or Not

Description

1

caseId

String

Yes

Case record ID

Example

Scenario: Create a case.

URL: https://Domain name/service/AICC__Case/1.0.0/openapi/case

  • Request header
{
 "Content-Type": "application/json",
 "access-token": "0000000000************7bm63KsRmEztTvyA="
}
  • Request body
    {
        "caseInfo": {
            "description": "testOpenApi",
            "type": "cvmC0000014Oc9jgT7ZI",
            "origin": "Voice",
            "dueDate": "2023-07-30 00:00:00",
            "isAutoAssigned": true,
            "priority": "Low",
            "title": "test",
            "contactId": "ciIy0000013y7cC8T2rA",
            "state": "Processing",
            "creatorId": "10gg00000148PCjKVDAu",
            "contactPhone": "15151852650"
        }
    }
  • Response header
{ "connection": "keep-alive",
 "Content-Length": "16",
"Content-Type": "application/json%3Bcharset=UTF-8"}
  • Response parameters
{
"resCode": "0",
  "resMsg": "Success",
  "result": {"caseId":"coiO0000014hmYpZIqYq"}
}