# TMF621 v5 Resource Mappings

Before using the TMF621 v5 resource mappings, refer to the following.

## Constraints and Limitations

- Define Picklist values for `CaseTroubleTicket.Severity` and the fields `TicketType`, `Status`, `Priority`, \`Origin in Case entity.
  The values passed for these attributes in post payload must be present in the system. These are not validated.
- Enable FLS read/edit for all the Case fields mentioned in the TroubleTicket resorce table for the User Profile.
- These OrgPerms are required.
  - CommsCloud
  - Cases
- The field `CaseNumber` is the unique identifier.
- Add pick list values for the `severity` field of CaseTroubleTicket object.

## TroubleTicket

| TMF Field<div style="width:120px"></div>                | Field Type<div style="width:120px"></div> | TMF Definition<div style="width:120px"></div>                                                                                                                                                                               | Is Mandatory as per TMForum?<div style="width:120px"></div> | Is Supported?<div style="width:120px"></div> | Supported Methods<div style="width:120px"></div> | Salesforce Object<div style="width:120px"></div> | Salesforce Mapping<div style="width:120px"></div> | Salesforce Description                                                                                       | Prerequisites<div style="width:120px"></div>                        |
| ------------------------------------------------------- | ----------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- | -------------------------------------------- | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------- |
| id                                                      | String                                    | A string. Unique identifier of the trouble ticket.                                                                                                                                                                          | No                                                          | Yes                                          | GET                                              | Case                                             | Case.CaseNumber                                   | Unique Identifier for case                                                                                   | NA                                                                  |
| href                                                    | String                                    | A string. Hyperlink, a reference to the trouble ticket entity.                                                                                                                                                              | No                                                          | Yes                                          | GET                                              |                                                  | TMF Case URL + Case.CaseNumber                    | Specifies a unique referance of case                                                                         | NA                                                                  |
| description                                             | String                                    | A string. Description of the trouble or issue.                                                                                                                                                                              | Yes                                                         | Yes                                          | GET, POST                                        | Case                                             | Case.Description                                  | Text area containing case description                                                                        | NA                                                                  |
| severity                                                | String                                    | The severity of the issue. Indicate the implication of the issue on the expected functionality e.g. of a system, application, service etc..<br>Severity values can be for example : Critical, Major, Minor                  | Yes                                                         | Yes                                          | GET, POST                                        |                                                  | CaseTroubleTicket.severity                        | Custom Picklist value specifiing case severity. Values like Critical, Major, Minor can be added to severity. | The severity value should be present as Picklist value in the Org   |
| ticketType                                              | String                                    | A string. represent a business type of the trouble ticket.                                                                                                                                                                  | Yes                                                         | Yes                                          | GET, POST                                        | Case                                             | Case.Type                                         | Specifies the Business Type of the case                                                                      | The ticketType value should be present as Picklist value in the Org |
| [Attachment](#attachment)                               | Object                                    | A list of attachment ref or values (AttachmentRefOrValue [*]). File(s) attached to the trouble ticket. e.g. pictur of broken device, scaning of a bill or charge.                                                           | No                                                          | Yes                                          | GET, POST                                        | ContentDocument                                  | ContentDocument                                   | Attachment(s) associated with the case                                                                       | NA                                                                  |
| [Channel](#channel)                                     | Object                                    | A channel reference (ChannelRef). The channel that origin the trouble ticket.                                                                                                                                               | No                                                          | Yes                                          | GET, POST                                        | Case                                             | Case.Origin                                       | Specifies Case Origin                                                                                        | The Channel value should be present as Picklist in the Org          |
| creationDate                                            | String                                    | A date time (DateTime). The date on which the trouble ticket was created.                                                                                                                                                   | No                                                          | Yes                                          | GET                                              | Case                                             | Case.CreatedDate                                  | Case created Date                                                                                            | NA                                                                  |
| lastUpdate                                              | String                                    | A date time (DateTime). The date and time that the trouble ticked was last updated.                                                                                                                                         | No                                                          | Yes                                          | GET                                              | Case                                             | Case.LastModifiedDate                             | Case Last Modified Date                                                                                      | NA                                                                  |
| [Note](#note)                                           | Object                                    | A list of notes (Note [*]). The note(s) that are associated to the ticket.                                                                                                                                                  | No                                                          | Yes                                          | GET, POST                                        | CaseComment                                      | CaseComment                                       | Comment(s) associated with the case                                                                          | NA                                                                  |
| priority                                                | String                                    | A string. The priority of the trouble ticket and how quickly the issue should be resolved. Example: Critical, High, Medium, Low. The value is set by the ticket management system considering the severity, ticket type etc | No                                                          | Yes                                          | GET, POST                                        | Case                                             | Case.Priority                                     | Specifies Priority of Case                                                                                   | The Priority value should be present as Picklist in the Org         |
| [RelatedEntity](#relatedentity)                         | Object                                    | A list of related entities (RelatedEntity [*]). An entity that is related to the ticket such as a bill, a product, etc. The entity against which the ticket is associated.                                                  | No                                                          | Yes                                          | GET, POST                                        | Asset                                            | Asset                                             | Asset related to the case                                                                                    | An existing Asset to be used                                        |
| [RelatedParty](#relatedparty)                           | Object                                    | A list of related parties (RelatedParty [*]). The related party(ies) that are associated to the ticket.                                                                                                                     | No                                                          | Yes                                          | GET, POST                                        | Account / Contact                                | Account / Contact                                 | Acount or Contact related to the Case                                                                        | An existing Account / Contact to be used                            |
| resolutionDate                                          | String                                    | A date time (DateTime). The date and time the trouble ticket was resolved.                                                                                                                                                  | No                                                          | Yes                                          | GET                                              | Case                                             | Case.ClosedDate                                   | Case Resolution Date                                                                                         | NA                                                                  |
| status                                                  | String                                    | A trouble ticket status type (TroubleTicketStatusType). The current status of the trouble ticket.                                                                                                                           | No                                                          | Yes                                          | GET, POST                                        | Case                                             | Case.Status                                       | The current status of case                                                                                   | The Status value should be present as Picklist in the Org           |
| statusChange                                            | Object                                    | A list of status changes (StatusChange [*]). The status change history that are associated to the ticket.Populated by the server.                                                                                           | No                                                          | Yes                                          | GET                                              | Case History                                     | Case History                                      | A List of status the case assumed till date                                                                  | NA                                                                  |
| statusChangeDate                                        | String                                    | A date time (DateTime). The date and time the status changed.                                                                                                                                                               | No                                                          | Yes                                          | GET                                              | Case History                                     | Case History                                      | Latest case status change date                                                                               | NA                                                                  |
| [TroubleTicketRelationship](#troubleticketrelationship) | Object                                    | A list of trouble ticket relationships (TroubleTicketRelationship [*]). A list of trouble ticket relationships (TroubleTicketRelationship [*]). Represents a relationship<br>between trouble tickets.                       | No                                                          | Yes                                          | GET, POST                                        | Case                                             | Case.parentId                                     | Specifies related Parent Case                                                                                | An Existing Case can be used for Parent relation                    |
| name                                                    | String                                    | A string. Name of the trouble ticket, typically a short description provided by the user that create the ticket.                                                                                                            | No                                                          | Yes                                          | GET, POST                                        | Case                                             | Case.Subject                                      | Name of the case                                                                                             | NA                                                                  |
| [ExternalIdentifier](#externalidentifier)               | Object                                    | A string. Additional identifier coming from an external system.                                                                                                                                                             | No                                                          | Yes                                          |                                                  | CaseTroubleTicket                                | CaseTroubleTicket.externalId                      | NA                                                                                                           | NA                                                                  |
| expectedResolutionDate                                  | String                                    | A date time (DateTime). The expected resolution date determined by the trouble ticket system.                                                                                                                               | No                                                          | Yes                                          | GET, POST                                        | CaseTroubleTicket                                | CaseTroubleTicket.expectedResolutionDate          | NA                                                                                                           | NA                                                                  |
| @type                                                   | String                                    | NA                                                                                                                                                                                                                          | Yes                                                         | Yes                                          |                                                  | NA                                               |                                                   | NA                                                                                                           | NA                                                                  |
| requestedResolutionDate                                 | String                                    | A date time (DateTime). The resolution date requested by the user.                                                                                                                                                          | No                                                          | Yes                                          | GET, POST                                        | CaseTroubleTicket                                | CaseTroubleTicket.RequestedResolutionDate         | NA                                                                                                           | NA                                                                  |
| [StatusChangeHistory](#statuschangehistory)             | String                                    | A string. The reason for changing the status.                                                                                                                                                                               | No                                                          | Yes                                          | NA                                               | Case History                                     | Case History                                      | NA                                                                                                           | NA                                                                  |

## Sub-resources

### ExternalIdentifier

| TMF Field Name<div style="width:120px"></div> | Is Mandatory as per TMForum?<div style="width:120px"></div> | TMF Description<div style="width:120px"></div>                 | Supported POST<div style="width:120px"></div> | Supported GET<div style="width:120px"></div> | Salesforce Field Name<div style="width:120px"></div> | Salesforce Description<div style="width:120px"></div>                                                       |
| --------------------------------------------- | ----------------------------------------------------------- | -------------------------------------------------------------- | --------------------------------------------- | -------------------------------------------- | ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| @type                                         | Yes                                                         | When sub-classing, this defines the sub-class Extensible name. | No                                            | Yes                                          | NA                                                   | NA                                                                                                          |
| id                                            | Yes                                                         | Identification of the entity within the external system.       | Yes                                           | Yes                                          | CaseTroubleTicket.ExternalId                         | Represents an identifier of the external system, if this ticket is not originating from the current system. |

### Channel

| TMF Field Name<div style="width:120px"></div> | Is Mandatory as per TMForum?<div style="width:120px"></div> | TMF Description<div style="width:120px"></div> | Supported POST<div style="width:120px"></div> | Supported GET<div style="width:120px"></div> | Salesforce Field Name<div style="width:120px"></div> | Salesforce Description<div style="width:120px"></div>                 |
| --------------------------------------------- | ----------------------------------------------------------- | ---------------------------------------------- | --------------------------------------------- | -------------------------------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
| @type                                         | Yes                                                         | Type of the channel                            | No                                            | Yes                                          | NA                                                   | Describes the relation to this entity. Only value supported is Parent |
| id                                            | Yes                                                         | identifier of the channel.                     | Yes                                           | Yes                                          | Refer comments                                       | Unique identifier of the Case                                         |
| name                                          | No                                                          | Name of the channel                            | Yes                                           | Yes                                          | Case.Origin                                          | NA                                                                    |

### TroubleTicketRelationship

| TMF Field Name<div style="width:120px"></div> | Is Mandatory as per TMForum?<div style="width:120px"></div> | TMF Description<div style="width:120px"></div> | Supported POST<div style="width:120px"></div> | Supported GET<div style="width:120px"></div> | Salesforce Field Name<div style="width:120px"></div> | Salesforce Description<div style="width:120px"></div>                 |
| --------------------------------------------- | ----------------------------------------------------------- | ---------------------------------------------- | --------------------------------------------- | -------------------------------------------- | ---------------------------------------------------- | --------------------------------------------------------------------- |
| relationshipType                              | No                                                          | Type of the Trouble Ticket relationship.       | No                                            | Yes                                          | NA                                                   | Describes the relation to this entity. Only value supported is Parent |
| id                                            | Yes                                                         | Unique identifier of the Trouble Ticket.       | Yes                                           | Yes                                          | Case.CaseNumber                                      | Unique identifier of the Case                                         |
| name                                          | No                                                          | Name of the Trouble Ticket                     | No                                            | Yes                                          | NA                                                   | NA                                                                    |

### RelatedParty

| TMF Field Name<div style="width:120px"></div> | Is Mandatory as per TMForum?<div style="width:120px"></div> | TMF Description<div style="width:120px"></div>                           | Supported POST<div style="width:120px"></div> | Supported GET<div style="width:120px"></div> | Salesforce Field Name<div style="width:120px"></div> | Salesforce Description<div style="width:120px"></div> |
| --------------------------------------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------ | --------------------------------------------- | -------------------------------------------- | ---------------------------------------------------- | ----------------------------------------------------- |
| partyOrPartyRole.@referredType                | No                                                          | The actual type of the target instance when needed for disambiguation    | Yes                                           | Yes                                          | NA                                                   | NA                                                    |
| partyOrPartyRole.@type                        | Yes                                                         | A String. When sub-classing, this defines the sub-class Extensible name. | Yes                                           | Yes                                          | NA                                                   | NA                                                    |
| partyOrPartyRole.id                           | Yes                                                         | Unique identifier of a related entity                                    | Yes                                           | Yes                                          | Account.Id or Contact.Id                             | Unique identification of Account or Contact           |
| partyOrPartyRole.name                         | No                                                          | Name of the related entity                                               | Yes                                           | Yes                                          | Account.Name or Contact.Name                         | Name of Account or Contact                            |
| role                                          | Yes                                                         | Role played by the related party                                         | Yes                                           | Yes                                          | NA                                                   | NA                                                    |
| @type                                         | Yes                                                         | Defines for which resource result need to be mappid to                   | No                                            | Yes                                          | NA                                                   | NA                                                    |
| partyOrPartyRole.href                         | No                                                          | Reference of the related entity                                          | No                                            | Yes                                          | NA                                                   | NA                                                    |

**NOTE:**

- Field partyOrPartyRole.id is mandatory (if this subresource is used in POST method).
- Only field `id` is validated.
- Field `href` if passsed must be consistent with `id` and `@referredType` or `@type`.
- Field `role` has to be Account.Type or the String `Contact`.

### RelatedEntity

| TMF Field Name<div style="width:120px"></div> | Is Mandatory as per TMForum?<div style="width:120px"></div> | TMF Description<div style="width:120px"></div>                           | Supported POST<div style="width:120px"></div> | Supported GET<div style="width:120px"></div> | Salesforce Field Name<div style="width:120px"></div> | Salesforce Description<div style="width:120px"></div>   |
| --------------------------------------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------ | --------------------------------------------- | -------------------------------------------- | ---------------------------------------------------- | ------------------------------------------------------- |
| entity.@referredType                          | Yes                                                         | The actual type of the target instance when needed for disambiguation    | Yes                                           | Yes                                          | NA                                                   | Specifies if the RelatedEntity is Asset or Disputedbill |
| entity.id                                     | Yes                                                         | Unique identifier of a related entity                                    | Yes                                           | Yes                                          | Asset.Id                                             | Unique idenfication of an Asset                         |
| entity.name                                   | No                                                          | Name of the related entity                                               | Yes                                           | Yes                                          | Asset.Name                                           | Name of Product or Asset                                |
| role                                          | Yes                                                         | The role of an entity                                                    | No                                            | Yes                                          | NA                                                   | NA                                                      |
| entity.href                                   | No                                                          | Reference of the related entity                                          | No                                            | Yes                                          | NA                                                   | NA                                                      |
| @type                                         | Yes                                                         | A String. When sub-classing, this defines the sub-class Extensible name. | Yes                                           | Yes                                          | NA                                                   | NA                                                      |
| entity.@type                                  | Yes                                                         | A String. When sub-classing, this defines the sub-class Extensible name. | Yes                                           | Yes                                          | NA                                                   | NA                                                      |

**NOTE:**

- Field `id` is mandatory.
- Payload can have multiple assets but single asset is considered.

### Note

This is mapped to Salesforce entity: CaseComment.

| TMF Field Name<div style="width:120px"></div> | Is Mandatory as per TMForum?<div style="width:120px"></div> | TMF Description<div style="width:120px"></div>         | Supported POST<div style="width:120px"></div> | Supported GET<div style="width:120px"></div> | Salesforce Mapping<div style="width:120px"></div> | Salesforce Description<div style="width:120px"></div> |
| --------------------------------------------- | ----------------------------------------------------------- | ------------------------------------------------------ | --------------------------------------------- | -------------------------------------------- | ------------------------------------------------- | ----------------------------------------------------- |
| author                                        | No                                                          | Author of the note                                     | No                                            | Yes                                          | CreatedById                                       | Author of the CaseComment                             |
| date                                          | No                                                          | Date of the note                                       | No                                            | Yes                                          | CreatedDate                                       | Comment created Date                                  |
| id                                            | No                                                          | Identifier of the note within its containing entity    | No                                            | Yes                                          | ID                                                | Unique identification of CaseComment                  |
| text                                          | Yes                                                         | Text of the note                                       | Yes                                           | Yes                                          | CommentBody                                       | Content of the comment                                |
| @type                                         | No                                                          | Defines for which resource result need to be mappid to | Yes                                           | Yes                                          | NA                                                | NA                                                    |

### Attachment

| TMF Field Name<div style="width:120px"></div> | Is Mandatory as per TMForum?<div style="width:120px"></div> | TMF Description<div style="width:120px"></div>                                         | Supported POST<div style="width:120px"></div> | Supported GET<div style="width:120px"></div> | Salesforce Mapping<br>(ContentVersion)<div style="width:120px"></div> | Salesforce Description<div style="width:120px"></div> |
| --------------------------------------------- | ----------------------------------------------------------- | -------------------------------------------------------------------------------------- | --------------------------------------------- | -------------------------------------------- | --------------------------------------------------------------------- | ----------------------------------------------------- |
| id                                            | Yes                                                         | A string. Unique identifier for this particular attachment.                            | No                                            | Yes                                          | Id                                                                    | Unique identifier for Content Version                 |
| url                                           | No                                                          | A string. Uniform Resource Locator, is a web page address (a subset of URI).           | Yes                                           | Yes                                          | ContentUrl                                                            | Url of the content                                    |
| name                                          | No                                                          | A string. The name of the attachment.                                                  | Yes                                           | Yes                                          | Title                                                                 | Title of the Content Version                          |
| attachmentType                                | Yes                                                         | A string. Attachment type such as video, picture.                                      | No                                            | Yes                                          | FileType                                                              | FileType for the content uploaded                     |
| @type                                         | Yes                                                         | A string. The actual type of the target instance when needed for disambiguation.       | No                                            | Yes                                          | NA                                                                    | NA                                                    |
| description                                   | No                                                          | A string. A narrative text describing the content of the attachment.                   | Yes                                           | Yes                                          | description                                                           | Description of the Content Version                    |
| mimeType                                      | Yes                                                         | A string. Attachment mime type such as extension file for video, picture and document. | No                                            | Yes                                          | PathOnClient                                                          | mime Type                                             |

**NOTE:**

- Any values sent for attributes `id`, `attachmentType`, `mimeType`, and `@type` in POST payload are ignored. They are automatically generated by POST method and are present in the GET method as well.
- ContentDocumentLink holds the link between the Case and ContentVersion/ContentDocument. ContentDocument is created along with the ContentVersion. Fetch the ContentDocumentId and insert a ContentDocumentLink.

### StatusChangeHistory

This is mapped to Salesforce entity: CaseHistory.

| TMF Field Name<div style="width:120px"></div> | Is Mandatory as per TMForum?<div style="width:120px"></div> | TMF Description<div style="width:120px"></div>              | Supported POST<div style="width:120px"></div> | Supported GET<div style="width:120px"></div> | Salesforce Mapping<div style="width:120px"></div> | Salesforce Description<div style="width:120px"></div>       |
| --------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------- | --------------------------------------------- | -------------------------------------------- | ------------------------------------------------- | ----------------------------------------------------------- |
| status                                        | No                                                          | Status of the troubleticket                                 | No                                            | Yes                                          | CaseHistory.NewValue                              | status of the troubleticket                                 |
| statusChangeDate                              | No                                                          | Date when the status changed from previous to current value | No                                            | Yes                                          | CaseHistory.CreatedDate                           | Date when the status changed from previous to current value |
| statusChangeReason                            | No                                                          | Reason for change in the status                             | No                                            | No                                           | NA                                                | NA                                                          |
| @type                                         | No                                                          | NA                                                          | No                                            | Yes                                          | NA                                                | NA                                                          |
