[Part-4] Leveraging ‘Events-to-Business Actions Framework’ for SAP Service Cloud Scenario
Blog post series
[Part-1] ‘Events-to-Business Actions’: An event-driven architecture on SAP BTP to implement Industry 4.0 scenarios with Microsoft Azure Services (click here)
In previous blog post of this series, “Using Events-To-Business Actions framework for building event driven business applications”, we have seen the details of the framework and how to design applications in SAP BTP to strengthen customer business processes and boost operational effectiveness by linking industry events to business actions.
In this blog post, we will examine how this framework can be used with SAP Service Cloud for Service Order creation process. It is highly recommended to go through previous blogs of this series starting with “Event-to-Business Actions” architecture: An event-driven framework on SAP BTP (Business Technology Platform) to implement Industry 4.0 scenarios with Microsoft Azure services by PVN Pavan Kumar.
Overview of Business Process
Let us look at a simple business process flow of Service Ticket creation as shown in Figure -1.
In this scenario, we will consider Microsoft Azure IoT as the system for event source. Microsoft Azure IoT can be used to connect and control numerous devices or pieces of industrial equipment, and these devices are constantly sending data to the platform. To find equipment anomalies in Microsoft Azure IoT, various rule-based conditions are applied. It is possible to send the specifics of an anomaly that has been raised to SAP BTP Event Mesh as an event once the “Events to Action framework” has been configured. The extension application of the framework on SAP BTP responds to the event and determines the business action to be carried out based on the specifics of the anomaly.
With this setup and configuration, for the business process mentioned above, we will use an Industrial Pump as an example device in which a rise in temperature creates an anomaly event, based on the set up of action framework, it will eventually generate a repair “Service Ticket” in the SAP Service Cloud.
Before you start to implement this scenario, follow the documentation in GitHub repository SAP BTP – Events to Business Actions Framework to download and deploy the application in your SAP BTP subaccount. The repository provides detailed documentation and steps on how to configure, deploy and build event-driven applications using this framework.
Configuration Set Up in SAP BTP and Microsoft Azure
[In Microsoft Azure] Create Device Template and a Simulated Device
In Microsoft Azure, a device template ‘Industrial Pumps’ is created with PumpId, PumpType, Status, Service Ticket property and Temperature telemetry information as shown in Figure – 2. To know more about how to setup and configure devices in Microsoft Azure, refer to this GitHub repository here.
A simulated device is created in reference to a registered product in SAP Service Cloud as shown in Figure – 3.
The Status property of device is set to ‘Provisioned’ and Service Ticket property is set to empty as shown in the Figure – 4.
[In Microsoft Azure] Create Data Export representing an Anomaly
In data export configuration, events from Industrial Pumps devices are exported if temperature of the devices rises beyond 30 degrees Celsius. This configuration is shown in Figure – 5.
In addition to telemetry information like temperature, the event is also enriched with additional information like PumpId, PumpType, System etc. Finally, destination is set to SAP Event Mesh to forward the event details to SAP BTP as shown in Figure – 6.
[In SAP BTP] Create an SAP Destination for Service Cloud API
As shown in Figure – 7, a destination named ‘cx-service-cloud-api’ is added using BTP cockpit with details of SAP CX Service Cloud api details and relevant credentials. The API url for this destination is: https://<<cxservicecloudsystemid>>.crm.ondemand.com/sap/c4c/odata/v1
[In SAP BTP] Deploy and Access action modeler application to configure your scenario.
Create Business Rule for Service ticket classification data: Post deployment of the framework application, create a new business rules project ‘Service Ticket Configuration’ similar to ‘Event to Actions Rules Project’ as shown in Figure – 8. This will have a decision table rule to determine required classification data like service category, priority etc to create the ticket in Service Cloud.
You can download the Service Ticket Configuration Business Rules Project from here.
Configure Business Action: In action modeler application, we will configure the business action with following details:
- Figure – 10: Get Ticket Configurations from Business Rule Project in SAP BTP.
- Figure – 11: Create Repair Service Ticket in SAP Service Cloud.
- Figure – 12: Once ticket is created, update device status and service ticket property in Microsoft Azure.
You can find the configuration details in an excel here.
Update Decision table in SAP Business Rules application with Action Id: As shown in Figure – 13, in ‘Events to Action Rules Project’, update main action id (Create Service Ticket) for ‘Industrial Pumps’ device template.
[In Azure/BTP/Service Cloud] Test the Application
To test the end-to-end process, start with configuring the data export condition in Microsoft Azure and verifying the Service Ticket creation in SAP Service Cloud.
Enable data export and wait for it to be healthy as shown in Figure – 14.
Repair Ticket created in SAP Service Cloud as shown in Figure – 15.
Verify the device status in Microsoft Azure. The status should be updated as ‘Under Maintenance’ as shown in Figure – 16.
Check Action Logs Application to view the transaction logs as shown in Figure – 17.
In this blog post, I have tried to consume real-time events from Azure IoT and integrate it with SAP Service Cloud, in a similar way you can develop multiple use cases and integrate events into any SAP business application with minimum configuration.
Below is the link and detailed documentation of the framework.
Build Events-to-Business Actions Scenarios with SAP BTP and Microsoft Azure
Deploy in your SAP BTP subaccount and start developing your event-driven business applications.
To learn more about SAP BTP, see the learning journey on SAP Learning called Discover SAP Business Technology Platform, a great introduction to BTP and the Intelligent Enterprise strategy to see what it’s all about for free or check out Develop Advanced Extensions with SAP Cloud SDK plus much more free learning at SAP Learning site.
For more information about this topic or to ask a question, please contact us at firstname.lastname@example.org.