Skip to content

Commit 217abbb

Browse files
cathalgingclaude
andauthored
Add translations field to conversation_part and ticket_part (Preview) (#621)
* feat(preview): add translations field to conversation_part and ticket_part Model the new `translations` object on the Preview conversation_part and ticket_part schemas. It is a map keyed by locale code: the special `original` key holds the source locale code of the reply, and every other key is a locale code whose value is the reply text translated into that locale, e.g. { "original": "en", "en": "Hello", "fr": "Bonjour" }. This backs the new `conversation.admin.replied.translated` and `ticket.admin.replied.translated` webhook topics. The existing `body` field is unchanged and stays in the original source language. The field is Preview-only (descriptions/0), so it is gated by the Preview API version. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(preview): require original key and add translations to reply examples Declares `original` as required on the conversation_part and ticket_part translations schemas, since it is always present in the payload. Also adds translations to the existing admin-authored comment/reply examples (retrieveConversation, updateConversationPart) so the new field is demonstrated in inline responses. * fix(preview): add admin comment reply example with translations to replyTicket replyTicket only had note and quick_reply examples, neither a legitimate carrier of translations (note is internal-only, quick_reply here has no reply body text). Adds a customer-facing admin comment reply example, matching the ticket_reply schema's documented comment support. * fix(preview): translations values are HTML like body, not plain text Corrects every translations example (retrieveConversation, updateConversationPart, the new replyTicket comment example) and both schema-level example blocks to wrap translated text in the same HTML as body, per production payload shape. Also clarifies the schema description to state values are HTML matching body's format. * fix(preview): add translations to the ticket_reply response schema replyTicket's 200 response uses ticket_reply, not ticket_part, so the Admin reply example's translations field had no schema definition backing it. Adds the same translations property (required original, HTML values, ticket.admin.replied.translated topic) already present on conversation_part and ticket_part. --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 624f317 commit 217abbb

1 file changed

Lines changed: 96 additions & 0 deletions

File tree

descriptions/0/api.intercom.io.yaml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12188,6 +12188,10 @@ paths:
1218812188
name: Test tag
1218912189
event_details:
1219012190
app_package_code: null
12191+
translations:
12192+
original: en
12193+
en: <p>Okay!</p>
12194+
fr: "<p>D'accord!</p>"
1219112195
- type: conversation_part
1219212196
id: 2
1219312197
part_type: custom_action_started
@@ -12393,6 +12397,10 @@ paths:
1239312397
name: Test tag
1239412398
event_details:
1239512399
app_package_code: null
12400+
translations:
12401+
original: en
12402+
en: <p>Okay!</p>
12403+
fr: "<p>D'accord!</p>"
1239612404
- type: conversation_part
1239712405
id: 2
1239812406
part_type: custom_action_started
@@ -14157,6 +14165,10 @@ paths:
1415714165
attachments: []
1415814166
external_id:
1415914167
external_reply_send_state: sent
14168+
translations:
14169+
original: en
14170+
en: "<p>Hello there!</p>"
14171+
fr: "<p>Bonjour!</p>"
1416014172
Mark part as seen:
1416114173
value:
1416214174
type: conversation_part
@@ -14176,6 +14188,10 @@ paths:
1417614188
external_id:
1417714189
seen_state:
1417814190
admin_seen: true
14191+
translations:
14192+
original: en
14193+
en: "<p>Hello there!</p>"
14194+
fr: "<p>Bonjour!</p>"
1417914195
schema:
1418014196
"$ref": "#/components/schemas/conversation_part"
1418114197
'401':
@@ -22415,6 +22431,26 @@ paths:
2241522431
content:
2241622432
application/json:
2241722433
examples:
22434+
Admin reply:
22435+
value:
22436+
type: ticket_part
22437+
id: '155'
22438+
part_type: comment
22439+
body: "<p>Thanks for reaching out, we're looking into it!</p>"
22440+
created_at: 1734537880
22441+
updated_at: 1734537880
22442+
author:
22443+
id: '991267940'
22444+
type: admin
22445+
name: Ciaran418 Lee
22446+
email: admin418@email.com
22447+
attachments: []
22448+
redacted: false
22449+
app_package_code: test-integration
22450+
translations:
22451+
original: en
22452+
en: "<p>Thanks for reaching out, we're looking into it!</p>"
22453+
fr: "<p>Merci de nous avoir contactés, nous nous en occupons !</p>"
2241822454
Admin note reply:
2241922455
value:
2242022456
type: ticket_part
@@ -32093,6 +32129,26 @@ components:
3209332129
nullable: true
3209432130
example: "test-integration"
3209532131
description: The app package code if this part was created via API. null if the part was not created via API.
32132+
translations:
32133+
type: object
32134+
nullable: true
32135+
description: >-
32136+
A map of the reply text keyed by locale code. Only present on the
32137+
Preview API version and backs the `conversation.admin.replied.translated`
32138+
webhook topic. The special `original` key holds the source locale code
32139+
of the reply; every other key is a locale code whose value is the reply
32140+
text translated into that locale, as HTML in the same format as `body`.
32141+
The `body` field is unchanged and always
32142+
stays in the original source language. Available in the Preview API version
32143+
only (set `Intercom-Version: Preview`).
32144+
required:
32145+
- original
32146+
additionalProperties:
32147+
type: string
32148+
example:
32149+
original: en
32150+
en: <p>Hello</p>
32151+
fr: <p>Bonjour</p>
3209632152
conversation_part_author:
3209732153
title: Conversation part author
3209832154
type: object
@@ -39718,6 +39774,26 @@ components:
3971839774
nullable: false
3971939775
example: text-integration
3972039776
description: The app package code if this part was created via API. Note this field won't show if the part was not created via API.
39777+
translations:
39778+
type: object
39779+
nullable: true
39780+
description: >-
39781+
A map of the reply text keyed by locale code. Only present on the
39782+
Preview API version and backs the `ticket.admin.replied.translated`
39783+
webhook topic. The special `original` key holds the source locale code
39784+
of the reply; every other key is a locale code whose value is the reply
39785+
text translated into that locale, as HTML in the same format as `body`.
39786+
The `body` field is unchanged and always
39787+
stays in the original source language. Available in the Preview API version
39788+
only (set `Intercom-Version: Preview`).
39789+
required:
39790+
- original
39791+
additionalProperties:
39792+
type: string
39793+
example:
39794+
original: en
39795+
en: <p>Hello</p>
39796+
fr: <p>Bonjour</p>
3972139797
updated_attribute_data:
3972239798
title: Updated Attribute
3972339799
type: object
@@ -39887,6 +39963,26 @@ components:
3988739963
type: boolean
3988839964
description: Whether or not the ticket part has been redacted.
3988939965
example: false
39966+
translations:
39967+
type: object
39968+
nullable: true
39969+
description: >-
39970+
A map of the reply text keyed by locale code. Only present on the
39971+
Preview API version and backs the `ticket.admin.replied.translated`
39972+
webhook topic. The special `original` key holds the source locale code
39973+
of the reply; every other key is a locale code whose value is the reply
39974+
text translated into that locale, as HTML in the same format as `body`.
39975+
The `body` field is unchanged and always
39976+
stays in the original source language. Available in the Preview API version
39977+
only (set `Intercom-Version: Preview`).
39978+
required:
39979+
- original
39980+
additionalProperties:
39981+
type: string
39982+
example:
39983+
original: en
39984+
en: <p>Hello</p>
39985+
fr: <p>Bonjour</p>
3989039986
ticket_request_custom_attributes:
3989139987
title: Ticket Attributes
3989239988
type: object

0 commit comments

Comments
 (0)