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"]
}
}
Accepted properties for the error object
| Property | Accepted values | Required/Optional | Description |
|---|---|---|---|
actions | Array of action button objects | optional | Set of action buttons to be shown in case of a specific error. |
custom_message | string | optional | Used when status is 'custom' to provide a specific message to the client. |
custom_title | string | optional | Used when status is 'custom' to provide a specific title. |
message_format | "markdown" | optional | String format for custom message. |
status | object | String. Can be one of ["restricted", "internal_error", "not_found" "custom", "custom_partial_view", "timeout", "edit_error"] | An error status for why an entity could not be presented. |
Action button schema
| Property | Required/Optional | Type |
|---|---|---|
action_id | required | string |
accessibility_label | optional | string |
processing_state | optional | object |
style | optional | string, can be one of: ["primary", "danger"] |
text | required | string |
url | optional | string |
value | options | string |
Processing state object schema
| Property | Required/Optional | Type |
|---|---|---|
enabled | required | boolean |
interstitial_text | optional | string |
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.