Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Capturing responses to actions in the Agent Assisted channel with the CaptureOrder service

Updated on September 15, 2022

CaptureOrder is a wrapper REST service that supports the POST HTTP method. This service allows callers to capture the response as Ordered for the actions which are about to be fulfilled.

Tip: In most implementations, adaptive models that govern next-best-action decisioning consider Accepted to be the positive response. However, in the context of a customer service application, this may not always be accurate, and you may want to consider Ordered to be the positive response. In such a case, you can implement the CaptureOrder service to capture the response, and then configure the relevant adaptive models to learn from it.
Pega Customer Decision Hub

The URL pattern for this service is:

http://<host>:<port>/prweb/api/PegaMKTContainer/V1/CaptureOrders

Swagger document

To help you configure the service, you can refer to the following Swagger document: Swagger document for CaptureOrders V1.

POST Service Request

For the POST request, the service expects a JSON Object with the following attributes:

NameRequiredDescription
productOrderItem Contains information about the product, such as its price, product label, ID, and other details.
relatedPartyContains subscription details such as SubjectId, name, and so on, against which orders will be captured.

A sample invocation request is shown below:

{"externalId":"I-1085","productOrderItem": [{"id": "100","quantity": 1,"action": "add","productOffering": {"id": "PO-1001","name": "LG V40 ThinQ"}}],"relatedParty":[{"id":"07968910888","role":"Subject","name":"Ben stokes"},{"id":"CSC Admin","role":"Seller","name":"CSC Admin"}]}

Service Response

For the response, the service returns a JSON object with the following attributes:

NameDescription
messageIndicates whether the service was captured successfully.
statusThe status of the service request.

A sample service response in case of success is shown below:

{"message": "Orders captured successfully","status": "Ok"}

A sample service response in case of error is shown below:{"message": "Orders not captured.Missing product offering name for related party 07968910888","status": "Error"}

  • Previous topic Capturing responses to actions with the CaptureResponse service
  • Next topic Accessing a customer's interaction history with the CustomerOfferHistory REST service

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us