Skip to main content

Hi I created a prompt to have a summary of the activities of an account 

I thought it would be easy with the instruction : Data to use :{!$RecordSnapshot:Account.Snapshot} 

(I use the Field Generation template) 

But in reality, it's not simple because I only got the future events and tasks. 

I had to build a flow to get all activities. 

Is it so, or did I miss something ?

1 件の回答
  1. 8月20日 15:51

    Hi Hugues - you did not miss anything, that is expected. Activities are a special case: an Account surfaces them through TWO separate related lists - Open Activities (future events + open tasks) and Activity History (completed tasks + past events). The Account RecordSnapshot gives you the open/future set, so a summary grounded only on the snapshot naturally comes back with just upcoming events and open tasks, not the completed history you actually want to summarize. 

     

    So your Flow is the right call, not a hack. For a full activity summary you feed the data in yourself: a Flow (or Apex) that queries the Tasks and Events (or ActivityHistory + OpenActivity) filtered to the Account, then pass that collection into the prompt as a resource. That is the supported pattern - template-triggered prompt flows exist exactly for grounding on data the snapshot cannot give you. 

     

    Tip: cap and sort what the Flow returns (e.g. last N activities by date) so you stay within the prompt's context limit and the model summarizes the most relevant ones. 

     

    If this helps, please mark it as the Best Answer so it helps the next person - thanks :)

0/9000