Skip to main content

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

Creating the connection and setting up the class structure for a new Contact entity

Updated on January 29, 2021

Set up the REST connection. The REST wizard automatically creates request or response data transforms based on the mapping that was provided in the information or metadata from the service.

Pega Customer Service Implementation Guide Pega Customer Service Implementation Guide Pega Customer Service Implementation Guide Pega Customer Service Implementation Guide
  1. On the Data objects and integrations page, click New in the top right corner.
  2. In the Create new data model field, enter the name of your data model, for example, ContactEntity1.
  3. Click the Advanced tab. In the Reuse assets from field, select Implementation data class.
    Note: Typically, you select Contact, but currently there is a design limitation.
  4. In the System field, select Create new.
  5. In the Name field, enter the name of the system that you want to connect it, for example, a bank’s system of record (SOR) for contacts.
  6. In the Description field, enter a description, for example the purpose of the connector, such as or retrieving search results based on search text.
  7. To change the icon to reflect the service provider, click Change and select one of the icons.
  8. In the Connection details section (based on the information in the service provider’s Swagger file), in the Method field, select either GET or POST as the connection method, and then enter a value in the Endpoint URL field for the REST connection.
    Based on the contact ID entered, Pega Customer Service creates the integration layer, the data layer which consists of the data class, attributes, data pages, and request and response data transforms. Pega directly maps JSON data to the application data layer in the response data transform.

  9. In the Parameters section, choose which part of the URL is dynamic and needs to be parameterized for future calls, for example, ContactID-1003.
    You need to provide a sample request or response in order that the connection wizard creates the required assets.
  10. In the Headers section, click Add header to specify a request header and its value. Some services require extra information, for example, API version.
  11. Click the Authentication tab.
    Configure authentication for your system of record, based on the type of authentication that you choose.

    For more information, see Authenticating with basic or NTLM authentication or Authenticating with OAuth 2.0.

  12. Click Initialize call.
    Pega Customer Service automatically creates the response mapping data transform for the response structure. Based on the response, the wizard displays errors, if any, or prompts with the sample response.

Mapping fields for the GET method when creating a data object

On the Data mapping page, select the data that your application needs for processing by mapping fields from the REST response to the data objects.

The connector parameters are on the left and the data page parameters are on the right.

  1. To use data from your system of record, click the Live response radio button.
  2. Select the fields that you want to include in the data object and map them to your data view by using the options in the list below. You might select the Add all link at the top right side of the page, and then remove the ones that you do not want.
    • To add the field to the data object, click Add new. You can change the field name and its type.
    • To add all the fields from the REST response to the data object by using the same field names, click Add all. To change the name and the data object, click on the name. To remove a field mapping, click on the name and click the Delete icon.
    • To remove all the fields from the data object, click Clear all.
  3. Click Next.
  4. Edit the fields if needed. For more information, see Preparing your data for production.
  5. Click Submit.
  6. Click Save.
    The REST wizard creates the connector, the response data transform, the data page, and new properties, if needed, in App Studio.

    On the Data model tab, you can see that the contact entity has been created and that all the properties that are from the external system. You can also see the application layer where the properties are being used.

    When you click Data Views, you can see the data page.

    In the More menu, you can replace the source, update the source, and update environment settings.

  7. In the More menu, click Open in Dev Studio to view the data page.

Changing the parent class on the D_ContactEntity data page

You need to change the parent class listed on the D_ContactEntity data page to a Customer Service class so that the system reuses the assets from customer service.

  1. In Dev Studio, on the Definitions tab of the data page, copy the class name in the Object type field, for example, MyCo-Loan-Data-ContactEntity1.
  2. In the navigation panel, click App, and then search for the class name of the contact entity.
  3. Right-click the class name, and then select Definition.
  4. On the Edit Class page (General tab), in the Parent class field of the Class inheritance section, click and enter the Pega Customer Service contact class, for example, PegaCA-Interface-Contact.
  5. Click Save.

Modifying the D_Contact_Details data page

D_Contact_Details is a Pega Customer Service out-of-the-box data page. It has an activity as the source which reads the information locally. You want to change this data page so that it communicates with the service, and you can retrieve data from the external system.

Ensure that the name of the data transform has a suffix of _UP or _DOWN to indicate whether it is a request or response.
  1. In Dev Studio, search for the D_Contact_Details data page.
  2. Open the D_ContactEntity data page that was created for this case, and then save it as D_Contact_Details data page in the application.
    The object type, source, connector, and mapping data transforms are updated.
  3. To ensure that the data page is working correctly and is retrieving information from the external system, click ActionsRun to test a contact ID, for example, CONT-1004.

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

Close Deprecation Notice
Contact us