Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
martinfrick
Product and Topic Expert
Product and Topic Expert
Welcome back to the blog post series about how to create your own Microsoft Teams extension for SAP solutions. In today’s sixth blog post I will provide you with all relevant details about the configuration and deployment of all required integration flows used by your extension application.

As explained in the first part (click here), this sample Microsoft Teams extension for SAP SuccessFactors will allow you, to create leave requests right from within Microsoft Teams. It also provides features for managers to approve or reject leave requests. Again, this blog series has a special focus on those customers already using the SAP Business Technology platform in their landscape.

  1. Preface and scenario introduction (click here)

  2. Target application features (click here)

  3. Requirements and application architecture (click here)

  4. SAP BTP subaccount configuration and test users (click here)

  5. SAP SuccessFactors instance setup (click here)

  6. Set up your SAP Cloud Integration instance (this blog post)

    • Configure your security settings for Principal Propagation

    • Provide your security settings for technical API access

    • Setup the security details for notification handling

    • Upload and deploy the integration flows



  7. Get your Microsoft Azure settings ready (click here)

  8. Deploy your Microsoft Teams extension (click here)

  9. Improvement ideas and further topics (click here)


A quick reminder for your convenience – Feel free to check out the GitHub repository provided in the SAP-samples organization. Please be aware, that the repository is still being updated, so make sure you’re pulling on a regular basis.

https://github.com/SAP-samples/btp-extend-workflow-cai-msteams/tree/full-scope

So, let’s get started and see what the integration layer of the extension application looks like! Please be aware, that the integration flows provided in this blog post have been specifically designed for the purpose of this sample use-case. They offer a limited set of features and are not supposed to be used in a productive leave request integration scenario.

SAP Cloud Integration


As part of the SAP Integration Suite, your SAP Cloud Integration instance will be the central component for the integration between SAP SuccessFactors and your Microsoft Teams extension application. Besides a standardized Principal Propagation feature, it offers you various options to harmonize data between various landscapes so a smooth and simple communication can be ensured. First of all, let’s check if any security related configurations are still missing.

Security configuration


For your Microsoft Teams Integration scenario, three configurations need to be maintained in the Security Material details of your SAP Cloud Integration instance. Make sure to update the relevant configurations also in your integration flows before deployment. You will see in a later step of the current blog post how to do this.

The following security configurations are required:

  • Credentials for a technical connection between SAP Cloud Integration and your extension application
    ➤ This configuration will be created in the next step

  • Credentials for a Principal Propagation connection between SAP Cloud Integration and SAP SuccessFactors
    ➤ This configuration should already exist (see link provided below)

  • Credentials for a fixed user connection between SAP Cloud Integration and SAP SuccessFactors
    ➤ This configuration should already exist (see link provided below)



SAP Cloud Integration – Existing security configurations


Details on how to configure the Fixed User and Principal Propagation connection between SAP Cloud Integration and SAP SuccessFactors can be found in the fifth blog post (click here). If you cannot see these two configurations in SAP Cloud Integration, please go back to the previous blog post before you continue with the next step.

Security configuration for notification handling

To ensure a secure transmission of events between SAP Cloud Integration and your extension application (in the SAP BTP Cloud Foundry environment), one additional security configuration is required. As the notification endpoints of your application are protected by XSUAA, you have to provide the required client credentials in SAP Cloud Integration.

The security configuration for the technical connection between SAP Cloud Integration and your extension application is of type OAuth2 Client Credentials. It uses the client credentials of an XSUAA instance, which is bound to your extension application. Make sure to note down the name of this new configuration.



























Name XSUAA_TEAMS_LEAVE (or any other name of your choice)
Description Can be freely chosen by you
Token Service URL <url>/oauth/token (more details below)
Client ID <clientid> (more details below)
Client Secret <clientsecret> (more details below)
Client Authentication Send as Request Header


XSUAA credentials for SAP Cloud Integration


You can get the required client credentials and the Token service URL from the XSUAA service key named cloudintegration which you created in the fourth blog post (click here).


XSUAA service key


After setting up all relevant security configurations in SAP Cloud Integration, you can now start to import the required integration flows. These flows will make use of the credentials configured in the current and previous blog posts.

Import and deploy the integration flows


In this part of the blog post you will learn how to import the required integration flows into your SAP Cloud Integration instance. After import and before the actual deployment, you need to set the correct configurations (like credentials) based on your own environment settings. This will also be covered in detail within today's blog post - but for now let's get started with the import.

1) The integration flows for the SAP Cloud Integration import can be found in the deploy/cloudintegration path of the GitHub repository (click here). Download the latest zip file to your local device.

2) Open your SAP Cloud Integration instance and switch to the Design menu. Click on Import at the top right of your screen to import the integration flow package.


SAP Integration Suite - Import integration flows


3) Select the zip file you just downloaded and upload it to SAP Cloud Integration.


SAP Integration Suite - Upload zip file


4) Open the uploaded package to see the available integration flows.



SAP Integration Suite - Open Package


