Article gets created in wrong Channel

  • Used Zammad version: 3.1.x
  • Used Zammad installation source: -
  • Operating system: multiple (Windows 10 / macOS Mojave)
  • Browser + version: Google Chrome 76.0.3809.132

Expected behavior:

When creating a ticket with articles via http-request (POST “…/api/v1/tickets”) the articles should be in channel email. Also there should be a reply button under the article.

Actual behavior:

All articles created are in channel note and don’t have a reply button.

Steps to reproduce the behavior:

Send following json-body via POST to “…/api/v1/tickets”:
(Copied from a solution addressing the same issue)

    {
    "group_id": 1,
    "priority_id": 3,
    "state_id": 2,
    "organization_id": 2,
    "title": "API-Test that works anyway",
    "owner_id": 3,
    "customer_id": 6,
    "note": null,
    "first_response_at": null,
    "first_response_escalation_at": "2019-01-31T10:50:28.000Z",
    "first_response_in_min": null,
    "first_response_diff_in_min": null,
    "close_at": null,
    "close_escalation_at": "2019-02-06T10:50:28.000Z",
    "close_in_min": null,
    "close_diff_in_min": null,
    "update_escalation_at": "2019-02-01T11:20:28.000Z",
    "update_in_min": null,
    "update_diff_in_min": null,
    "last_contact_at": "2019-01-14T15:50:28.000Z",
    "last_contact_agent_at": null,
    "last_contact_customer_at": "2019-01-14T15:50:28.000Z",
    "last_owner_update_at": null,
    "create_article_type_id": 5,
    "create_article_sender_id": 2,
    "article_count": 1,
    "escalation_at": "2019-01-31T10:50:28.000Z",
    "pending_time": null,
    "type": "email",
    "time_unit": null,
    "preferences": {
        "escalation_calculation": {
            "first_response_at": null,
            "last_update_at": "2019-01-14T15:50:28.000Z",
            "close_at": null,
            "sla_id": 1,
            "sla_updated_at": "2019-01-15T08:30:55.830Z",
            "calendar_id": 1,
            "calendar_updated_at": "2019-01-17T10:53:45.906Z",
            "escalation_disabled": false
        }
    },
    "updated_by_id": 3,
    "created_by_id": 3,
    "created_at": "2019-01-14T15:50:28.000Z",
    "updated_at": "2019-01-18T17:49:29.928Z",
	"tags": "gets,ignored,anyway",
	"article": {
        "type_id": 1,
        "sender_id": 2,
        "from": "LeTest <alias@secret.tld>",
        "to": "Users",
        "cc": null,
        "subject": null,
        "reply_to": null,
        "message_id": null,
        "message_id_md5": null,
        "in_reply_to": null,
        "content_type": "text/html",
        "references": null,
        "internal": false,
        "preferences": {},
        "updated_by_id": 3,
        "created_by_id": 3,
        "origin_by_id": 5,
        "created_at": "2019-01-14T15:51:50.000Z",
        "updated_at": "2019-01-14T15:51:50.341Z",
        "attachments": [],
        "type": "email",
        "sender": "Customer",
        "created_by": "alias@secret.tld",
        "updated_by": "alias@secret.tld",
        "origin_by": "test2@test.com",
        "body" : "Some text"
    }
    }

Setting reply_to also didn‘t change anything regarding the article.
The user sending this ticket also has an email connected to his account, but this email also does not appear in the tickets article (see following screenshot)

Is something wrong with my JSON-body or are there some settings in zammad i am missing?

“from”: “LeTest <alias@secret.tld>”,

:wink:

Thanks for your answer.

I tried the changing

to

“from”: “LeTest <alias@secret.tld>”,

but sadly nothing changed:

I also tried another name with a real email but with the same result.

@MrGeneration do you have an other idea of what could be wrong?

I can’t reproduce this:

I suspect that you just copied the content from here which breaks "" to “”.

Below the tested, working code:

