Question
Vodafone GmbH
DE
Last activity: 26 Jul 2019 9:40 EDT
Pega Marketing Realtime Container - REST Interface Description
Hi,
I checked the Pega Marketing documentation for the Realtime Container REST Interfaces, but I'm not happy with this description. For example in code ther exists a Context field, which is a page list. But this is not described in this document.
Can somebody provide me detailed and complete IF description of all Realtime Container REST Interfaces?
Andre
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
IN
Hi Andre,
Sorry about the documentation not being helpful. We will review it and improve it so that is accurate and helpful.
While trying to help you out I have identified an error in our documentation which does not provide the correct information about the JSON payload for Real Time Containers with the context values. The Context field is actually a list where you can pass in multiple context entries in the request payload. These entries can be additional meta data that you can pass down to the CDH for making your decisions. Example is given below.
{
"ContainerName": "NextBestAction",
"Channel": "CallCenter",
"Resource": "AllResults",
"CustomerID": "UPLUS-SAPLUS-WORK-CONTACT SAMPLECON-1",
"Direction": "Inbound",
"Contexts": [{
"Type": "Intent",
"Value": "CloseAccount",
"Key": "IntentName"
}, {
"Type": "Intent",
"Value": "Moderate",
"Key": "CallVolumeIndicator"
}]
}
On the Pega Marketing side, in the Strategy logic you can access these context values by using the function below and perform your decisions.
Hi Andre,
Sorry about the documentation not being helpful. We will review it and improve it so that is accurate and helpful.
While trying to help you out I have identified an error in our documentation which does not provide the correct information about the JSON payload for Real Time Containers with the context values. The Context field is actually a list where you can pass in multiple context entries in the request payload. These entries can be additional meta data that you can pass down to the CDH for making your decisions. Example is given below.
{
"ContainerName": "NextBestAction",
"Channel": "CallCenter",
"Resource": "AllResults",
"CustomerID": "UPLUS-SAPLUS-WORK-CONTACT SAMPLECON-1",
"Direction": "Inbound",
"Contexts": [{
"Type": "Intent",
"Value": "CloseAccount",
"Key": "IntentName"
}, {
"Type": "Intent",
"Value": "Moderate",
"Key": "CallVolumeIndicator"
}]
}
On the Pega Marketing side, in the Strategy logic you can access these context values by using the function below and perform your decisions.
@PegaMKTUtilities.IsValueInContext("Intent","IntentName","CloseAccount",Primary.ContainerPayload.Contexts)
or
@PegaMKTUtilities.GetContextValue("Intent","IntentName",Primary.ContainerPayload.Contexts)
Hope this helps.
-
Neeraj Kumar S MANOJ KUMAR REDDY
A Dutch Bank
NL
I voted for your answer as correct answer. It worked for me, but only after fixing a typo on the function call above which should be: @GetContextValue("Intent","IntentName",Primary.ContainerPayload.Contexts)
Notice this function call can be done in a strategy saved on the class: Data-Decision-Request-Customer
Still there is something missing on my run results with regards to interaction history: would you know why my container is not recording Pending nor Impression for the proposition served in Pega 8.1? The container is configured with: "Impression Capture"="Capture on retrieval".
-
Neeraj Kumar
Pegasystems Inc.
IN
Thank you Andre for brining this to my notice. I have corrected my response to show the correct usage of the function and yes the function can be used when the strategy is in Data-Decision-Request-Customer.
Regarding the current issue you are facing, have you checked the logs to see if there is any exception in the logs? Are all the DSM services (like DDS, ADM, VBD) node types configured and are in Normal status?
A Dutch Bank
NL
Hi Raghu, All nodes are up and running (decisioning > infrastructure menu).
I just reran the campaign. No impression is recorded still. Accepts are recorded. The logs are not saying anything useful (so few lines of log I will post here).
Any ideas why it is not doing what it is supposed to? That is to write impressions for the container?
Maybe my resource path is wrong? /prweb/PRRestService/PegaMKTContainer/V2/Container
I also tried with V1, but on Pega 8.2 on my laptop it requires V2 and on my customer laptop it requires V1 to work.
Hi Raghu, All nodes are up and running (decisioning > infrastructure menu).
I just reran the campaign. No impression is recorded still. Accepts are recorded. The logs are not saying anything useful (so few lines of log I will post here).
Any ideas why it is not doing what it is supposed to? That is to write impressions for the container?
Maybe my resource path is wrong? /prweb/PRRestService/PegaMKTContainer/V2/Container
I also tried with V1, but on Pega 8.2 on my laptop it requires V2 and on my customer laptop it requires V1 to work.
2019-07-24 10:00:00,021 [CHEDULER_THREAD_POOL] [ STANDARD] [ ] [ ] ( purger.internal.PurgerImpl) WARN - Skipping Purge, as it is currently only supported on the cloud 2019-07-24 10:01:25,317 [ataFlow.RealTime]:30] [ STANDARD] [ ] [ ] (.DataFlowDiagnosticsFileLogger) INFO - {"type":".ProcessedRunConfigUpdateMessage","senderNodeId":"dc02acc48137a73bbd6e8390d1ca6dbc","timestamp":1563955285242,"runId":"SC-5"} 2019-07-24 10:01:41,660 [http-nio-8080-exec-7] [ STANDARD] [ ] [ OC:01.01.01] (ervices.ServiceCircuitBreakers) WARN anonymouspc| Proprietary information hidden|Rest|PegaMKTContainer|V2|container0e7278cda02a9c0446dcc75a4df34eb2|AS64O7R1QGXNHRED5Y32PV2FFB2HICVCQA - Service activity SLA violation, execution took longer than expected. Execution time : 1711 2019-07-24 10:06:16,910 [egaRULES-MasterAgent] [ STANDARD] [ ] [ ] ( internal.async.Agent) INFO - System date: Wed Jul 24 10:06:16 CEST 2019 Total memory: 7,021,789,184 Free memory: 5,236,644,016 Requestor Count: 112 Shared Pages memory usage: 0% Current number of threads: 273 2019-07-24 10:07:21,132 [http-nio-8080-exec-2] [TABTHREAD4] [ ] [ OC:01.01.01] (ategy.proposition.CacheFactory) INFO localhost| Proprietary information hidden [email protected] - Refresh proposition cache for top level class OC-SR 2019-07-24 10:07:30,006 [ttp-nio-8080-exec-10] [TABTHREAD4] [ ] [ OC:01.01.01] (ategy.proposition.CacheFactory) INFO localhost| Proprietary information hidden [email protected] - Refresh proposition cache for top level class OC-SR 2019-07-24 10:07:35,746 [ttp-nio-8080-exec-10] [TABTHREAD4] [ ] [ OC:01.01.01] (ategy.proposition.CacheFactory) INFO localhost| Proprietary information hidden [email protected] - Refresh proposition cache for top level class OC-SR 2019-07-24 10:07:41,903 [http-nio-8080-exec-4] [TABTHREAD4] [ ] [ OC:01.01.01] (ategy.proposition.CacheFactory) INFO localhost| Proprietary information hidden [email protected] - Refresh proposition cache for top level class OC-SR 2019-07-24 10:07:45,753 [http-nio-8080-exec-6] [TABTHREAD4] [ ] [ OC:01.01.01] (ategy.proposition.CacheFactory) INFO localhost| Proprietary information hidden [email protected] - Refresh proposition cache for top level class OC-SR 2019-07-24 10:16:16,910 [egaRULES-MasterAgent] [ STANDARD] [ ] [ ] ( internal.async.Agent) INFO - System date: Wed Jul 24 10:16:16 CEST 2019 Total memory: 7,231,504,384 Free memory: 4,953,600,048 Requestor Count: 112 Shared Pages memory usage: 0% Current number of threads: 271
Pegasystems Inc.
IN
Hi Andre,
Apologies if I missed if it is mentioned any where but is your Container rule configured to capture impressions on retrieval. This is an option that you can configure. If not then are you explicitly capture impressions via the capture response service?
If would be great if you can explain your usecase and what you are trying to do?