Answered

Is there a way to set non-custom attributes of conversations via the API?

  • 5 August 2022
  • 1 reply
  • 93 views

  • New Participant
  • 0 replies

We would like to set the "Priority" or "SLA" attributes of conversations in particular. The reason is that we want to externalize the decision making of important vs non important conversations as soon as they come in.

 

In the update conversation API, you can only update custom attributes.

 

Right now we are only interested in Priority and SLA, but in the future we also might want to set tags or other fields.

 

What we already tried:

 

1.

Create an inbox rule that e.g. sets Priority if a custom attribute has a certain value. We set up a webhook to be notified when a new conversation comes in and set that custom attribute on the conversation through the API.

 

Problem with this is that the inbox rule is triggered before we set the custom attribute. We also tried to call the /conversations/{id}/run_assignment_rules API but that only seems to trigger inbox rules which assign conversations. Even if we have an inbox rule that both assigns and sets the priority flag, only the assignment part of the rule is actually ran.

 

2.

Same as 1. but we used a custom action on an inbox rule that gets the same information and puts it onto a custom attribute.

 

Problem here is that we can't configure a rule that runs after the rule that calls the custom action

 

3.

The only working solution - which is even hackier than the other 2 - is to create an inbox rule that is triggered after "no reply after 30s". This one then sets the priority flag if the custom attribute has a certain value. We then have 30s time to set the custom attribute from our system. We just need to hope that no one touches the conversation in that time.

 

 

Is there a fundamental feature we have missed which allows us to achieve what we are trying to do?

icon

Best answer by Racheal 9 August 2022, 02:29

View original

1 reply

Userlevel 4
Badge +5

Hey @timo​ Racheal from the support team here 👋

 

It is currently not possible to set priority or to add SLAs via the API, but I know this is something people are really keen to see and will be sure to add this as a feature request for the team. In the meantime, you're spot on with your workaround at the moment. You will need to programmatically update the custom attribute, and set the Priority via Assignment Rules.

Reply