<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How do I get the numeric incident id in an automation? in Cortex XSOAR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/how-do-i-get-the-numeric-incident-id-in-an-automation/m-p/518689#M1306</link>
    <description>&lt;P&gt;If you are running this command as a test in the playground, the playground always returns this GUID like string.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Running it in a real incident should return the incident ID.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also use &lt;STRONG&gt;&lt;EM&gt;demisto.incident()&lt;/EM&gt;&lt;/STRONG&gt; to get the incident data of the incident in which the script is running in (rather than getting all incidents and pulling the first one off the list).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Adam&lt;/P&gt;</description>
    <pubDate>Fri, 21 Oct 2022 07:11:24 GMT</pubDate>
    <dc:creator>ABurt</dc:creator>
    <dc:date>2022-10-21T07:11:24Z</dc:date>
    <item>
      <title>How do I get the numeric incident id in an automation?</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/how-do-i-get-the-numeric-incident-id-in-an-automation/m-p/518686#M1303</link>
      <description>&lt;P&gt;I'm working with a Python automation, and I need to get the numeric incident id. I expect this id to be numeric (123456) but it is always a long concatenated hex string and GUID.&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;FONT face="courier new,courier" size="3"&gt; incident = demisto.incidents()[0]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;incident_id = incident['id']&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="3"&gt;print(incident_id )&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Output is:&amp;nbsp;&lt;SPAN class=""&gt;89a633e1ef019afeee78fbb2ac23ee84$&amp;amp;$234f4f55-5c46-44b1-8662-6f65039a9a0c&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;I need a ordinal numeric value like #19119 (number seen in incidents list). How are these ids related?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2022 03:17:48 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/how-do-i-get-the-numeric-incident-id-in-an-automation/m-p/518686#M1303</guid>
      <dc:creator>Raoul</dc:creator>
      <dc:date>2022-10-21T03:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: How do I get the numeric incident id in an automation?</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/how-do-i-get-the-numeric-incident-id-in-an-automation/m-p/518689#M1306</link>
      <description>&lt;P&gt;If you are running this command as a test in the playground, the playground always returns this GUID like string.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Running it in a real incident should return the incident ID.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also use &lt;STRONG&gt;&lt;EM&gt;demisto.incident()&lt;/EM&gt;&lt;/STRONG&gt; to get the incident data of the incident in which the script is running in (rather than getting all incidents and pulling the first one off the list).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Adam&lt;/P&gt;</description>
      <pubDate>Fri, 21 Oct 2022 07:11:24 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xsoar-discussions/how-do-i-get-the-numeric-incident-id-in-an-automation/m-p/518689#M1306</guid>
      <dc:creator>ABurt</dc:creator>
      <dc:date>2022-10-21T07:11:24Z</dc:date>
    </item>
  </channel>
</rss>

