Hi,
I'm looking to figure out how to import an outbound message created by our automation into our custom channel for viewing in Front.
I currently have this api call:
await axios.post(
'https://api2.frontapp.com/inboxes/inb_xxx/imported_messages',
{
body_format: 'markdown',
body: 'test',
subject: `Test Chat with ${to.first_name} (${to.type === UserType.Owner ? 'Owner' : 'Renter'})`,
sender: {
name: 'Test Operator',
handle: 'test_operator',
},
to: e
`test_user_id:${to.id}`,
],
metadata: {
thread_ref: `support_chat_user_id:${to.id}`,
is_inbound: false,
should_skip_rules: false,
},
external_id: `test_message_id:1234`,
created_at: Date.now() / 1000,
type: 'custom',
},
{
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
Authorization: 'Bearer ' + frontappApiKey,
}
}
);
The problem is that the metadata.thread_ref
doesn't seem to be respected in Front.
The imported thread comes in as one conversation, and the existing conversations remains separate. I would expect this to be threaded in one conversation, since they both have the same metadata.thread_ref
.
Is there something else I need to specify to get the threading correct here?