We basically did it with our own connector software. Maybe we will provide steps for Zammad API in the future to allow others to do the same. Basically we used the XML-Backup-Export of Freshdesk and pumped it to Zammad API. Only thing which got lost where attachments, as they are not in the export… I mean we didn’t put much effort in it, as we don’t care. We just need the old (closed) tickets to look stuff in the near future.
One suggestion for zammad team to think about: It would be nice if it would be possible to enable/disable import_mode in zammad UI… nobody likes to use rails-console
Remember: import_mode=true
is needed set created_at
and other timestamp fields from outside. If you don’t do this, timestamps will set by zammad to be “now”.
If zammad wants to attract more people switching from different solutions you should make importing easier. Maybe even provide a CSV-Import for tickets and articles. For us it was ok, because we are dealing with APIs every day, but for others it could be challenging.
Here are the main requests and logics to give you an idea:
1. Create tickets
POST /api/v1/tickets/
{
"fd_ticket": ${identifier!},
"title": "${name!?json_string}",
"state_id": <#if status! == "Closed">4<#elseif status! == "Open">2<#else>3</#if>,
"group": "<#if group_id_name!?contains('Sales')>Sales<#else>Support</#if>",
"customer_id": "guess:${helpdeskticket_requesterid_email!}",
"created_at": "${created_at!?keep_before('+')}.000Z",
"article": {
"subject": "${name!?json_string}",
"body": "${helpdeskticket_descriptionhtml!?json_string}",
"from": "${helpdeskticket_requesterid_email!}",
"to": "support@example.com",
"content_type": "text/html",
"type": "<#if status! == "Closed">email<#else>email</#if>",
"created_at": "${created_at!?keep_before('+')}.000Z",
"internal": false
}
}
2. Add articles / responses to the ticket
POST /api/v1/ticket_articles/
{
"ticket_id": ${parent_zammad_id!},
"from": "${email_from!}",
"to": "${email_to!}",
"cc": "",
"subject": "",
"body": "${helpdesknote_bodyhtml!?json_string}",
"content_type": "text/html",
"type": "<#if note_source_name! == "reply">email<#else>note</#if>",
"internal": ${helpdesknote_private!},
"created_at": "${created_at!?keep_before('+')}.000Z",
"time_unit": null
}
Maybe HTTP request already help somebody, because it took some time to get them right. The scripting language you see is called Freemarker and used in our solution to do if-else logic and stuff. Just ignore them or get an idea of what we did.