<?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 Playbook to enrich dataset data into alert context in Cortex XDR Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/playbook-to-enrich-dataset-data-into-alert-context/m-p/1243685#M8912</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Is anyone able to guide me on how to achieve this perhaps?&lt;/P&gt;
&lt;P&gt;I want to ran a task in a playbook that will do a custom query in a dataset and pull information and add it to the alert context data.. is this possible and if so guidelines would be appreciated.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks in adv&lt;/P&gt;</description>
    <pubDate>Thu, 11 Dec 2025 06:58:25 GMT</pubDate>
    <dc:creator>PA_nts</dc:creator>
    <dc:date>2025-12-11T06:58:25Z</dc:date>
    <item>
      <title>Playbook to enrich dataset data into alert context</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/playbook-to-enrich-dataset-data-into-alert-context/m-p/1243685#M8912</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Is anyone able to guide me on how to achieve this perhaps?&lt;/P&gt;
&lt;P&gt;I want to ran a task in a playbook that will do a custom query in a dataset and pull information and add it to the alert context data.. is this possible and if so guidelines would be appreciated.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks in adv&lt;/P&gt;</description>
      <pubDate>Thu, 11 Dec 2025 06:58:25 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/playbook-to-enrich-dataset-data-into-alert-context/m-p/1243685#M8912</guid>
      <dc:creator>PA_nts</dc:creator>
      <dc:date>2025-12-11T06:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: Playbook to enrich dataset data into alert context</title>
      <link>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/playbook-to-enrich-dataset-data-into-alert-context/m-p/1244567#M8928</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/306035"&gt;@PA_nts&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Greetings for the day!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, it is possible to run a task in a playbook that performs a custom query on a dataset and pulls that information into the alert context. This process is commonly referred to as Context Enrichment.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Guidelines for Achievement&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Execute the XQL Query:&lt;/STRONG&gt;&lt;BR /&gt;Use the xdr-xql-generic-query command within a playbook task to run your custom XQL query. This command allows you to target specific datasets and retrieve the necessary information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Pull Data into Context:&lt;/STRONG&gt;&lt;BR /&gt;When a playbook task executes, its output is automatically stored in the Investigation Context. You can view these results in the War Room or the Context Data viewer within the incident workbench.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Map Data to Specific Fields:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;To Incident Context:&lt;/STRONG&gt;&lt;BR /&gt;Use the Set script (e.g., !Set key="key_name" value="${XQL_Result_Path}") to assign specific values from the query result to a context key.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;To Custom Incident Fields:&lt;/STRONG&gt;&lt;BR /&gt;Use the setParentIncidentFields command to map data from the context into predefined custom incident fields.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;To Alert Fields:&lt;/STRONG&gt;&lt;BR /&gt;You can use the Set script or custom automation to populate alert-specific context data, which can then be used in subsequent tasks or for visualization in custom layouts.&lt;/P&gt;
&lt;P&gt;Important Considerations:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Performance:&lt;/STRONG&gt;&lt;BR /&gt;Be cautious when retrieving large numbers of results. Repeatedly calling commands to process items one-by-one can cause severe latency. It is recommended to perform operations in bulk or single calls where possible.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Debugger Limitations:&lt;/STRONG&gt;&lt;BR /&gt;Note that the Playbook Debugger may not always fully resolve incident-level context variables (such as parentIncidentFields) as accurately as a live execution environment.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Order of Operations:&lt;/STRONG&gt;&lt;BR /&gt;Enrichment via playbooks happens after an alert has been ingested and an incident created. You cannot use this enriched data for initial Alert Exclusion rules, as exclusions are processed before playbooks are triggered.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;If you feel this has answered your query, please let us know by clicking like and on "&lt;STRONG&gt;mark this as a Solution&lt;/STRONG&gt;".&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; Regards,&lt;BR /&gt;S. Subashkar Sekar&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Dec 2025 13:55:44 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/cortex-xdr-discussions/playbook-to-enrich-dataset-data-into-alert-context/m-p/1244567#M8928</guid>
      <dc:creator>susekar</dc:creator>
      <dc:date>2025-12-24T13:55:44Z</dc:date>
    </item>
  </channel>
</rss>

