Third-Party API Integration in PeopleSoft – Enhance Application Functionality & Connectivity

Third-Party API Integration in PeopleSoft – Enhance Application Functionality & Connectivity

The use of Third Party APIs (Application Programming Interfaces) has revolutionized the way applications interact, enabling seamless integration of external services into existing systems. By leveraging third-party APIs, businesses and developers can enhance application functionality, improve efficiency, and reduce development time. This module aims to simplify the integration process, providing a structured approach for developers to incorporate external APIs effectively.

 

Best Oracle PeopleSoft Services

 

Overview of Third Party API

The implementation of Third Party API integration can be categorized into two primary phases:

  • API Selection Phase: Identifying the suitable API based on application needs.
  • Integration Phase: Implementing and configuring the API within the application to ensure optimal performance.

By integrating third-party APIs, developers can access various services such as payment gateways, social media platforms, cloud storage, and more. This facilitates smoother workflows and enhances user experience.

 

Detailed Features of Third-Party API

A well-integrated Third-Party API provides several advantages, including:

  • Seamless connectivity between different applications.
  • A user-friendly interface that simplifies integration.
  • Support for multiple functionalities, allowing developers to request various services.
  • Secure and reliable data exchange, ensuring user privacy and system integrity.

Below is an example of an API integration process where a developer can fetch user data from an external service using an API key.

 

Third-Party API Integration in PeopleSoft 

 

PeopleSoft to Third-Party API

Integrating third-party APIs with PeopleSoft applications is essential for extending functionality and exchanging data with external systems. In this blog, we explore how to use PeopleCode to make an API request, process responses, and update PeopleSoft tables accordingly.

 

Key Components of API Integration in PeopleSoft

1. Fetching Data from PeopleSoft
  • Retrieving student data from PS_TEST_INTSTD based on certain criteria.
2. Constructing the JSON Payload
  • Using JsonObject to dynamically build the request payload.
3. Making an API Request
  • Using HttpTargetConnector to send a JSON request to an external API.
  • Handling authentication and HTTP headers properly.
4. Processing the API Response
  • Parsing JSON responses to extract required data.
  • Handling different response codes for error management.
5. Updating PeopleSoft Tables
  • Inserting the processed API response data into the staging table PS_TEST_INTSTD_STG.
  • Implementing error handling mechanisms to log failures.

 

Code Breakdown

1. Fetching Data from PeopleSoft