{
"group_id": 1,
"priority_id": 3,
"state_id": 2,
"organization_id": 2,
"title": "API-Test that works anyway",
"owner_id": 3,
"customer_id": 6,
"note": null,
"first_response_at": null,
"first_response_escalation_at": "2019-01-31T10:50:28.000Z",
"first_response_in_min": null,
"first_response_diff_in_min": null,
"close_at": null,
"close_escalation_at": "2019-02-06T10:50:28.000Z",
"close_in_min": null,
"close_diff_in_min": null,
"update_escalation_at": "2019-02-01T11:20:28.000Z",
"update_in_min": null,
"update_diff_in_min": null,
"last_contact_at": "2019-01-14T15:50:28.000Z",
"last_contact_agent_at": null,
"last_contact_customer_at": "2019-01-14T15:50:28.000Z",
"last_owner_update_at": null,
"create_article_type_id": 5,
"create_article_sender_id": 2,
"article_count": 1,
"escalation_at": "2019-01-31T10:50:28.000Z",
"pending_time": null,
"type": "email",
"time_unit": null,
"preferences": {
    "escalation_calculation": {
        "first_response_at": null,
        "last_update_at": "2019-01-14T15:50:28.000Z",
        "close_at": null,
        "sla_id": 1,
        "sla_updated_at": "2019-01-15T08:30:55.830Z",
        "calendar_id": 1,
        "calendar_updated_at": "2019-01-17T10:53:45.906Z",
        "escalation_disabled": false
    }
},
"updated_by_id": 3,
"created_by_id": 3,
"created_at": "2019-01-14T15:50:28.000Z",
"updated_at": "2019-01-18T17:49:29.928Z",
"tags": "gets,ignored,anyway",
"article": {
    "type_id": 1,
    "sender_id": 2,
    "from": "LeTest <alias@secret.tld>",
    "to": "Users",
    "cc": null,
    "subject": null,
    "reply_to": null,
    "message_id": null,
    "message_id_md5": null,
    "in_reply_to": null,
    "content_type": "text/html",
    "references": null,
    "internal": false,
    "preferences": {},
    "updated_by_id": 3,
    "created_by_id": 3,
    "origin_by_id": 5,
    "created_at": "2019-01-14T15:51:50.000Z",
    "updated_at": "2019-01-14T15:51:50.341Z",
    "attachments": [],
    "type": "email",
    "sender": "Customer",
    "created_by": "alias@secret.tld",
    "updated_by": "alias@secret.tld",
    "origin_by": "test2@test.com",
    "body" : "Some text"
}
}

Hi @MrGeneration,

no I made sure that the Quotes are right “”.
I just copied your working example, but got the same result:

Maybe there are issues with some settings inside zammad?

@MrGeneration
Now when im looking into that article I created with your example code using “api/v1/ticket_articles/by_ticket/13676”, the response looks like this:

[
{
“id”: 63684,
“ticket_id”: 13676,
“type_id”: 10,
“sender_id”: 2,
“from”: “Mobile Customer 910079”,
“to”: “Users”,
“cc”: null,
“subject”: null,
“reply_to”: null,
“message_id”: null,
“message_id_md5”: null,
“in_reply_to”: null,
“content_type”: “text/html”,
“references”: null,
“body”: “Some text”,
“internal”: false,
“preferences”: {},
“updated_by_id”: 502275,
“created_by_id”: 502275,
“origin_by_id”: 502275,
“created_at”: “2019-10-14T11:20:34.296Z”,
“updated_at”: “2019-10-14T11:20:34.296Z”,
“attachments”: [],
“type”: “note”,
“sender”: “Customer”,
“created_by”: “bryan.l”,
“updated_by”: “bryan.l”,
“origin_by”: “bryan.l”
}
]

See in this response, the type is set to “note” even though I set it to “email” initially.

Note: I shortened the mail addresses in the response manually.

Sorry I can’t reproduce your issue.
I’ve been testing this with postman which was working just fine.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.