Connectors and services
Connections to external systems
Applications often establish connections with external systems to exchange data needed for users to complete assigned tasks. These connections use standard frameworks to exchange information between systems, identify required inputs, and define the response's format. For example, a Pega Platform™ application providing automobile insurance quotes can submit a driver's license number to an external data source hosted by the Department of Motor Vehicles to obtain the driving history of a customer to assess risk and price an insurance policy.
A connection between systems consists of two parts: a connector (sometimes referred to as a service connector) to initiate a request, and a service to fulfill the request. The connector on the requesting system establishes a link to a service on the responding system to exchange data between the two systems.
A connector defines an outbound request for information based on metadata that is published for the data source. Connectors establish a connection to an external system by using an agreed-upon framework to pass data, such as Simple Object Access Protocol (SOAP) or Representational State Transfer (REST). Connectors pass application data to an external data source through required or optional parameters and parse the response to map source data to the data structure used in the application.
Consider the process of applying for a loan with a Pega Platform application. A customer creates a case to apply for a loan. The loan management application processes the case and requests the customer's credit history from a credit agency. The loan management application uses a connector to provide the taxpayer ID and any other identifying information to a service hosted by the credit agency. The service provides a response that includes a credit score and an array that lists active and inactive lines of credit. The connector maps some or all of the response data to the data structure used by the case. For example, the connector can map the credit score to a data element and ignore the credit history.
In Pega Platform, you implement a connector with a connector rule. When you use a connector to request information from a data source, you can call the connector from a data page. When you use a connector to send information to a data source (for example, updating the vehicle status when a customer reserves a rental vehicle), you can call the connector from an activity.
In the following image, click the + icons to learn more about how a connector submits a request to a service and processes the response.
Consider an order management application for a wholesaler that is implemented in Pega Platform. A retailer configures their inventory management application to access a service provided by the wholesaler to place an order for items that fall below a specified inventory threshold. Each week, the inventory management system sends a list of items and quantities to order. The service provides a response that includes an order total, confirmation number, and expected date and time of delivery.
In Pega Platform, you use a service rule to configure a service. A listener typically calls service rules. The listener runs in the background on the server, waiting for requests. When a request arrives, the listener analyzes the request and calls the service to process the request and return a response.
In the following image, click the + icons to learn more about how a service processes a request and provides a response to the requesting system.