We recently got a requirement to write the logic/functions to integrate widgets to Cloud for Service. For the sake of simplicity I wont get into validations or checking formats etc.
First we wrote the logic for handling inbound calls...
For example, the incoming call object could be as simple as this:
Then we create the payload as per sap documentation.
Lastly the method to post message to parent
Inbound working.
For outbound, we first need an event listener for our method that will handle the call
Then in the call handling method we simply get the number and proceed with what we need to do. Example connect to external service to make the call.
Click on any number, the call will be passed. Example below.
Thank you for reading.