Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Using automation conditionally to set and clear Insight Object fields

Ian Maur April 19, 2022

Context: I'm trying to find a way to easily present email/phone info for a customer based on their email as it populates in the reporter field (reporter.emailAddress).

Current state:

  • What I'm doing is creating "Contact" objects in Insight, then a "Contact" Insight Object field that filters those objects. These objects contain customer email and phone numbers.
  • With automation, I have it set so that editing the reporter field triggers an "Edit Issue" action with the IQL query being "Email = {{issue.reporter.emailAddress}}". This successfully allows me to populate the contact object automatically.

Problem: When I move to a contact that doesn't have an object created in Insight, the automation fails.

What I attempted to do was set an If Block IQL condition that had the same "Email = {{issue.reporter.emailAddress}}" query. The thought was that if the query found any matching object, it would be TRUE and move the automation forward to the Edit Issue action listed above, while FALSE would pass to an Edit Issue action with a blank query.

The results of this are that everything processes as FALSE, regardless of whether it has an existing object or not, so clearly I'm incorrect about how that IQL conditional works. 

After a couple of hours of playing around and searching the KB, I'm stuck. Looking for some suggestions if anyone has any. Thanks in advance!

1 answer

1 accepted

3 votes
Answer accepted
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 19, 2022

Hi @Ian Maur - Try adding the following two components to your existing rule before the Edit Issue action:

Lookup Objects

Email = {{issue.reporter.emailAddress}}

Advanced Condition

{{lookupObjects.size}} Greater than 0
Ian Maur April 19, 2022

Perfect - Thanks Mark!

I went ahead and put that into an If block with ELSE pointing towards a blank edit issue action, and that did exactly what I needed it to do. 

Like Mark Segall likes this
Mark Segall
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 19, 2022

You may not need the If/Else block with those two components unless your rule is performing other actions.  Those two steps should effectively kill any progress when the insight object does not exist.

Ian Maur April 19, 2022

Noted, thanks Mark. In this instance, I very specifically want that field to clear if the reporter doesn't have an object created for them. That will be a trigger that they're a new customer and need added to the system. That would be the one other thing this automation is doing.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events