Capturing responses to actions in the Agent Assisted channel with the CaptureOrder service
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.
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:
Name | Required | Description |
productOrderItem | ✓ | Contains information about the product, such as its price, product label, ID, and other details. |
relatedParty | ✓ | Contains 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:
Name | Description |
message | Indicates whether the service was captured successfully. |
status | The 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