Problem with setIncident command

Showing results for 
Show  only  | Search instead for 
Did you mean: 
Please sign in to see details of an important advisory in our Customer Advisories area.

Problem with setIncident command

L1 Bithead

I am working on a new automation which gets triggered dynamically from layout where in I need to check a custom attribute has changed in my remote machine, then update it on the xsoar incident. The custom attribute is a list/array. This is what I am doing in the automation...if len(oldAnomalies) != len(jsonResponse):
            # Update the new anomalies on this incident
            # demisto.executeCommand("setIncident", {"id": incident['id'], "gracaseanomalydetails": []})
            execute_command("setIncident", {"id": incident['id'], "gracaseanomalydetails": jsonResponse})When I ran for first time, oldAnomalies count were say 10 in number and jsonResponse had 8 entries. The problem is that executeCommand is updating the incident but when I refresh, it still says that oldAnomalies count is 10 while new is 8. If I change jsonResponse to have 4, it would update the xsoar incident but upon refresh, it would still say oldAnomalies count as 10. I have tried with both demisto.executeCommant and enecute_command. Am I missing something in this? Is there a way we can commit after setIncident is called?

1 accepted solution

Accepted Solutions

I had asked this question on slack and it is resolved now. Thanks your your time.

View solution in original post


L4 Transporter

Hi @sudhesub,

I think we might need more information before we can offer a solution. Maybe just add the automation to the question?


I don't see any issue with your execute_command call. 

I had asked this question on slack and it is resolved now. Thanks your your time.

  • 1 accepted solution
  • 2 replies
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!