Sharing
Sharing defines who can see or edit a record in tSM (Tickets, Orders, Documents, etc.).
It lets you grant access to people, groups, or roles, mark a record as public, and capture the purpose of sharing (owner, collaborator, reviewer, …).
Typical use cases:
- Collaboration — invite a teammate or group to co-work on a ticket or order
- Stakeholder access — give read-only visibility to Account or Compliance
- Publishing — expose a document or FAQ to all portal users (
isPublic) - DMS/Knowledge — maintain ACLs on files, folders, and knowledge items
Related concepts (covered in the overview): supporting entities link to a parent via
ownerTypeandownerId.
Sharing entries further reference a participant viarefType/refIdand classify the intent withsharingTypeCode.
Typical Flows
1) Make a record public (no specific participant)
@dms.sharing.create({
"ownerType": "Document",
"ownerId": #document.id,
"isPublic": true,
"sharingTypeCode": "Public",
"description": "Published for all portal users"
})
2) Add a collaborator (user)
@dms.sharing.create({
"ownerType": "Ticket",
"ownerId": #ticket.id,
"refType": "User",
"refId": #assignee.id,
"sharingTypeCode": "Collaborator",
"isPublic": false,
"description": "Primary engineer"
})
3) Grant a group read-only visibility
@dms.sharing.create({
"ownerType": "Order",
"ownerId": #order.id,
"refType": "Group",
"refId": "ACCOUNTING",
"sharingTypeCode": "Viewer",
"isPublic": false,
"description": "Accounting visibility for invoicing"
})
4) List all sharing entries for a record
@dms.sharing.search({
"ownerType": "Ticket",
"ownerId": #ticket.id
})
Business & Governance
- Who vs. Why —
refType/refIdidentify who gets access (user, group, role, external party), whilesharingTypeCodecaptures why (owner, collaborator, reviewer, viewer). - Public vs. targeted — set
isPublic = trueto publish broadly (e.g., customer portal). Otherwise, specify arefType/refIdparticipant. - Least privilege — prefer narrow
sharingTypeCodesemantics (e.g.,Viewervs.Collaborator) and align them with role-based permissions. - Auditability — all sharing records carry audit info; use
descriptionfor justification to support reviews. - DMS alignment — use sharing to drive ACLs consistently across Tickets, Orders, and DMS items (documents/folders).
Reference
Sharing (attributes)
| Field | Type | Required | Read-only | Description / Notes |
|---|---|---|---|---|
id | UUID | – | – | Unique identifier (not intended for end-user display). |
ownerType | String | Yes | – | The record being shared (e.g., Ticket, Order, Document). |
ownerId | String | Yes | – | ID of the record being shared. |
refType | String | Yes* | – | Participant type (e.g., User, Group, Role, External). Required unless isPublic = true. |
refId | String | – | – | Participant identifier (user ID, group code, role name, …). Optional for public shares. |
sharingTypeCode | String | Yes | – | Purpose/role of the share (e.g., Owner, Collaborator, Viewer, Public). |
description | String | – | – | Business rationale/context; useful for audits. |
isPublic | Bool | Yes | – | true to make the owner entity visible to everyone (target audience defined by portal/tenant policy). |
auditInfo | Object |