Impersonation on Create Ticket API

I know that you use impersonation on when creating a ticket through the automatic email process. That way the ticket appears to be created by the sending contact.

Is it possible to set the creator for impersonation when using the API to create the ticket?

We have an automation alert which is like a voicemail or a submitted form. We know what the user’s email is and I’ve identified the user and matched them to a contact. When the ticket is created, it gets created as the MSPInt API user. Then, because it’s not an external user, our AT Workflows which should fire on notifying the user of a new ticket created won’t match and they won’t get notified.

So I’m hoping to use the impersonation to make it look like the user submitted it directly without having to add additional workflows.

Hi Duncan,

Yes, you can impersonate a contact (but not a resource/user). It’s as simple as setting the CreatedByContactID property on the ticket.

So in this case:
image

That created by is the user? Setting the Contact Created by didn’t do anything there. I don’t think that’s going to help in this case, but thanks.

Make sure your API user is configured to allow impersonation (see Impersonation | MSPintegrations).

Can you send me the history URL to review?

I just noticed you’re setting the contact on an update step. You can only set the impersonated creator during a create step.

Great catch Travis… thanks.

We were setting the contact as a second step originally because sometimes it was blank and I just tacked the creator change onto that.

Just now, I cloned the ticket create step instead. So we now have 2 identical ticket create steps, but they have conditions on them whether or not there is a global.contact.id. The one where the contact ID is known, now sets the contact and createdbycontact at the same time during the creation.

This worked as expected and set the creator properly – which then let the internal workflow which sent the notification to fire.

Appreciate your quick response.

Great! Thanks for letting me know, and glad to hear it’s working well!!