Communication System and Autoflow
In this lesson, you will learn how to integrate your previously deployed custom logic microservice with SAP Sales Cloud and SAP Service Cloud Version 2. You will see how to configure the connection between the two systems by creating a communication system and an Autoflow. By the end of this lesson, you will have a fully functional integration: when a new case is created in SAP Sales Cloud and SAP Service Cloud Version 2, your custom logic will automatically create a subcase.
Create a Communication System
To begin the integration, open your SAP Sales Cloud and SAP Service Cloud Version 2 tenant. In the top-right corner of the screen, choose your user profile image and select Settings from the dropdown menu. Within the Settings section, navigate to All Settings→Integration→Communication Systems.

A communication system is an external connection setup used for application integration. It specifies how SAP Sales Cloud and SAP Service Cloud Version 2 interacts with other applications, such as microservices deployed on SAP BTP. Each communication system includes the technical details necessary to send or receive messages between SAP Sales Cloud and SAP Service Cloud Version 2 and an external service.
In this step, you will create an outbound communication system, as SAP Sales Cloud and SAP Service Cloud Version 2 requires sending information to the previously created external microservice running on BTP. This connection allows the SAP Sales Cloud and SAP Service Cloud Version 2 to trigger your custom microservice logic when a specific business event, such as a case being created, occurs.
Choose the Plus (+) button to create a communication system and complete the required fields.
Enter SubCaseCommunicationSystem as the Display ID and add a short description such as Create a Subcase.
Switch to the Outbound tab and click the (+) Create button. For Protocol, choose https. In the Host Name field, enter the route URL of your deployed microservice from the previous lesson, Developing a Custom Logic Microservice in SAP Build Code. This is the URL that was automatically generated when the microservice was deployed to the Cloud Foundry environment. It indicates where the SAP Service Cloud Version 2 system will send the outbound request.
Keep the Authentication Method set to None for this exercise. After entering all details, choose Save and Activate.

Create an Autoflow
Once the communication system is active, the next step is to set up an Autoflow in SAP Sales Cloud and SAP Service Cloud Version 2. An Autoflow allows you to automate actions based on specific business events. In this case, it sends an event to your microservice whenever a new case is created that meets certain conditions.
Go back to All Settings on the Settings tab, navigate to Business Flow→Autoflow. To create a new automation, click the plus (+) icon and choose Rule. A rule defines what event will trigger the automation and what actions will follow.
In the rule configuration, choose Case from the Entity dropdown and then choose Create Case as the Event Type.

Then add a condition to ensure the Autoflow runs only for specific types of cases. In the condition area, define that Case Type is Equal to ZCAS – Standard Case Type. This guarantees that your microservice is only called when a standard case is created.

Next, add an action by choosing Send Event Notification from the Plus (+) dropdown. This action will send an outbound call to the communication system you created in the previous step.

For the Event Name, you can simply enter a short and meaningful name, for example, createSubcase. For the Communication System, choose the one you created in the previous step, SubCaseCommunicationSystem. This ensures that the event notification is sent to the correct external endpoint, which is your deployed microservice on SAP Business Technology Platform.
In the Subscribe Path, enter /onCreateSubCase. This path corresponds to the endpoint you implemented in the app.js file of your microservice. It defines the webhook endpoint that receives the event from SAP Service Cloud Version 2. When the Autoflow sends a message to this path, it triggers the function in your microservice. The function then executes the logic to automatically create a new subcase in SAP Service Cloud Version 2.
After completing the above configuration, enter Autoflow to create a subcase as the description for the Autoflow, save it, and activate it to ensure it runs automatically whenever a new ZCAS case is created.
Test the Custom Logic Microservice
Next, verify that your custom logic microservice functions properly by testing the integration in SAP Sales Cloud and SAP Service Cloud Version 2.
Once the communication system and Autoflow configuration are complete, the integration can be validated to confirm everything functions as intended.
During the test, a new case of the type, Standard Case Type is created, triggering the Autoflow. This event sends a notification to the deployed microservice, which should automatically create a related subcase in SAP Service Cloud Version 2.
The following video demonstrates the complete testing process step by step, from creating a case to verifying that the subcase was successfully generated by the microservice.
Summary
- Communication System
A communication system is an external system connection used to integrate with SAP Sales Cloud and SAP Service Cloud Version 2. It establishes the technical connection between the tenant and external services, such as microservices deployed on SAP Business Technology Platform (BTP). In this lesson, you created an outbound communication system, entered the route URL of your deployed microservice, and activated it to enable secure communication.
- Autoflow
An Autoflow automates actions based on specific business events. You created a new Autoflow that triggers when a case of type ZCAS is created. The Send Event Notification action uses the previously created communication system and the subscribe path /onCreateSubCase to call the microservice and execute the custom logic when the event occurs.
- Case
Creating a Case with Standard Case Type triggered the configured Autoflow, which sent an event notification to the deployed microservice.
- Testing
The microservice created a related subcase in response, confirming that the integration and custom logic functioned as expected.