cancel
Showing results for 
Search instead for 
Did you mean: 

Message Format in MSTeam

ksinghal
Explorer
0 Kudos

Hi Experts,

I have integrated MS Team into SAP DMC using this blogs . I am getting message in a Same format as mentioned below

but instead of this I need message in a table format as mentioned below


Can anyone please help me out on this.

Thanks & Regards

View Entire Topic
0 Kudos

Hi Kartikksinghal,

you can checkout the following blog for the general adaptive card approach.
Use the Adaptive Card Designer and refer to the table example.

Kind Regards
Jonas

ksinghal
Explorer
0 Kudos

Hi Jonas,

Thanks for helping me out.

Can you help me to correct me Schema that we need to define in Manage service registry.

This is my Message format

Script Code

var content = {
    "type": "AdaptiveCard",
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.2",
    "body": [{
            "type": "TextBlock",
            "text": "Service Request ",
            "wrap": true,
            "size": "large",
            "color": "accent",
            "isSubtle": true,
            "id": "acTitel"
        }, {
            "type": "ColumnSet",
            "columns": [{
                    "type": "Column",
                    "width": "stretch",
                    "items": [{
                            "type": "TextBlock",
                            "text": "Raised by",
                            "wrap": true,
                            "weight": "Bolder",
                            "id": "a"
                        }
                    ]
                }, {
                    "type": "Column",
                    "width": "stretch",
                    "items": [{
                            "type": "TextBlock",
                            "text": "User ID\n",
                            "wrap": true,
                            "id": "acUserID"
                        }
                    ]
                }
            ]
        }, {
            "type": "TextBlock",
            "text": "At Location",
            "wrap": true,
            "size": "Large",
            "weight": "Bolder",
            "separator": true
        }, {
            "type": "FactSet",
            "facts": [{
                    "title": "Workcenter",
                    "value": "sWorkcenter"
                }, {
                    "title": "Operation",
                    "value": "sOperation"
                }, {
                    "title": "Resource",
                    "value": "sResource"
                }
            ],
            "id": "acLocation"
        }, {
            "type": "TextBlock",
            "text": "Current Product ",
            "wrap": true,
            "separator": true,
            "size": "Large",
            "weight": "Bolder"
        }, {
            "type": "FactSet",
            "facts": [{
                    "title": "Order",
                    "value": "sOrder"
                }, {
                    "title": "SFC",
                    "value": "sSFC"
                }
            ],
            "id": "acProduct"
        }
    ],
    "actions": [{
            "type": "Action.OpenUrl",
            "title": "View Order Details",
            "url": "https://xxxxxxxxx.test.execution.eu20.dmc.cloud.sap/cp.portal/site#ManageOrders-Display?sap-ui-app-id-hint=sap.dm.dme.manageorder&/ShopOrders/ShopOrderBO:",
            "id": "acActionViewOrderDetails"
        }
    ]
};


content.body[1].columns[1].items[0].text = $input.userID;
content.body[3].facts[0].value = $input.workcenter;
content.body[3].facts[1].value = $input.operation;
content.body[3].facts[2].value = $input.resource;
content.body[5].facts[0].value = $input.order;
content.body[5].facts[1].value = $input.SFC;
content.actions[0].url = content.actions[0].url + $input.plant + "," + $input.order;

$output.content = content;

Schema

{
  "type": "object",
  "properties": {
    "type": { "type": "string", "const": "AdaptiveCard" },
    "$schema": { "type": "string" },
    "version": { "type": "string" },
    "body": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": { "type": "string" },
          "text": { "type": "string" },
          "wrap": { "type": "boolean" },
          "size": { "type": "string" },
          "color": { "type": "string" },
          "isSubtle": { "type": "boolean" },
          "id": { "type": "string" },
          "columns": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": { "type": "string" },
                "width": { "type": "string" },
                "items": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": { "type": "string" },
                      "text": { "type": "string" },
                      "wrap": { "type": "boolean" },
                      "weight": { "type": "string" },
                      "id": { "type": "string" }
                    },
                    "required": ["type", "text", "wrap", "weight", "id"]
                  }
                }
              },
              "required": ["type", "width", "items"]
            }
          },
          "separator": { "type": "boolean" },
          "weight": { "type": "string" },
          "facts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "title": { "type": "string" },
                "value": { "type": "string" }
              },
              "required": ["title", "value"]
            }
          },
          "actions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": { "type": "string", "const": "Action.OpenUrl" },
                "title": { "type": "string" },
                "url": { "type": "string" },
                "id": { "type": "string" }
              },
              "required": ["type", "title", "url", "id"]
            }
          }
        },
        "required": ["type"]
      }
    }
  },
  "required": ["type", "$schema", "version", "body"]
}
This Schema is not working. Can u please help me in correcting this schema