SAP Digital Manufacturing Cloud boasts powerful features that enable seamless integration with various platforms, including both SAP and non-SAP applications. This guide outlines the process of notifying workers via Microsoft Teams using the extensibility capabilities of SAP Digital Manufacturing and the Business Technology Platform (BTP).
Sending notifications to operators in Microsoft Teams when an order is released or when the resource status changes can streamline communication and ensure timely action. The key steps include:
{
"type": "object",
"properties": {
"type": {
"type": "string"
},
"attachments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"contentType": {
"type": "string"
},
"content": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"body": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"text": {
"type": "string"
},
"wrap": {
"type": "boolean"
},
"style": {
"type": "string"
},
"fontType": {
"type": "string"
},
"size": {
"type": "string"
},
"color": {
"type": "string"
},
"isSubtle": {
"type": "boolean"
},
"width": {
"type": "string"
},
"title": {
"type": "string"
},
"value": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"type",
"text"
]
}
},
"$schema": {
"type": "string"
},
"version": {
"type": "string"
},
"actions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"title": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": [
"type",
"title",
"url"
]
}
}
}
}
}
}
}
},
"required": [
"type",
"attachments"
]
}
(Note:- While selecting Schema in Manage Parameter you need to select your attachementSchema that you find in Manage Service Registry>your API Services name>Request Body>Schema)
Final Script Code:-
$output.attachments = [{
"contentType": "application/vnd.microsoft.card.adaptive",
"content": {
"type": "AdaptiveCard",
"body": [{
"type": "TextBlock",
"text": "Order Released Details",
"wrap": true,
"style": "heading",
"fontType": "Default",
"size": "Large",
"color": "Accent",
"isSubtle": true
},
{
"type": "ColumnSet",
"columns": [{
"type": "Column",
"width": "auto",
"items": [{
"type": "TextBlock",
"text": "Raised By-",
"wrap": true
}]
},
{
"type": "Column",
"width": "stretch",
"items": [{
"type": "TextBlock",
"text": $input.Supervisor,
"wrap": true
}]
}]
},
{
"type": "ColumnSet",
"columns": [{
"type": "Column",
"width": "auto",
"items": [{
"type": "TextBlock",
"text": "Assigned To-",
"wrap": true
}]
},
{
"type": "Column",
"width": "stretch",
"items": [{
"type": "TextBlock",
"text": $input.User,
"wrap": true
}]
}]
},
{
"type": "TextBlock",
"text": "At Location",
"wrap": true,
"style": "heading",
"separator": true,
"size": "ExtraLarge"
},
{
"type": "FactSet",
"facts": [
{
"title": "Site-",
"value": $input.Plant
},
{
"title": "Workcenter-",
"value": $input.WorkCenter
},
{
"title": "Resource-",
"value": $input.WorkCenter
}]
},
{
"type": "TextBlock",
"text": "Current Product",
"wrap": true,
"style": "heading",
"separator": true,
"size": "ExtraLarge"
},
{
"type": "FactSet",
"facts": [{
"title": "Order-",
"value": $input.OrderNumber
},
{
"title": "SFC-",
"value": $input.SFC
}]
}],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.5",
"actions": [{
"type": "Action.OpenUrl",
"title": "View Order Details",
"url": "https://your-dm-url.test.execution.eu20.dmc.cloud.sap/cp.portal/site#ManageOrders-Display?sap-ui-app-id-hint=sap.dm.dme.manageorder&&searchPayload="+$input.OrderNumber
}]
}
}]
$output.type= "message"
6. Now, Map your Script output
I have used different service and Script Task to fetch following Details
You can also create your own card design from Adaptive Cards
Final look of Production Process for Order ReleasedFinal look of Production Process for Resource Status Changed
For Resource Status Changed
Step 8: Testing
Conclusion
By following these steps, SAP Digital Manufacturing Cloud is integrated with Microsoft Teams, enabling efficient notifications and communication with operators. This integration leverages the capabilities of the Business Technology Platform to enhance operational efficiency and responsiveness
Do you enjoy this post? I would love to hear your thoughts! Share your feedback in the comments section below. Every piece of feedback is highly appreciated and valued.
Relevant community resources:
Regards,
Kartik Singhal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.