Skip to main content

Recently Used

Recently Used keeps a lightweight history of items a user interacted with most recently (Tickets, Orders, Documents, Customers, …).
It powers quick navigation lists (e.g., “Recent items” in the UI), helps resume work-in-progress, and can be leveraged for personalized shortcuts.

Typical use cases:

  • Agent productivity — jump back to the last few tickets or customers you touched
  • Sales & success — reopen the last opportunities or accounts you viewed
  • DMS — quickly return to recently opened documents or folders
  • Portals — show a simple “last visited” list for end users

Note: Unlike other supporting entities, Recently Used is not owned by a business record via ownerType/ownerId.
It’s a per-user trail that references any entity by entityType and entityId.


Typical Flows

1) Record an item as “recently used”

Call this when a user opens, edits, downloads, or otherwise meaningfully interacts with a record.

@dms.recentlyUsed.create({
"userId": #auth.user.id,
"name": #ticket.key + " - " + #ticket.summary,
"entityType": "Ticket",
"entityId": #ticket.id,
"icon": "ticket",
"url": "/app/tickets/" + #ticket.id,
"data": {
"status": #ticket.status,
"priority": #ticket.priority
}
})

2) Record a DMS document open

@dms.recentlyUsed.create({
"userId": #auth.user.id,
"name": #doc.name,
"entityType": "Document",
"entityId": #doc.id,
"icon": "file",
"url": "/app/dms/documents/" + #doc.id,
"data": { "mimeType": #doc.mimeType }
})

3) List a user’s recent items (for a sidebar widget)

@dms.recentlyUsed.search({
"userId": #auth.user.id
})

Tip: If you want to maintain a fixed-length list (e.g., the latest 20), enforce pruning in your workflow/job or in the client-side logic calling the API.


Business & Governance

  • Per-user context — entries are scoped by userId; UI components should always filter by the current user.
  • Lightweight metadata — use name, icon, url for quick rendering; put optional attributes in data for flexible display (status, tags, type-specific hints).
  • Privacy — this is user-centric navigation data; avoid storing sensitive content in data.
  • Retention — set your own policy (e.g., keep last N items per user or items newer than 30 days).

Reference

Recently Used (attributes)

FieldTypeRequiredRead-onlyDescription / Notes
idUUIDUnique identifier (not intended for end-user display).
userIdUUIDYesUser to whom this recent entry belongs.
createdDateYes (default)Creation timestamp (defaults to now).
nameStringYesDisplay name shown in “recent items” lists.
entityIdStringIdentifier of the referenced record.
entityTypeStringYesType/class of the referenced record (e.g., Ticket, Order, Document, Customer).
dataAnyOptional extra metadata for rendering (status, labels, etc.).
iconStringUI icon identifier (optional).
urlStringDeep-link to open the entity in the UI.

Good Practices

  • Record on meaningful interactions (open, edit, upload, download) rather than every view, to keep noise low.
  • Use stable names and URLs so old entries remain navigable after minor UI changes.
  • Keep data small & non-sensitive; it should assist rendering, not replicate the full entity.
  • Prune regularly — e.g., keep only the last 20–50 items per user or remove items older than 60 days.

See Also

  • Attachment / Comment / Worklog / Log / Sharing — other supporting entities often used alongside recent items
  • Supporting Entities – Overview
  • SpEL Clients — configuration & usage