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:
- Open SAP Cloud ALM Launchpad
- Select Administration -> External API Management
- Select Mappings Management
- Select "Add new Mapping" ( + Icon)
- Enter the following data:
Description: <Any Description>
Version: 1
Source: SAP Cloud ALM
Destination: Microsoft Teams
Mapping Type: Payload Based - Copy the JSON below into the mapping rules
- Select Save
{
"_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": ""
}]
}
}