Triggering an Event with the SOAP, HTTP and REST services
If the client calls are coming from outside the cluster that is running Pega Customer Decision Hub, you can use the SOAP, REST and HTTP services to trigger Events.
Using the built-in SOAP and HTTP services
Pega Customer Decision Hub provides built-in support for triggering events with the SOAP and HTTP services.
The following rules are available:
- Rule-Service-SOAP
The following URL provides the WSDL for your application's Event handling SOAP Service: http://<host>:<port>/prweb/PRSOAPServlet/SOAP/PegaMKTDataMktEvent/Services?WSDL
The following is an example request triggering the AccountOpened Event, passing in the Customer's ID, their location (latitude/longitude), and information about the Event:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:even="EventPayload" xmlns:urn="urn:PegaRULES:SOAP:PegaMKTDataMktEvent:Services"> <soapenv:Header> <even:EventPayload>?</even:EventPayload> </soapenv:Header> <soapenv:Body> <urn:EventPayload> <CustomerID>JR</CustomerID> <EventName>AccountOpened</EventName> <EventType>Branch</EventType> <Latitude>42.9613</Latitude> <Longitude>-71.4798</Longitude> </urn:EventPayload> </soapenv:Body> </soapenv:Envelope>
- Rule-Service-HTTP
- The following URL is an example request triggering the AccountOpened Event, passing in the Customer's ID, and information about the Event: http://<host>:<port>/prweb/PRHTTPService/PegaMKTDataMktEvent/Services/HandleMktEvents?EventName=AccountOpened&CustomerID=JR&EventType=Branch
Using a REST service
Pega Customer Decision Hub does not provide a built-in REST service to trigger events. However, you can define one in your rule set layer and configure it to write to the Stream data set, similar to how the HTTP or SOAP services do it. For an example, see the entry point activity HandleHTTPEvent under PegaMKT-Data-Event.
Previous topic Triggering a real-time event with the Event Stream service Next topic Using a geofence to trigger a real-time event