Integrating Microsoft Teams with SAP Digital Manufacturing Cloud
SAP Digital Manufacturing Cloud has some very powerful features that allow you to integrate it to other platforms including both SAP and Non SAP applications.
This blog will show you how to integrate SAP Digital Manufacturing Cloud into Microsoft Teams, walking you step by step through the configuration of both Microsoft Teams and SAP Digital Manufacturing Cloud.
Lets get started by configuring Microsoft Teams.
Create a team In Microsoft Teams
- First, click Teams on the left side of the app, then click Join or create a team at the bottom of your teams list.
- Then click Create team (first card, top left corner).
- Choose Build a team from scratch.
- Next, you’ll want to choose what kind of team you want this to be:To limit content and conversation to a specific set of people, choose Private.For a community or topic that anyone in the organization can join, choose Public.
- Name your team and add an optional description.
- When you’re done, click Create.
Add the Incoming Webhook App
- Press the 3 dots on the right-hand side of the team you created in the previous steps
- Select Manage Team
- Switch to the Apps tab and press the More apps button
- Search for webhook and select the Incoming Webhook app
- Click the Add to a team button
- Ensure that the correct teams channel is displayed and press the Set up a connector button
- A configuration page will now be displayed. Enter the name as SAP Digital Manufacturing Cloud (Or a name that you prefer) and either upload an image or keep the default. This name and image will be displayed along with the messages sent from DMC. Finally press the Create button
- The webhook will now be created and a URL will be created. Copy this URL as you will need it later (Note:- This URL can be retrieved again later if you lose it) and press Done
- The setup for Microsoft Teams is now completed and can now be used by DMC.
Microsoft Teams is now configured so we now move on to configure SAP BTP and SAP DMC.
- To be able to call an API outside of DMC you have to first create a destination in the BTP cockpit. Log onto you BTP cockpit and select the global tenant where DMC is installed. Expand the Connectivity section in the menu and select Destinations
- Select New Destination
- Configure the destination details as shown in this screenshot apart from using your own URL created during the webhook (only the start part of the URL) creation and press Save
DMC Web Server
- In the DMC Launch Pad select the Manage Web Servers
- Click on Create
- Use the following settings and as when the destination was created use your own unique URL for the Host URL field and select your own unique plant.
- Once the web server has been created go to the destinations section and add the Microsoft Teams destination created previously.
- On the left hand side of the screen select the DMC_Cloud Web Server
- This will open the configuration for the DMC_Cloud web server where we need to add the Microsoft teams web server to its list of connections. Press create to add the new connection.
- Select the Microsoft teams service from the list
- It should now appear in the list of connections (you may not have the same qty of connections as in the screenshot).
Create a service
- From the DMC launch pad open the Manage Service Registry app
- Click Create
- In the Header section enter the following details
- In the general information section enter the following details
Note: the path is the end section of the URL generated in Microsoft Teams.
- The Parameters is left empty
- The request body is required as this is where the actual message to be sent is passed to the webhook API. Turn on the request body
- Select application/json for the Content Type
- Select the drop-down icon next to inline schema and press Define Inline Schema
- Replace the Schema Definition JSON with the following and press save
“description”: “Message To Be Sent”,
- The service is now ready to be used.
Design Production Process
- From the DMC Launchpad, open the Design Production Processes
- Click Create
- Click Create
- Fill in the details as shown in this screenshot and press Create
- Change the toolbar on the left-hand side to the editor by selecting the pencil icon and drag and drop a start and end control onto the worksheet.
- Click on the start control to display the configuration and press Manage Parameters
- Click Create and add one parameter called MessageToBeSent, type string and required as shown below, then press Save
- On the left-hand tool bar select Select Services
- Select the service you previously created, and press Save
- Find your service in the list of Services and Processes on the left-hand side and drag and drop your service onto the worksheet. On the right-hand side map the text input field to your previously created MessageToBeSent parameter.
- Join the start control to your service and your service to the end control.
- Press Save All then Quick Deploy
- The integration is now ready to be tested.
- Press the Run button
- Enter a value in the MessageToBeSent field and press Run
- You should receive a message saying the process has been successfully executed and a message will be shown in the Microsoft Teams Channel.
That’s it, you now have a custom service inside of SAP Digital Manufacturing Cloud that send messages to Microsoft Teams, reach out and let me know of any uses cases you think this could be useful for or any suggestions of other implementations you would like to see documented.
Thanks for taking the time to read this blog and please leave feedback or any questions you have.
excellent kevin, will try for sure
VERY WELL DONE!
Great post, thanks for sharing!