Question
Cognizant
IN
Last activity: 12 Jul 2024 10:24 EDT
there is an external service from which pega needs to fetch file and needs to attach the the contents from it to a case
there is an external service from which pega needs to fetch file and needs to attach the the contents from it to a case-how to configure this requirement do connectors fetch files from ext system?
-
Reply
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 12 Jul 2024 10:24 EDT
Pegasystems Inc.
GB
you can use REST and SOAP connectors in Pega Platform to upload or download file attachments directly in your application. These connectors allow you to use REST or SOAP APIs that receive or return attachments. You can use them to upload file attachments from a Pega Platform application to a remote REST or SOAP endpoint, or download file attachments to a Pega Platform application from a remote REST or SOAP endpoint. As for SFTP, Pega Cloud SFTP service allows you to securely exchange files between your enterprise and your Pega Platform applications running in Pega Cloud. The service automatically accesses your application data in your Pega Cloud File storage repository. You can use this service to pull files from an external system to Pega Cloud File storage, and then use a file listener in Pega to process these files. To interact with a service file, you can indeed use a Connect REST. You can configure the Connect REST rule to define the connection between your Pega application and a REST service, including the service's endpoint URL, the HTTP methods to use, and the request and response data mapping.
⚠ This is a GenAI-powered tool. All generated answers require validation against the provided references.
File attachment configuration in REST and SOAP integrations
you can use REST and SOAP connectors in Pega Platform to upload or download file attachments directly in your application. These connectors allow you to use REST or SOAP APIs that receive or return attachments. You can use them to upload file attachments from a Pega Platform application to a remote REST or SOAP endpoint, or download file attachments to a Pega Platform application from a remote REST or SOAP endpoint. As for SFTP, Pega Cloud SFTP service allows you to securely exchange files between your enterprise and your Pega Platform applications running in Pega Cloud. The service automatically accesses your application data in your Pega Cloud File storage repository. You can use this service to pull files from an external system to Pega Cloud File storage, and then use a file listener in Pega to process these files. To interact with a service file, you can indeed use a Connect REST. You can configure the Connect REST rule to define the connection between your Pega application and a REST service, including the service's endpoint URL, the HTTP methods to use, and the request and response data mapping.
⚠ This is a GenAI-powered tool. All generated answers require validation against the provided references.
File attachment configuration in REST and SOAP integrations
Data management and integration > File processing
Please can you mark one of the above replies as accepted answer if you have enough to resolve your issue?
Eclatprime Digital Private Limited
SG
hi Tanya,
In Pega, fetching files using an external API call via a Connect rule involves several steps. Here's a detailed process to set this up:
1. **Create an External Service Definition:** - Define the external service you want to connect to. This typically includes the API endpoint and any authentication details. - to create a new Connect REST rule if you're dealing with a REST API.
2. **Configure the Connect REST Rule:** - **Endpoint URL:** Specify the URL of the API you want to call. - **Resource Path:** Define the specific resource path if required. - **HTTP Method:** Choose the appropriate HTTP method (GET, POST, etc.). - **Headers:** Add necessary headers such as `Content-Type`, `Authorization`, etc. - **Authentication:** Configure the authentication profile if the API requires it (e.g., Basic Auth, OAuth 2.0).
3. **Map Request and Response:** - **Request Mapping:** Define the mapping for the request data. You can use data transform or activity to map the request parameters. - **Response Mapping:** Define the mapping for the response data. Ensure the response structure is correctly mapped to the Pega clipboard structure.
hi Tanya,
In Pega, fetching files using an external API call via a Connect rule involves several steps. Here's a detailed process to set this up:
1. **Create an External Service Definition:** - Define the external service you want to connect to. This typically includes the API endpoint and any authentication details. - to create a new Connect REST rule if you're dealing with a REST API.
2. **Configure the Connect REST Rule:** - **Endpoint URL:** Specify the URL of the API you want to call. - **Resource Path:** Define the specific resource path if required. - **HTTP Method:** Choose the appropriate HTTP method (GET, POST, etc.). - **Headers:** Add necessary headers such as `Content-Type`, `Authorization`, etc. - **Authentication:** Configure the authentication profile if the API requires it (e.g., Basic Auth, OAuth 2.0).
3. **Map Request and Response:** - **Request Mapping:** Define the mapping for the request data. You can use data transform or activity to map the request parameters. - **Response Mapping:** Define the mapping for the response data. Ensure the response structure is correctly mapped to the Pega clipboard structure.
4. **Invoke the Connect REST Rule:** - Create an activity or data page to invoke the Connect REST rule. This can be done using the `Call` method in the activity. - For activities: ```pega Call <Connect REST Rule> ``` - For data pages, you can set the data page source to the Connect REST rule.
5. **Process the Response:** - Once the response is fetched, process it to extract the necessary file content. This may involve parsing JSON or XML, handling base64 encoded data, etc.
### Summary
By following these steps, you can fetch files from an external API using a Connect REST rule in Pega. Ensure you handle authentication, request/response mapping, and error handling appropriately. This approach can be adapted for other types of Connect rules (e.g., Connect SOAP) based on the specifics of the external service you are integrating with.
Cognizant
IN
@BhanuPrasanthT what should be our approach if i use a file listner?
Eclatprime Digital Private Limited
SG
@TanyaS58 File listener generally listens to a Specific folder and particular file name with extension and any file name with specific file extension.
So, make sure you configure the folder location correctly and also see the folder permissions where pega user can able to listen to that folder and retrieve the files.
Default pega user comes with 9001 group id and user id and user name as pegauser.
if the owner of the folder is not pega user then make sure you add the pegauser to that group or change the folder permission to read under others section.
Cognizant
IN
@BhanuPrasanthT so there is no connector to connect to a file?
Eclatprime Digital Private Limited
SG
Hi Tanya, It depends on your application architecutre how you are retrieving the file.
You can use connector to retrive the file or you can use SFTP jobs to rerieve the files.
Cognizant
IN
@BhanuPrasanthT can you please give a overview about SFTP jobs?
And also to interact with a service file we can use a connect REST?
Accepted Solution
Updated: 12 Jul 2024 10:24 EDT
Pegasystems Inc.
GB
you can use REST and SOAP connectors in Pega Platform to upload or download file attachments directly in your application. These connectors allow you to use REST or SOAP APIs that receive or return attachments. You can use them to upload file attachments from a Pega Platform application to a remote REST or SOAP endpoint, or download file attachments to a Pega Platform application from a remote REST or SOAP endpoint. As for SFTP, Pega Cloud SFTP service allows you to securely exchange files between your enterprise and your Pega Platform applications running in Pega Cloud. The service automatically accesses your application data in your Pega Cloud File storage repository. You can use this service to pull files from an external system to Pega Cloud File storage, and then use a file listener in Pega to process these files. To interact with a service file, you can indeed use a Connect REST. You can configure the Connect REST rule to define the connection between your Pega application and a REST service, including the service's endpoint URL, the HTTP methods to use, and the request and response data mapping.
⚠ This is a GenAI-powered tool. All generated answers require validation against the provided references.
File attachment configuration in REST and SOAP integrations
you can use REST and SOAP connectors in Pega Platform to upload or download file attachments directly in your application. These connectors allow you to use REST or SOAP APIs that receive or return attachments. You can use them to upload file attachments from a Pega Platform application to a remote REST or SOAP endpoint, or download file attachments to a Pega Platform application from a remote REST or SOAP endpoint. As for SFTP, Pega Cloud SFTP service allows you to securely exchange files between your enterprise and your Pega Platform applications running in Pega Cloud. The service automatically accesses your application data in your Pega Cloud File storage repository. You can use this service to pull files from an external system to Pega Cloud File storage, and then use a file listener in Pega to process these files. To interact with a service file, you can indeed use a Connect REST. You can configure the Connect REST rule to define the connection between your Pega application and a REST service, including the service's endpoint URL, the HTTP methods to use, and the request and response data mapping.
⚠ This is a GenAI-powered tool. All generated answers require validation against the provided references.
File attachment configuration in REST and SOAP integrations
Data management and integration > File processing
Please can you mark one of the above replies as accepted answer if you have enough to resolve your issue?