digitalfabrik / integreat-chat

MIT License
0 stars 0 forks source link

Add "to" attribute for Zammad issues #20

Closed svenseeberg closed 2 days ago

svenseeberg commented 2 months ago

Incoming messages in Zammad currently do not show the "Reply" button/link. I looked into the JSON objects of messages created via chat API vs normal issues. The only difference I could make out was a missing to attribute in the article object. We should there fore add this attribute, which should be the "integreat-chat" group.

charludo commented 1 month ago

Unfortunately I am not having any luck with this. From what I've found online, adding an email address to the group is also required, but even doing this + adding the "to" field does not show success.

svenseeberg commented 2 days ago

https://docs.zammad.org/en/latest/api/ticket/articles.html seems to contain relevant information. I'll have a look.

svenseeberg commented 2 days ago

The following request opens a ticket that has a reply button:

{
  "title": "Fooo",
  "group_id": "2",
  "customer_id": 18,
  "state_id": "1",
  "article": {
    "from": "test user",
    "to": "integreat-chat",
    "body": "Bar",
    "type_id": 11,
    "sender_id": 2,
    "form_id": "556ee556-b140-4b1e-8e83-2167722cb592",
    "content_type": "text/html"
  },
  "organization_id": "",
  "id": "c-10"
}