Contact Us

Mapping to Send Status Events to MS Teams

The built-in mapping  "Event Situation to MS Teams Chat" does not support status events yet.

If you want to send status event notifications to MS Teams channels you can use the mapping provided below. 

Apply the mapping as described below:

  1. Open SAP Cloud ALM Launchpad
  2. Select Administration -> External API Management
  3. Select Mappings Management
  4. Select "Add new Mapping" ( + Icon)
  5. Enter the following data:
    Description: <Any Description>
    Version: 1
    Source: SAP Cloud ALM
    Destination: Microsoft Teams
    Mapping Type: Payload Based
  6. Copy the JSON below into the mapping rules
  7. Select Save

Mapping to send status events to MS teams

{

    "_information":

    {

        "_version": "1",

        "_source": "SAP Cloud ALM Event Situation",

        "_destination": "MS Teams Chat (AdaptiveCard)",

        "_name": "SAP Cloud ALM Event Situation to MS Teams Chat (AdaptiveCard)",

        "_comment": ""

    },

    "structure":

    {

        "request":

        {

            "type": "message",

            "attachments":

            [{

                "contentType": "application/vnd.microsoft.card.adaptive",

                "content":

                {

                    "type": "AdaptiveCard",

                    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",

                    "version": "1.2",

                    "body":

                    [{

                        "type": "TextBlock",

                        "text": "[SAP Cloud ALM for Operations] #{subject}",

                        "size": "Large",

                        "weight": "Bolder",

                        "style": "heading",

                        "wrap": true

                    },

 

                        {

                            "type": "Container",

                            "items":

                            [{

                                "type": "FactSet",

                                "facts":

                                [{

                                    "title": "Type",

                                    "value": "#{eventSubType}"

                                },

                                    {

                                        "title": "Name",

                                        "value": "#{eventName}"

                                    },

                                    {

                                        "title": "Status",

                                        "value": "#{tags.statusIdDescription}"

                                    },

                                    {

                                        "title": "Event Phase",

                                        "value": "#{tags.eventPhaseString}"

                                    },

                                    {

                                        "title": "Source",

                                        "value": "#{tags.eventSource}"

                                    },

                                    {

                                        "title": "Start Time",

                                        "value": "#{tags.startTimeUTC}"

                                    },

                                    {

                                        "title": "Expected End",

                                        "value": "#{tags.endTimeUTC}"

                                    },

                                    {

                                        "title": "Duration",

                                        "value": "#{tags.duration}"

                                    },

                                    {

                                        "title": "Business Service Name",

                                        "value": "#{tags.businessService}"

                                    },

                                    {

                                        "title": "Business Service Description",

                                        "value": "#{tags.businessServiceDescription}"

                                    },

                                    {

                                        "title": "Affected Services",

                                        "value": "#{tags.affectedServicesDetails}"

                                    }]

                            }]

                        },

                        {

                            "type": "ActionSet",

                            "actions":

                            [{

                                "type": "Action.OpenUrl",

                                "title": "Open Event Calendar",

                                "url": "#{tags.monUILink}"

                            }]

                        }]

                }

            }]

        },

        "response":

        {

            "chatCreated": true

        }

    },

    "eventTypeMapping":

    {

        "_comment": "Specific event type mapping",

        "operationMappings":

        [{

            "eventType": "EVENT-SITUATION.CREATED",

            "operation": "POST",

            "responseRoot": ""

        }]

    }

}