Skip to Main Content
Status Backlog
Categories Developer Platform
Created by Guest
Created on Aug 24, 2023

Update rules to recognize tags added from the Front API

Background

I was fixing an issue where a notification rule for a broker wasn't working. The rule was supposed to notify him when his team's tag was added to an email in our invoices inbox. This tag is added programmatically through an API, and we have a piece of code that decides which broker's tag to attach. The tricky part is that multiple tags get added, including the broker's team tag, using a method that handles a List<> of tags in C#. Then, a special "Fire Webhooks" tag is added to signal that a webhook was triggered. The problem was that the notification rule wouldn't work when his tag was added automatically; it only worked when the tag was manually added by a user.

I dug into our code and noticed that we were adding a bunch of tags, including his teams tag, and then adding the "Fire Webhooks" tag right after. I made a change to the rule logic: now it triggers when the "Fire Webhooks" tag is added to an email that already has his teams tag and is in the invoices inbox. This adjustment did the trick – the rule started working as expected. This might seem a bit complex, especially for someone not familiar with software development, and it took some effort to uncover. It's worth simplifying this for non-developers dealing with rule setups.


Idea

Allows rules to recognize when a tag is added by the API

  • Attach files