Skip to main content

Create Case using API

Automated Case creation using the Constellation DX API is essential when creating modern enterprise applications. As a Lead System Architect, it is crucial to understand how to effectively utilize Case type-related Constellation DX APIs to enhance workflow automation. 

Begin by familiarizing yourself with the API URL and its parameters, as this foundational knowledge is key to successful application development. Dev Studio facilitates this process by generating the necessary microservice code and Data Transforms. You can use these resources to make Pega API calls when creating Cases from external applications. 

Specifically, the AllowedStartingFields data transform is required. This data transform contains the statements needed to set initial values for the required fields of a Case. The following figure shows the Settings tab of the Case Life Cycle in Dev Studio, in which the API Integration section contains the options to generate microservices APIs and allowed fields for the Data Transform.  

Create case using API

When you click Generate create case microservice code, the system generates a Request URL, HTTP authentication header, and request body. 

The following code shows a sample request body code:

{
  "caseTypeID": "Uplus-CLSAByte-Work-Recruitment",
  "processID": "",
  "parentCaseID": "",
  "content": {}
}

The content node in the sample code can be updated with the required fields. For example, if you add a Candidate page and position field to the content node, it will look like the following code:

{
"content": {
  "Candidate": {
  "FullName": "Test"
  },
    "Position": "Pega CLSA"
},
}

For more information about adding fields to a Case, see Adding fields while creating Cases in Constellation DX API.

The following video provides an overview of the Create Case API:

You can get the available Cases by providing the Case ID as a parameter to the GET method, as shown in the following video:

The following video shows you how to generate a connector in App Studio:

 

Check your knowledge with the following interaction:


This Topic is available in the following Modules:

If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice