Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Adding fields while creating cases in DX API v2

Updated on August 5, 2022

Define the initial fields that users see when they create new cases in your DX API-based application by configuring the appropriate data transform in Pega Platform. For example, you can specify that new loan cases include fields that capture account details.

Note: This article applies to Pega Platform™ version 8.6.1 and subsequent 8.6 patch releases.

You can add the following elements to new cases:

  • Scalar properties
  • Embedded pages (including properties)
  • Page lists (including properties)
  • Page group (including properties) – not recommended
  • Attachments
Note: The data transform supports only one entry for page lists and page groups. For example, a page list includes the following entries:
  • .Transactions(1). Amount
  • .Transactions(2). Amount

The data transform disregards the indexes and processes only the first entry: .Transactions(1). Amount.

In this scenario, you configure a loan request that captures the user's account details, transaction value, and includes an attachment. You create a data transform and configure it with the appropriate properties. When the data transform runs, it generates a page of your chosen class that includes the properties (without the values).

  1. In the header of Dev Studio, click CreateData ModelData Transform.
  2. Name the transform AllowedStartingFields.
  3. On the Definition tab of the data transform, clear the Call superclass data transform check box.
  4. Add scalar properties:
    1. In the first row, in the Target field enter .pyDescription and in the Source field, enter "".
    2. In the second row, in the Target field enter .pyLabel and in the Source field, enter "".
    See the following figure for reference:
    Scalar properties
  5. Add page properties:
    1. Add a row with the Update Page action, and then, in the Target field, enter .AccountDetails.
    2. Add a child row, and then set .ID to "".
    3. Add a second child row, and then set .Startdate to "".
    See the following figure for reference:
    Page properties
  6. Add page list properties:
    1. Add a row with the Append and Map to action, and then, in the Target field, enter .Transactions.
    2. Add a child row, and then set .Amount to "".
    3. Add a second child row, and then set .ToAccount to "".
    See the following figure for reference:
    Page list properties
  7. (Not recommended) Add page group properties:
    1. Add a row with the Update Page action, and then, in the Target field, enter .LocationDetails(HOME).
      (HOME) is a sample subscript for the LocationDetails page group.
    2. Add a child row, and then set .Latitude to "".
    3. Add a second child row, and then set .Longitude to "".
    See the following figure for reference:
    Page group properties
  8. Add attachment properties:
    1. Add a row with the Update Page action, and then, in the Target field, enter .Itinerary.
    2. Remove the default child row.
    See the following figure for reference:
    Attachment properties
For example:

For POST /cases, the following sample request body uses content from scalar properties ("content"), page properties ("pageInstructions"), and attachment properties ("attachments"):

Sample JSON request

The ID in the "attachments" array is the output of the /attachments/upload endpoint.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

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.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us