Skip to main content


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

Configuring a basic data object

Updated on March 9, 2022
Applicable to Cosmos React applications

Speed up application development by creating data objects that collect related information into reusable entities. By using data objects, you can simplify your data structure for easier reuse across interfaces.

For more information about data objects and other key data integration elements, see Basic concepts in data modeling.

Note: This article describes a basic scenario in which you build a sample Customer data object by using default options. For more information about other options that might be more pertinent to your use case, see Data objects overview.

The following video provides a visual walkthrough for configuring basic data objects:

The following sections provide a detailed step-by-step guide:

Adding data objects

Create a data object that is a template for a reusable entity.

Every data object consists of one or more fields that share the same context and function. A sales application, for example, might include a Customer data object that manages personal information that you need to collect from your customers to complete orders.

  1. In the navigation pane of App Studio, click Data.
  2. Click Add data object.
    See the following figure for reference:
    Adding a data object
    Data objects and integrations section in App Studio.
  3. In the Create data object window, enter the data object name.
    For example: Customer
  4. Click Next.
  5. In the Connection details window, accept the default settings by clicking Submit, as shown in the following figure:
    Defining a simple data object
    The dialog windows for defining the data object details.
    For more information about the available data object sources, see Creating a data object.
What to do next: Organize the information that you want the data object to capture by populating the data object with fields.

Defining data objects

Capture various types of information that define a data object by adding fields.

In the Customer data object, you can define fields to collect personal information of your customers such as First Name, Last Name, Full Name, and Phone Number.

Depending on your use case, you can add editable fields and calculated fields. Use editable fields to gather information that requires manual input such as customer first name, last name, and phone number. Calculated fields display the information that you gather in the form that is adjusted to your needs. For example, you can combine the first and last name values to automatically create a full name.

    Adding fields that require input

  1. In the data object that you created, on the Data model tab, click Add field, as shown in the following figure:
    Adding a field
    A data object rule that you can extend by adding fields.
  2. In the Add field window, specify the field details:
    1. In the Field name field, enter First name.
    2. In the Type list, select Text (single line).
    3. Click Submit & add another.
  3. Repeat step 2 to add the following fields:
    • Field name: Last name, Type: Text (single line)
    • Field name: Phone number, Type: Phone
  4. Adding calculated fields

  5. Click Add field.
  6. In the Configure field window, specify the field details:
    1. In the Field name field, enter Full name.
    2. In the Type list, select Text (single line).
    3. Expand the Advanced section.
    4. Select the This is a calculated field (read-only) checkbox.
    5. In the Calculation field, select Use expression.
    6. Combine the first and last name values to create a full name, as shown in the following figure:
      Configuring a basic expression for a read-only field
      The Advanced section of a data object configuration window showing a sample expression.
    7. Confirm your settings by clicking Submit.
  7. Save the data object.
    The following figure shows a sample Customer data object with several fields that capture various types of basic information:
    Customer data object
    A sample data object configuration in App Studio.
    Result: A reusable and extensible container for a group of related properties is available for reuse across your applications to capture the data that you need to complete cases.
What to do next: Populate your data object with records.

Adding records to data objects locally

After you define a data object, you can store the related data records locally, in the Pega Platform system of records, without having to create or maintain database tables.

For example, you can create records that store data for each individual customer, as you defined in the Customer data object.
  1. In the navigation pane of App Studio, click Data.
  2. Open a data object that has Pega configured as the system of record, as shown in the following example:
    A data object with a local data storage
    A Customer data object in App Studio that has Pega configured as the system of record.
  3. In the data object, click the Records tab.
  4. Click Add records.
  5. Provide values for the fields that you configured, as shown in the following example:
    Adding records in the Pega system of records
    Adding a sample record within the data object in App Studio.
  6. Optional: To add more records, repeat steps Configuring a basic data object through Configuring a basic data object.
  7. Save the data object.
What to do next: React to changing business requirements by reusing data objects to quickly expand the amount of information that your data object captures.

Reusing data objects

As your application evolves, you can quickly expand the amount of information that your data object captures by referencing other data objects.

For example, you can use data objects from another application layer.

When data object A references data object B, the fields from data object B become part of data object A. You can reuse data objects multiple times.

Consider an example in which a company needs to capture shipping addresses in addition to basic customer data as a result of changing business requirements.

You can reference the Shipping address data object from the Customer data object as embedded data to reflect user-supplied information from a case type, as shown in the following figure:

Data object reusability
A diagram that shows a Customer object extended with a Shipping address data object.

Reuse an existing data object to broaden the scope of information that another data object requires to capture.

  1. In App Studio, open the data object that you want to modify.
  2. On the Data model tab, click Add field.
  3. In the Add field window, enter the field name.
  4. In the Type list, select Embedded data.
  5. In the Data object list, select the data object you want to reference.
    For example: Shipping address
  6. Optional: To modify the default field ID of the referenced data object, expand the Advanced section, and then edit the ID value.
  7. Optional: To provide additional information about the field, expand the Advanced section, and then complete the Description field.
    The following figure shows a sample data object reference:
    Referencing a data object as embedded data
    The Add field window that shows how to reuse another data object as embedded data.
  8. Confirm your settings by clicking Submit.
Result: You created a data object reference in the Customer data object, as shown in the following example:
Data object reference
Related data objects in App Studio.

Creating views in data objects

You can take advantage of the data objects that you configured by reusing them to speed up the creation of case views.

Views act as building blocks for user interface forms, and support reuse across the application. For more information, see Forms and views.
  1. In App Studio, open the data object that you want to use as a source for a view.
  2. Click the User Interface tab.
  3. On the Views section, click Add.
  4. In the Create new view window, specify the basic view details:
    1. Enter the view name.
    2. Select the view template.
    3. Confirm your settings by clicking Submit.
      For example:
      Creating a view for a data object
      The Create a new view window in a data object with a sample view name and template selected.
  5. Add fields to each region that corresponds to the view template that you selected:
    1. In the Edit view section, in a Region area, click Add to add fields to the view.
    2. Select each field that you want to add to the view, and then click Add.
  6. If your data object references other data objects as data relationships, add fields from these data object to your view:
    1. Click the Gear icon next to the referenced data object whose fields you want to add to the view.
    2. Optional: To edit the default view template for the referenced data object, in the Template section, click Edit, and then select a view template.
    3. Add fields to each region that corresponds to the view template that you selected.
  7. When you finish adding fields to your view, save the data object.
Result: You configured a view for your data object, as shown in the following example:
A view based on a data object
The Views tab in a data object showing a sample view for a Customer data object.
What to do next: You can now reuse your data object, together with an associated views, across case types in your application. For more information, see Automating work by creating case types.

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