Skip to main content


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

Creating a REST integration by using the Integration wizard

Updated on December 23, 2021

Create data sources in your application by using standard methods to obtain data from external REST services. When you use the Create REST Integration wizard to create a data source, the system generates the records that are required to use the data source. These records include classes, properties, mapping rules, data transforms, a connector, a data page, and optionally, an authentication profile, and an OAuth 2.0 provider.

For more information about running the Integration wizard, see Creating a REST integration.

Pega Customer Service Implementation Guide Pega Customer Service Implementation Guide Pega Customer Service Implementation Guide Pega Customer Service Implementation Guide Pega Customer Service Implementation Guide Pega Customer Service Implementation Guide
Before you begin: Before you run the Integration wizard, ensure that you have the following:

  • Test the service using, for example, Postman, and ensure that it is up and running
  • Service URL (location of the exposed service)
  • Request and response parameters (in and out points)
  • HTTP method for invoking the service
  • Authentication scheme
This scenario describes how to integrate the .FirstName property from contact details. It is recommended to first successfully integrate one property end to end, and then, depending on your business needs, create and set up other properties by cloning the existing mapping structure. You can run the Integration wizard it only once. If you want to add any properties in the future, you will have to perform the manual steps described in Integrating data after running the Integration wizard.

Configuring a REST connection

Configure the connection of your system with the external REST service on the Connection page of the Create REST Integration wizard.

For more information about the Connection page, see Configuring a REST connection.
  1. In the header of Dev Studio, click ConfigureIntegrationConnectorsCreate REST Integration.
  2. In the System details section, in the Name field, enter the name of the source system. This field represents the name of the system that hosts the external REST service.
    For example: Enter External SOR.
  3. In the Endpoint URL field, enter the endpoint URL of the external REST service.
    Enter the endpoint URL from the service REST rule that you already have set up or that you created in Creating a service REST rule. The system analyzes this URL and suggests the elements of the URL that represent resource path parameters and query string parameters, and in this scenario-based example, contacts.
  4. Optional: To update the suggested resource path names, in the Resource path section, click Add component, and then select the Parameter check box next to each resource path name that is a parameter.
    The resource parameters identified by the system are static and not going to change. If there is a component that might change, select the check box next to it to consider it a parameter. The system updates the endpoint URL accordingly. If you mark a resource path name as a parameter, the system generates a property as part of the request data model and substitutes the property's value for the value of the parameter at run time. The parameter is displayed in curly braces in the endpoint URL.
  5. Click Next.

Selecting methods for REST integration

Choose the standard methods to use for the creation of a data source in your application and override the headers and query string parameters for each method on the Resource methods page of the Create REST Integration wizard.

For more information about the Resource methods page, see Selecting methods for REST integration.
  1. In the Resource section, in the Name field, enter the name of the resource that you want to access by using the external REST service.
    For example: Enter GetContact.
  2. In the Methods supported section, select the Get method.
  3. Click Next.

Defining a data model for REST integration

Define the data model for your REST integration by adding a REST response or uploading a file on the Data model page of the Create REST Integration wizard. The system parses sample requests and responses to determine the data model.

For more information about the Data model page, see Defining a data model for REST integration.
  1. Define the data model by clicking Add a REST response and completing the following tasks in the Add a REST response dialog:
    The system populates the Choose method field with GET method.
    1. In the Value field for the ContactId parameter, enter the parameter value.
    2. Click Run to test the system response.
    3. Review the REST response.
    4. If there are no errors and the system returns values and code 200, click Submit.
  2. Click Next.

Updating and generating records for REST integration

Review and update the information for the integration and data layers of your REST integration and generate the records for these layers on the Review page of the Create REST Integration wizard. At this point, you specify where the data and integration assets are to be created.

While creating your application, the New Application wizard creates the Your organization name-Your application name-Int application-level integration class. The Integration wizard creates new integration assets, for example, records and subclasses under the Your organization name-Your application name-Int integration class. Review the suggested information and if needed, update it. For more information about the Review page, see Updating and generating records for REST integration.
  1. Review the prepopulated integration information and make updates, if needed.
    Important: Ensure that the parent class is set to the recommended integration class, Your organization name-Your application name-Int.
    An example Review page setup
    An example setup of the Review page with the integration-related class marked
  2. In the Integration layer section, in the ID field, if the number of characters in the integration layer ID is longer than 25 characters, click the Edit icon next to the field, shorten the name, and then click OK.
    Note: The parent class identifier can not be more than 25 characters. The integration section creates a set of classes and properties that are a direct representation of the request that you are sending out to the service and the response and will be stored in the integration class.
  3. In the Data layer section, in the Map to an application data type field, select Skip (I'll do it later).
    Note: When you select to skip, you use the out of the box D_Contact_Details data page, which is the recommended action.
  4. Optional: To see a summary of the records that the system creates to provision your REST integration, click Preview records.
  5. To generate records for your REST integration and the related data layer, click Create.
    The system creates a connector activity, a ruleset (only if you choose not to use the existing ruleset), classes, and a data object called GetContact.

Reviewing the record generation summary

Review the records that were created for your REST integration and their location on the Generation Summary page of the Create REST Integration wizard. You can review the record generation summary when the record generation is in progress, and after the records are generated.

The Integration wizard creates a default class structure, which you can view in Dev Studio under Your application nameApp.
An example class structure created by the Integration wizard
An example class structure created by the Integration wizard.
For more information about the Generation Summary page, see Reviewing the record generation summary.
  1. Review the Generation Summary page details.
    An example Generation Summary page
    An example Generation Summary page with a list of created records and data sources
  2. Open the GetContact data source and review the elements created by the wizard.
    The system created a connect REST with end points, parameters, and all other required information.
  3. Click Close to exit the wizard.

Tags

Pega Customer Service 8.7 Pega Customer Service for Communications 8.7 Pega Customer Service for Financial Services 8.7 Pega Customer Service for Healthcare 8.7 Pega Customer Service for Insurance 8.7

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