In our client, we have a use case:
- A case is pending in Workbasket.
- An external application will invoke a Pega API to resume the case and proceed the flow.
Which Pega REST API (OOTB) can we use to implement this?
In our client, we have a use case:
Which Pega REST API (OOTB) can we use to implement this?
@Will Cho , you can leverage api/v1/assignments GET this uses GetNextWork or api/v1/assignments/{id} if you know the identifier and you then can process the assignment using /api/v1/assignments/{id} POST
Remember to pass the eTag value you retrieve on the first call in the second call.
You can test all this using Pega API Help from any Pega Platform install
@HERMA Thanks, i was able to process it using POST /assignments/{ID}.
But, how can the case in Workbasket receive and process the request parameters posted by the external application?
e.g. It is sending these request parameters to Pega API.
{
“content”: {
“SubscriberID”: “05075289601”,
“Result”: “Success”
}
}
@Will Cho , if you need to move the assignment you can use that endpoint only. If you need to update the case data as well you’ll need to combine this with the api/v1/cases/{ID}. Use the GET to get the eTag and then the POST passing the eTag. With this you can update the case and then move the assignment using api/v1/assignments/{id} POST
@Will Cho
Based on our POC:
POST /assignments/{ID} will process an assignment in Workbasket.
About Request data mapping:
“content”: {
“SubscriberID”: “05075289601”,
“Result”: “Success”
}
What’s in the content is automatically mapped to pyWorkPage. E.g.
pyWorkPage.SubscriberID
pyWorkPage.Result