SQLExec(“SELECT STUDENT_ID, NAME FROM PS_TEST_INTSTD WHERE STATUS = ‘PENDING'”, &studentID, &studentName);

This query retrieves pending student records that need to be processed.

2. Constructing the JSON Payload

Local JsonObject &requestJson = CreateJsonObject();
&requestJson.Put(“student_id”, &studentID);
&requestJson.Put(“name”, &studentName);

The JsonObject is used to structure the API request data dynamically.

3. Sending the API Request

Local HttpTargetConnector &http = CreateObject(HttpTargetConnector);
&http.URL = “https://api.example.com/students”;
&http.Method = “POST”;
&http.ContentType = “application/json”;
&http.Post(&requestJson.ToString());

Here, we define the API endpoint and set up the HTTP request with the necessary headers.

After Hitting a Post Request, once successful. You will find this response which I was shown below.

 

Third-Party API Integration in PeopleSoft – Enhance Application Functionality & Connectivity - Fig 1.1 Post Request

Fig 1.1: Post Request

 

Third-Party API Integration in PeopleSoft – Enhance Application Functionality & Connectivity - Fig 1.2 Response for Post Request

Fig 1.2: Response for Post Request

 

4. Handling the API Response

Local JsonObject &responseJson = CreateJsonObject(&http.GetResponse());
If &responseJson <> Null Then
&status = &responseJson.GetString(“status”);
End-If;

We parse the JSON response and extract required fields.

5. Updating the PeopleSoft Table

SQLExec(“INSERT INTO PS_TEST_INTSTD_STG (STUDENT_ID, STATUS) VALUES (:1, :2)”, &studentID, &status);

This statement inserts the API response data into the staging table for further processing.

 

Conclusion

By leveraging PeopleCode and the HttpTargetConnector class, we can seamlessly integrate third-party APIs into PeopleSoft. This enables efficient data exchange and automation, reducing manual efforts and improving system interoperability.

 

Third-Party API to PeopleSoft

Overview of the API

This PeopleSoft API, built as an App Package, facilitates the exchange of student transaction data between a third-party system and PeopleSoft. It receives a JSON payload from the third party, processes the data, and stores it in PeopleSoft tables. The API responds with a success status after completing the transaction.

 

Key Features of the Code

1. Implements a PeopleSoft Integration Interface
  • The HOSTEL class implements PS_PT:Integration:IRequestHandler, which means it acts as a request handler for Integration Broker (IB) services.
  • It processes HTTP POST requests from external systems.
2. Processing Incoming JSON Data
  • The API receives a JSON request payload containing student transaction details.
  • The JSON is parsed using ParseJsonString(), extracting fields like Student ID, Transaction ID, Payment Mode, and Bank Account.
3. Database Operations (Insert & Update)
  • The extracted data is stored in PeopleSoft tables:

PS_TEST_SF_HOS_INT (Main Student Financial Table)

TEST_HS_TR_ID_T (Transaction Record Table)

  • Uses SQLExec() to check for existing transactions before inserting or updating records.
  • If the transaction ID exists, it updates the record; otherwise, it inserts a new one.
4. Logging and Error Handling
  • The code includes logging functionality (though currently commented out) to track API requests and responses.
  • Ensures data consistency by validating transaction existence before processing.
5. Constructing JSON Response
  • After processing, the API constructs a JSON response using JsonBuilder().
  • The response includes details such as TRANSACTION_ID, STUDENT_ID, AMOUNT, TRANSACTION_TYPE, and STATUS.
  • The response status is set to “Success” upon successful data storage.

 

How This API Works in a Real-Time Scenario

1. Third-Party System Sends Data
  • The external system (such as a bank or payment gateway) calls this API with student payment details.
2. API Processes and Stores Data
  • Parses the JSON request.
  • Checks for existing transactions.
  • Inserts or updates records in PeopleSoft.
3. API Sends a Response
  • Constructs a JSON response.
  • Returns the transaction status to the third party.

Conclusion

This API streamlines student transaction data exchange between PeopleSoft and external systems. It ensures data accuracy, supports logging, and maintains transactional integrity. By integrating with third-party payment systems, it improves automation and reduces manual work in processing student financial data.

 

API Integration Workflow

  • Authentication: API key or OAuth tokens are used to authenticate requests.
  • Request Handling: Developers send requests to the API endpoint with the required parameters.
  • Response Processing: The API returns data in a structured format (JSON/XML) for further processing.
  • Error Handling: Implementing mechanisms to handle API errors and rate limits.

Example: Fetching Data Using an API

GET https://api.example.com/users?api_key=your_api_key

Upon a successful request, the API responds with structured data:

Third-Party API Integration in PeopleSoft – Enhance Application Functionality & Connectivity - Fig 1.3 API responds with structured data

Fig 1.3: API responds with structured data

 

Benefits for Developers and Businesses

For Developers:

  • Simplifies Development: Reduces the need to build functionalities from scratch.
  • Enhances Application Capabilities: Provides access to additional features like payments, analytics, and AI services.
  • Ensures Security Compliance: APIs often come with built-in security measures.

For Businesses:

  • Cost-Effective Solutions: Reduces development costs by leveraging external services.
  • Improves User Experience: Provides seamless access to third-party services without switching platforms.
  • Increases Productivity: Enables businesses to focus on core functionalities while relying on APIs for extended features.

 

Conclusion

The integration of Third Party APIs has become an essential aspect of modern application development. It not only enhances application capabilities but also streamlines business operations. By implementing well-structured API integration strategies, developers can build more efficient and scalable applications.

This approach aligns with the growing need for digital transformation, offering flexibility, security, and enhanced functionality to users and organizations alike.

 

Supercharge Your Application with Third-Party API Integration – Powered by Kovaion

 

Best Oracle PeopleSoft Services

 

Leverage the power of seamless API integration with Kovaion’s deep expertise in PeopleSoft and enterprise platforms. Whether you’re integrating payment gateways, cloud services, or external data systems, our team ensures secure, efficient, and scalable solutions tailored to your business goals.

Let us help you reduce development time, improve system interoperability, and enhance user experiences through robust API strategies.

 

Author: Yuvanchandru M, Software Engineer.

Oracle PeopleSoft Services

Connect with us for PeopleSoft End-to-End Implementation, Enhancement, Updates, and Support.

Read More