entity.presentDetails
method
Usage info
This method is used to provide custom flexpane behavior for Work Objects. Apps call this API method to send per-user flexpane metadata to the client.
Here is an example of what the metadata
object looks like:
{
"entity_type": "slack#/entities/file",
"url": "https://miro.com/app/board/XYZ=/",
"external_ref": {
"id": "XYZ=",
},
"entity_payload": {
"attributes": {
"title": {
"text": "GTM Project Capybara",
},
"display_type": "Miro Board",
"product_name": "Miro"
},
"fields": {
"created_by": {
"value": "Platform Integrations",
"type": "string"
},
"preview": {
"alt_text": "Miro Board image",
"image_url": "https://miro.com/app/images/application/icons/XYZ/540x540/board_icon_5.png?etag=XYZ"
},
"last_modified_by": {
"value": "Platform Integrations",
"type": "string"
},
"date_created": {
"value": 1742923321,
},
"date_updated": {
"value": 1742923333,
},
"file_size": {
"value": "NA"
},
"mime_type": {
"value": "Miro"
}
},
"display_order": ["created_by", "last_modified_by", "date_created", "date_updated", "file_size", "mime_type", "preview"]
}
}
Enterprise Grid considerations
When your app receives the entity_details_requested
event in an Enterprise Grid context, the check to see whether the user has connected their Slack and third party accounts can be workspace agnostic, and does not need to rely on the team_id
sent in the entity_details_requested
event. This is because Slack user IDs are globally unique, and the flexpane is not scoped to a team. As such, as long as the Slack user ID is associated to a user in the app's service, that should be enough to determine whether the user has a connected account.