5) In the Artifacts tab you can find the available integration flows of this sample project. Here's a short overview of the different flows and their different purposes.




  • Create Leave Request: This flow creates a new leave request in SAP SuccessFactors using your Principal Propagation credential configuration.

  • Get Leave Request: This flow reads the details of a leave request using Principal Propagation. It is currently not in use but might be suitable for your own enhancements.

  • Get Time Balance: Once a user has selected a time type, this flow fetches the available balance. For performance reasons, the balance is only fetched for a single time type using Principal Propagation. The balance calculation does not consider pending leave requests yet, but only approved workflows. This could be a potential enhancement of the current solution.

  • Get Time Types: This flow fetches the available time types of the current user (Vacation, Sick Leave, Jury Duty, ...) using your Principal Propagation configuration.

  • Process Notification: In this flow, SAP SuccessFactors notifications are processed and enriched with additional data before being sent to the extension application. This flow uses your Fixed API user configuration to read data from SAP SuccessFactors.

  • Update Workflow: The last flow allows you to update a leave request workflow status, as leave requests are typically approved or rejected using workflows. Therefore, Principal Propagation is used once again.



SAP Cloud Integration - Integration Flows


6) The above integration flows need to be configured based on your own environment settings before they can be deployed. To do so, please open the flows one after one another by clicking on the action button and select Configure.



SAP Cloud Integration - Configure integration flows


7) Update the integration flow configurations based on your own environment. Make sure, you update all relevant fields before you save the configuration! Once all fields are updated, save your configuration and deploy the integration flow! To get the required configuration details for each integration flow, see the next step. Further useful and important information can be found below.



SAP Cloud Integration - Update and save configuration



SAP Cloud Integration - Deploy your integration flow


Important - Some of the integration flows contain multiple selection options in the configuration drop-downs. This results from different integration components being used. Make sure you update and check the values of all drop-down combinations before saving!


SAP Cloud Integration - Configuration drop-downs


Important - Some of the integration flow configurations contain multiple tabs that need to be updated. Please make sure you update the configurations in all available tabs!


SAP Cloud Integration - Configuration tabs


😎 Here is an overview of the required configurations for all your integration flows. Go through each flow in detail and make sure not to miss any setting.









Create Leave Request

Address: SAP SuccessFactors API endpoint (click here)


Address Suffix: OData v2 suffix (most likely the provided default value)


Credential Name: Name of your Principal Propagation security configuration









Get Time Balance 

Applies to all available SAP SuccessFactors adapter types. Normally, once you update the first adapter type, the others will be updated too. Double check this before saving.


Address: SAP SuccessFactors API endpoint


Address Suffix: OData v2 suffix


Credential Name: Name of your Principal Propagation security configuration









Get Time Types

Applies to both available SAP SuccessFactors adapter types. Once you update the first available adapter typ, the other one will be updated too. Double check this before saving.


Address: SAP SuccessFactors API endpoint


Address Suffix: OData v2 suffix


Credential Name: Name of your Principal Propagation security configuration
















Process Notification


Tab: Receiver

Receiver: SuccessFactors

Applies to all available SAP SuccessFactors adapter types. Once you updated the first adapter type, the others should be updated too. Double check this before saving.


Address: SAP SuccessFactors API endpoint


Address Suffix: OData v2 suffix


Credential Name: Name of your Fixed User security configuration


Receiver: Notification Endpoint

Credential Name: Name of your XSUAA-based security configuration
➤ Check the beginning of the current blog post




Tab: More

Type: All Parameters

TEAMS_NOTIFICATION_ENDPOINT: Notification endpoint of your extension application. This endpoint is based on the route of your extension application once it is deployed to SAP BTP.

Recommended syntax
<cf-app-name-placeholder>.cfapps.<BTP region>.hana.ondemand.com/notify/notifyUser

App name (<cf-app-name-placeholder>😞
The application name you've set in the fourth part of the blog post series (click here)

SAP BTP region (<BTP region>😞
The SAP BTP region in which your extension application runs e.g., eu10, us20

Sample Endpoint:
https://sap-dev-leaverequest.cfapps.eu20.hana.ondemand.com/notify/notifyUser

If you’re not changing the source code, /notify/notifyUser is the correct path.









Update Workflow

As this integration flow does not use the standard SAP SuccessFactors but the generic OData adapter of SAP Cloud Integration, the configuration parameters look slightly different.

sfsf_baseurl: Your SAP SuccessFactors API endpoint

Credential Name: Name of the Principal Propagation credential configuration

Address: No change required

9) Check if all integration flows are deployed and in running state. Therefore, please switch to the Monitor area of your SAP Cloud Integration instance. By clicking on the All tile in the Manage Integration Content section, you should see all integration flows in a running state.



SAP Integration Suite - Check integration flow status



What’s next?


This blog post concludes the required configurations in your SAP landscape (SuccessFactors and Business Technology Platform). Your SAP Cloud Integration tenant is now ready to act as integration layer between your Microsoft Teams extension application and SAP SuccessFactors. Well done! In the next part of the blog post series you will learn about further configurations required in Microsoft Azure.

Stay curious!