- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
11-23-2022 10:15 PM
Hi,
We are providing partner integration for our product and this is the requirement.
My product # generates/creates 'Cases' which are pulled inCortex XSOAR as incidents using fetchIncidents call. It might be possible that sometimes a 'Case' in our product gets updated and gets pulled in XSOAR again. The custom attribute used here is caseId
Now I have more than one incident but with same caseId which is not desirable.
What we want to do is to pull the particular incident from XSOAR based on the custom attribute (caseId) and update it rather than creating new incident. And we need to do it during fetchIncidents itself.
I asked this question on Slack and I was suggested with this
demisto.execute_command("SearchIncidentsV2", {"query": $QUERY}) demisto.execute_command("setIncident", {"id": $ID, $CUSTOM_FIELD_NAME: $CUSTOM_FIELD_VALUE})
The problem with above scripts is that we can't run them from integration.
11-28-2022 08:07 AM
This sounds like a perfect use case for a preprocessing rule. In this case make sure you've mapped the Case ID from the external system to an XSOAR field (Event ID is a good option), and then use a preprocessing rule to drop new cases for which an existing XSOAR Incident with the same Case ID already exists.
We have a video on preprocessing on our XSOAR Engineer Training Series:
Here are the docs on preprocessing:
https://xsoar.pan.dev/docs/incidents/incident-pre-processing
11-28-2022 08:09 AM
You won't be able to do the update during the fetch Incidents call, it simply doesn't work that way.
I'd do a preprocessing rule, if you need to update the existing one, you can run those 2 commands you mentioned as part of a preprocessing script which is another option on a preprocessing rule.
11-28-2022 10:10 PM
Thanks for you reply.
I am not able to open the video. It says Access Denied. Is there some other video or other location than what is mentioned above?
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!