GraphQLRepositoriestextMessage
entities.textMessage
Read text message records with the textMessage repository, and change them with the text message mutations. Same records as the REST TextMessages entity.
Queries
Fields of entities { textMessage { … } }.
| Kind | Field | Returns |
|---|---|---|
| QUERY | getById(entityId: ID!)Returns the record with the given id, or null when there is none. Deleted records are returned as well. | TextMessageEntity |
| QUERY | getByIds(entityIds: [ID!]!)Returns the records with the given ids; ids without a record are left out. Deleted records are returned as well. | [TextMessageEntity!]! |
| QUERY | getAll(limit: Int, offset: Int, filter: TextMessageFilterInput, orderBy: [TextMessageOrderByInput!], includeDeleted: Boolean)Returns the records that match the filter, paged with limit and offset. | [TextMessageEntity!]! |
| QUERY | getByCriteria(filter: TextMessageFilterInput, orderBy: [TextMessageOrderByInput!], includeDeleted: Boolean, before: String, after: String, first: Int, last: Int)Returns the records that match the filter as a cursor-paginated connection. | TextMessageEntityConnection |
| QUERY | getChangedFieldsSinceRevision(id: UUID!, revision: Int!)Returns the ids of the fields of a record that changed after the given revision. Returns an empty list for entities without change tracking. | [UUID!]! |
Mutations
| Kind | Mutation | Does | Returns |
|---|---|---|---|
| MUTATION | createTextMessage(input: CreateTextMessageInput!, validationLevel: [ValidationLevel!]) | Create one record | CreateTextMessagePayload |
| MUTATION | updateTextMessage(input: UpdateTextMessageInput!, validationLevel: [ValidationLevel!], sessionIdToUpdate: String) | Update fields | UpdateTextMessagePayload |
Types
The types this repository uses, each with its fields and their descriptions. Types several repositories share, such as PageInfo and the filter fields, are in the types index.
TextMessageEntityConnection object pageInfo: PageInfo!, edges: [TextMessageEntityEdge]!, totalCount: Int
Paginated list of TextMessage records.
| Field | Type | Description |
|---|---|---|
pageInfo | PageInfo! | Pagination data for this connection. |
edges | [TextMessageEntityEdge]! | Contains the nodes in this connection. |
totalCount | Int | Total number of items in the connection. |
TextMessageEntityEdge object node: TextMessageEntity, cursor: String!
A Relay edge containing a TextMessageEntity and its cursor.
| Field | Type | Description |
|---|---|---|
node | TextMessageEntity | The item at the end of the edge |
cursor | String! | A cursor for use in pagination |
TextMessageFilterInput input AND, OR, NOT, globalSearchQuery, one condition per field
Filter conditions for TextMessage records. Conditions on different fields are combined with AND; use OR, AND and NOT for other combinations.
| Input field | Type | Description |
|---|---|---|
OR | [TextMessageFilterInput!] | Matches records that meet at least one of the listed filters. |
AND | [TextMessageFilterInput!] | Matches records that meet all of the listed filters. |
NOT | TextMessageFilterInput | Matches records that do not meet this filter. |
globalSearchQuery | String | Search term matched against the fields that the global search covers for this entity. |
id | EntityFilterStringField | Unique identifier of entity. |
isDeleted | Boolean | Specifies if the entity is considered deleted. |
modified | EntityFilterDateTimeField | Last modification time. |
created | EntityFilterDateTimeField | Creation time. |
chatConversationId | EntityFilterStringField | Id of the AI assistant chat conversation this message belongs to, when applicable. |
content | EntityFilterStringField | Body of the message. May be plain text or a JSON payload (e.g. AI assistant examples / suggestions). |
datetimeSent | EntityFilterDateTimeField | Timestamp the message was sent. |
direction | EmailDirectionEnumFilterInput | Direction of the message (Incoming, Outgoing). |
messageSid | EntityFilterStringField | External message identifier from the SMS provider (e.g. Twilio Message SID). |
status | TextMessageStatusEnumFilterInput | Delivery status of the message: Sending, Sent, Seen or Failed for outgoing messages, Received for incoming ones. |
textMessageConversationId | EntityFilterStringField | Id of the text message conversation this message belongs to, or empty for AI assistant chat messages. |
revision | EntityFilterNumberField | Revision when entity was lastly changed. |
chatConversation | ChatConversationFilterInput | AI assistant chat conversation this message belongs to, when applicable. Matches records where a related record meets these conditions. |
textMessageConversation | TextMessageConversationFilterInput | Conversation this message belongs to. Empty for messages produced by AI chat that do not belong to a thread of customer conversation. Matches records where a related record meets these conditions. |
attachments | CloudObjectRelationFilterInput | Files attached to the message (e.g. MMS attachments). Matches records where a related record meets these conditions. |
TextMessageOrderByInput input Asc or Desc per field
Sorting of TextMessage records. Set exactly one field in each item; list several items to sort by more fields, in order of priority.
| Input field | Type | Description |
|---|---|---|
id | OrderByEnum | Unique identifier of entity. |
isDeleted | OrderByEnum | Specifies if the entity is considered deleted. |
modified | OrderByEnum | Last modification time. |
created | OrderByEnum | Creation time. |
chatConversation | [ChatConversationOrderByNestedInput!] | AI assistant chat conversation this message belongs to, when applicable. Sorts by fields of the related record, listed in order of priority. |
textMessageConversation | [TextMessageConversationOrderByNestedInput!] | Conversation this message belongs to. Empty for messages produced by AI chat that do not belong to a thread of customer conversation. Sorts by fields of the related record, listed in order of priority. |
chatConversationId | OrderByEnum | Id of the AI assistant chat conversation this message belongs to, when applicable. |
content | OrderByEnum | Body of the message. May be plain text or a JSON payload (e.g. AI assistant examples / suggestions). |
datetimeSent | OrderByEnum | Timestamp the message was sent. |
direction | OrderByEnum | Direction of the message (Incoming, Outgoing). |
messageSid | OrderByEnum | External message identifier from the SMS provider (e.g. Twilio Message SID). |
status | OrderByEnum | Delivery status of the message: Sending, Sent, Seen or Failed for outgoing messages, Received for incoming ones. |
textMessageConversationId | OrderByEnum | Id of the text message conversation this message belongs to, or empty for AI assistant chat messages. |
revision | OrderByEnum | Revision when entity was lastly changed. |
TextMessageStatusEnumFilterInput input eq: [TextMessageStatusEnum!], NOT: TextMessageStatusEnumFilterInput
Conditions on an enumeration field. Several conditions given together must all match.
| Input field | Type | Description |
|---|---|---|
eq | [TextMessageStatusEnum!] | Matches any of the listed values. |
NOT | TextMessageStatusEnumFilterInput | Matches values that do not meet this condition. |
ChatConversationOrderByNestedInput input 6 fields: id, isDeleted, modified, …
Sorting by a field of the related ChatConversation record. Set exactly one field in each item.
| Input field | Type | Description |
|---|---|---|
id | OrderByEnum | Unique identifier of entity. |
isDeleted | OrderByEnum | Specifies if the entity is considered deleted. |
modified | OrderByEnum | Last modification time. |
created | OrderByEnum | Creation time. |
ownerId | OrderByEnum | Id of the owning user. |
type | OrderByEnum | Kind of AI chat: a general conversation with the AI assistant, or one about a specific record identified by context. |
CreateTextMessageInput input 13 fields: clientMutationId, modified, created, …
Field values of a new TextMessage record.
| Input field | Type | Description |
|---|---|---|
clientMutationId | String | Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention). |
modified | DateTime | Last modification time. |
created | DateTime | Creation time. |
chatConversationId | ID | Id of the AI assistant chat conversation this message belongs to, when applicable. |
content | String! | Body of the message. May be plain text or a JSON payload (e.g. AI assistant examples / suggestions). |
datetimeSent | DateTime | Timestamp the message was sent. |
direction | EmailDirectionEnum! | Direction of the message (Incoming, Outgoing). |
messageSid | String | External message identifier from the SMS provider (e.g. Twilio Message SID). |
score | Int | Quality score given to the message by the user (e.g. for AI-suggested replies). Used to feed back into the suggestion engine. |
status | TextMessageStatusEnum | Delivery status of the message: Sending, Sent, Seen or Failed for outgoing messages, Received for incoming ones. |
textMessageConversationId | ID | Id of the text message conversation this message belongs to, or empty for AI assistant chat messages. |
revision | Int | Revision when entity was lastly changed. |
attachments | [CreateCloudObjectRelationNoBackrefInput!] | Files attached to the message (e.g. MMS attachments). |
UpdateTextMessageInput input 14 fields: clientMutationId, id, modified, …
Id of a TextMessage record and the field values to change.
| Input field | Type | Description |
|---|---|---|
clientMutationId | String | Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention). |
id | ID! | Unique identifier of entity. |
modified | DateTime | Last modification time. |
created | DateTime | Creation time. |
chatConversationId | ID | Id of the AI assistant chat conversation this message belongs to, when applicable. |
content | String | Body of the message. May be plain text or a JSON payload (e.g. AI assistant examples / suggestions). |
datetimeSent | DateTime | Timestamp the message was sent. |
direction | EmailDirectionEnum | Direction of the message (Incoming, Outgoing). |
messageSid | String | External message identifier from the SMS provider (e.g. Twilio Message SID). |
score | Int | Quality score given to the message by the user (e.g. for AI-suggested replies). Used to feed back into the suggestion engine. |
status | TextMessageStatusEnum | Delivery status of the message: Sending, Sent, Seen or Failed for outgoing messages, Received for incoming ones. |
textMessageConversationId | ID | Id of the text message conversation this message belongs to, or empty for AI assistant chat messages. |
revision | Int | Revision when entity was lastly changed. |
attachments | [CreateCloudObjectRelationNoBackrefInput!] | Files attached to the message (e.g. MMS attachments). |
CreateTextMessagePayload object textMessage: TextMessageEntity, clientMutationId: String
Result of the createTextMessage mutation.
| Field | Type | Description |
|---|---|---|
textMessage | TextMessageEntity | The created record. |
clientMutationId | String | Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention). |
UpdateTextMessagePayload object textMessage: TextMessageEntity, clientMutationId: String
Result of the updateTextMessage mutation.
| Field | Type | Description |
|---|---|---|
textMessage | TextMessageEntity | The updated record. |
clientMutationId | String | Optional client-supplied identifier passed on a mutation input and echoed back unchanged on its payload, so a client can correlate the response with its request (Relay convention). |
TextMessageStatusEnum enum Sending, Sent, Failed, Received, Seen
Delivery status of a text, WhatsApp or chat message.
| Value | Description |
|---|---|
Sending | Outgoing message is queued or being sent. |
Sent | Message was sent. |
Failed | Message could not be sent. |
Received | Message was received from the other party. |
Seen | The recipient has seen the sent message. |