Answered

Updating a ticket attribute from a rule

  • 29 June 2023
  • 5 replies
  • 253 views

Userlevel 1
Badge +1

Hi our company is making some custom sets of sla’s for tickets within intercom in order to do this we have made an api and linked it via a webhook. However this only works with conversation attributes that have been updated from some rules we have created. We cant seem to do the same with ticket attributes, is there a way of  updating ticket attributes from rules or custom bots much in the same way you can apply them to a conversation? 

icon

Best answer by Jacob Cox 15 July 2023, 23:44

View original

5 replies

Userlevel 4
Badge +5

Hi @david meakin !

I’m not entirely clear on what your workflow is that you’re trying to perform. Are you trying to set up an Inbox Rule that will trigger when a Ticket attribute is updated? You should be able to set this up by using the “A teammate or customer changes an attribute” option in your rules (see below)

Let me know if I’m misunderstanding the flow that you’re trying to build and provide a bit more context. Thanks!

Userlevel 1
Badge +1

HI @Jacob Cox 

 

The problem is tickets don’t have the in built attributes that conversations have. You can update a conversation attribute with a rule which we have done in many cases. However you cant apply a rule to a ticket in the same way as tickets don’t have the inbuilt attributes that conversations have. The attributes that are in tickets are self created when doing ticket types these seemingly cant be be updated via a rule as intercom doesn't give you the option when creating a rule or a bot workflow. I’m hoping someone can prove me wrong or can point me in the direction of how this can be achieved.

Userlevel 4
Badge +5

Hi @david meakin !

You’re correct that Ticket Attributes are specific to each individual Ticket Type. They aren’t updatable via Inbox Rules or Bots, but they CAN be manually updated in your workspace’s Inbox under the “Ticket Attributes” section in the right-hand sidebar.

If I were to update those attributes as the admin, this will trigger any Inbox Rule I have set up that uses the “A teammate or customer changes an attribute” option.

You can also update them using the ‘update a ticket’ with the /tickets endpoint of our REST API. This will also trigger any rule you have set up with that specific triggering action.

Do either of those scenarios allow you to accomplish what you’re looking to achieve?

Userlevel 1
Badge +1

Hi Jacob

 

Thanks for your suggestions.

I have created 3 new conversation fields. One of which is updated by a workflow bot and the other two will update from an api. The one triggered from the workflow bot does indeed use a  workflow rule that relies on data entered manually into the ticket. Depending on what is entered a number of actions can occur and will fill out the field with this. The API can then use this data to create a time for the SLA to be completed by. This has created another small issue in that you cant see the conversation data from within the ticket and only on the overview when you enable the view, but its a minor point that I'm sure we can work around.

The rest API is very interesting. Not figured out how to fully use it yet how do you get it to point to your intercom instance and where is the ID obtained from.

Thanks for all you help!

 

Regards,

David Meakin

Userlevel 4
Badge +5

Hey there@david meakin !

 

The IDs for your Conversations and Tickets can be seen in the URL in your browser bar when you have them open in your Inbox.

You can also access the IDs by making a GET request in the REST API and retrieving a list of Conversations or Tickets. The ID is one of that attributes that will be listed for each one.

 

When using our REST API, you’ll need to pass an Authorization Bearer token that is associated with an app that you create in your Workspace’s Developer Hub. 

To locate the access tokens for your workspace, go to the Developer Hub and then navigate to Your Apps.


Here you'll find a list of all the apps you've built, including the workspace the app is installed on and the production workspace's access token.


Once you've located this you'll want to click on the app's name. This will take you to the app's basic information view, like this 👇


Next, you'll want to locate your access-token details by clicking the Authentication link in the navigation bar.

 


Along with details regarding the scope of the token. (i.e. what data it can access and what it can do), you can also make updates to change the scope of your access token and more by clicking the Edit button, like you see below 👇

 

If you have any questions about the Authorization page for an app (access token scopes, OAuth, or their use) you can find a lot of detail in our documentation guide about them here.

Reply