Skip to Content
Technical Articles

Serverless Extensions – Part 5: Bring it all together – Testing the extension end to end

Serverless Extensions
Part 1 – Introduction and Set up messaging queue in SAP Cloud Platform Enterprise Messaging
Part 2 – Configure SAP Cloud Platform Open Connectors to connect to Whatsapp and Twitter.
Part 3 – Set up SAP Cloud Platform Backend service and connect the APIs to SAP Cloud Platform Functions.
Part 4 – Set up functions in SAP Cloud Platform Functions and connect them to the queues and open connectors 
Part 5 – Bring it all together – Testing the extension end to end.

Now that we have configured and connected all the services required for our scenario, let us test out the two additional functionalities we set out to achieve.

Scenario 1

Create a promotion applicable for all the customer groups.

The application sends a message to the ‘promotions’ queue we set up (refer part 1)

 The message sent is picked up by the trigger to the ‘Master’ function(refer part 4). This function gets the contact number for the priority customers from the backend service and sends the WhatsApp message using the open connectors (refer part 1)

 

Since this promotion applies for all the customers, it gets published on twitter as well.

SCP functions service records execution logs which you can access from the dashboard.

 

Scenario 2

Let us try to create a promotion applicable only for the priority customers. 

 

In this case, the priority customers receive the promotion information through WhatsApp. The promotion does not get published on twitter.

I hope this blog series proves helpful to any of you planning to extend the legacy application using the services offered by SAP Cloud Platform.

Be the first to leave a comment
You must be Logged on to comment or reply to a post.