At the very bottom of each email in the footer, we are adding these "ref" codes:
Ref:Deskpro_XXXXXX ticket_you_XXXXXX (ticket is or was assigned to you).
Ref:Deskpro_XXXXXX ticket_follow_XXXXXX (ticket is or was followed by you).
Ref:Deskpro_XXXXXX ticket_team_XXXXXX (ticket is or was in your team).
Ref:Deskpro_XXXXXX ticket_new_XXXXXX (ticket is new)
Ref:Deskpro_XXXXXX ticket_XXXXXX
Ref:Deskpro_XXXXXX im_XXXXXX (include ticket mentions)
Ref:Deskpro_XXXXXX task_XXXXXX
Ref:Deskpro_XXXXXX community_XXXXXX
Ref:Deskpro_XXXXXX publish_XXXXXX
Ref:Deskpro_XXXXXX crm_XXXXXX
Ref:Deskpro_XXXXXX login_XXXXXXWrap
The format is made of:
- The string
Ref:Deskpro_
$emailSourceId
- Space
$eventCode
- The string
_
$emailIdent
again
So this makes it easy to search/create Gmail filters on those strings. The "email ident" makes the strings unique and not show up in the normal text, but it's static, so it doesn't change and therefore useful for filters.
$emailSourceId
This should be the first 6 characters of sha1(settings.core.helpdesk_uuid)
This is just an arbitrary string we've thought up, nothing very special about it other than it needs to stay static.
$eventCode
The event code is the thing that triggered the email. So for each email we send, it will be one of those listed above. They're listed in order of priority; i.e. if a ticket is assigned to you, then ticket_you
would be the event code no matter what.
For tickets, the assignment checks should always check on the property at either the start or end of the current request. E.g. if you imagine a trigger that re-assigned a ticket away from you, then we'd still want to use the ticket_you
event code if it was assigned to you at the 'start'.
You can do this with Ticket::getStateChangeRecorder. e.g. if ticket->agent is currently you OR was ever you (in change recorder), then event code would be ticket_you
.
Headers
Also copy these to headers:
X-Deskpro-EmailSourceId: XXXX
X-Deskpro-EmailEvent: ticket_you
This would allow for slightly easier filtering in things like email clients where you can actually filter on headers.
Adicionar um comentário
Inicie sessão ou registe-se para enviar um comentário.