Question
Cognizant
IN
Last activity: 27 Mar 2024 16:07 EDT
Which DX API method to use to fetch customer details dynamically.
-
Reply
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 27 Mar 2024 15:53 EDT
Pegasystems Inc.
CA
Cognizant
IN
@TanyaS58 earlier I was using this method to fetch customer details however it requires a query (dataViewParameters) parameter for which we need to provide parameter in a specific format and for that I need to hardcode it,is there any method by which we can dynamically the customer details?This configuration is done in Pega only and the customer details is also needed to be fetched within pega.I have created a data type named CSRCustomerDetails and from this data type only i need DXAPI to fetch the customer details based on the customer ID that User enters on the UI.
Please refer to the screenshot attached for UI and Data type.
@TanyaS58 earlier I was using this method to fetch customer details however it requires a query (dataViewParameters) parameter for which we need to provide parameter in a specific format and for that I need to hardcode it,is there any method by which we can dynamically the customer details?This configuration is done in Pega only and the customer details is also needed to be fetched within pega.I have created a data type named CSRCustomerDetails and from this data type only i need DXAPI to fetch the customer details based on the customer ID that User enters on the UI.
Please refer to the screenshot attached for UI and Data type.
Note:This needs t be done within pega application only. No External Application is involved.
Pegasystems Inc.
CA
GET /data_views/{data_view_ID}. - Get single page data view (Get ONE Customer detail)
POST /data_views/{data_view_ID}. - Get list data view ( Get List of Customer Details)
Please find the attached screenshot for your reference
Cognizant
IN
@RameshSangili I wanted to know in post method can you please share request body as well as I am making some error while passing the parameters
Accepted Solution
Updated: 27 Mar 2024 15:53 EDT
Pegasystems Inc.
CA
Updated: 26 Mar 2024 15:26 EDT
Cognizant
IN
@RameshSangili thanks for sharing the response it worked.But before accepting your solution I have a query to ask. As I need to fetch customer details based on the customer ID the user enters so for that I created a Connect REST and on creating the connector rule a data page instance Name D_PostCSR also got created now this data page rule is having a parameter of that data page name(which is of list type,D_CSRList) from where the data should be fetched based on the customer ID but when we run D_PostCSR by passing D_CSRList then the results are stored in data property embedded in this data page now i have to manually map the customer name and address,please refer the screenshot attached.
So is this approach dynamic?
I have explained all the scenarios in the attachment.
Pegasystems Inc.
CA
Good job, Tanya!! I was wondering why you can't use OOTB data pages because your Custom data page(D_PostCSR) also takes the Data Page name as a parameter. If the Custom data page is intended for your application design/requirements, then your design looks good.
Cognizant
IN
@RameshSangili thanks a lot for your help
Cognizant
IN
@RameshSangili actually D_PostCSR data page is a page type data page so on passing the data page as parameter it stores the result in a embedded property named data so data (1),(2),(3) has all the results but i have to hardcode this as based on the customer id ;customer name and address varies.
So i feel there is no way that we can pass a parameterized data page using dxapi?