Closed Sam-Sriram closed 11 months ago
Hi @Sam-Sriram as far as I know the Winter '24 release doesn't change the status quo for developers much. When you turn on Activity360 under Einstein Activity Capture you have access to a new object called UnifiedActivity that looks promising.
SELECT Id,ActivityType,ActivitySubType,ActivityDateTime,Subject,Snippet,IsInsightAvailable,DetailId,InternalEventKey from UnifiedActivity
However it's use is not documented yet and the queries you can run are restricted. Until we get some documentation on the object and related object to it it's going to be impossible to support.
It looks like there are 2 new relationships available. You could try querying them to see what data is returned. I don't have EAC data so it's hard to determine what's returned from both queries. SELECT Id, (SELECT Id from UnifiedActivityParticipants) FROM Contact WHERE ID = 'ID' SELECT Id, (SELECT Id from UnifiedActivityRelations) FROM Contact WHERE ID = 'ID'
Did you have a way in mind?
Thanks @deejay-hub I was not across this new object. However, when I run this query on my sandbox which has EAC enabled, I get this error [ { "message": "Query must include a constraint on UnifiedActivity.Id, UnifiedActivityParticipant.PersonId or UnifiedActivityRelation.RelatedId in the WHERE clause", "errorCode": "MALFORMED_QUERY" } ]
These all appear to be system objects that are hidden as they dont appear in Object Manager. Let me check with my colleague on how I can get results for these objects/relationships from my sandbox data and get back to you. I have also reached out to the Salesforce product manager to understand how we can get access to these virtual objects
There also appears to be no hits for these objects in the Salesforce documentation search
Okay sounds like a plan. If someone can tell me the supported way to query across these objects then we might be able to do something. Until then we'll have to wait for documentation and support.
I managed to get the data for the UnifiedActivity Object but trying to understand (or reengineer) the data model is too much work. I will check if there is a data model (or entity relationship diagram) that SF can share. Attached xls has 3 tabs that I started compiling before deciding it better to seek the formal documentation. When I tried to use the SOQL method to join, I ran into errors (I tried using both both childSObject: UnifiedActivityParticipant as well as relationshipName: UnifiedActivityParticipants and got the same error)
Select Id, ActivityType, ActivitySubType, ActivityDateTime, UnifiedActivityParticipants.ChannelAddress, UnifiedActivityParticipants.ParticipantType, UnifiedActivityParticipants.PersonID, Subject, Snippet, IsInsightAvailable, DetailId, InternalEventKey from UnifiedActivity where UnifiedActivity.ID in (SELECT ActivityId FROM UnifiedActivityRelation WHERE RelatedId IN ('0012300000lBitUAAS', '0032300000axcvMAAQ'))
returned this error. Got the same error using the REST API
INVALIDFIELD: ActivitySubType, ActivityDateTime, UnifiedActivityParticipants.ChannelAddress ^ ERROR at Row:1:Column:62_ Didn't understand relationship 'UnifiedActivityParticipants' in field path. If you are attempting to use a custom relationship, be sure to append the 'r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.
@deejay-hub Hi Dave, I got the attached pdf as the documentation for Unified 360 reporting but it is about generating reports using the reporting framework and the Unified Activity objects but other than listing the objects, does not go into any detail, especially on using these as external or virtual objects . The Workbench provides more details about each of the object.
And interestingly I am able to use SOQL to query the objects though the document states SOQL not supported. But as I mentioned above, am not able to include child relations in the query
This statement "The new unified objects aren’t standard Salesforce objects and they’re available only for reporting. These objects don’t appear in Object Manager, and they aren’t supported for SOQL queries or in APIs." is enough of a reason to close this issue. Until Salesforce provides a way to use SOQL or a programmatic way of accessing the data then it's not something we can include.
Is your feature request related to a problem? Please describe. Auto captured emails via Einstein Activity Capture are not held as Salesforce records in core Salesforce but in AWS. They do get reported in the standard Activity timeline however do not get plotted on Time Warp since they dont exist as objects. They are not reportable or seen in Dashboards, however, the recent Winter 24 release provides a way to report using the Unified Activity reporting.
Related post on the problem in Salesforce Stackexchange: https://salesforce.stackexchange.com/questions/361896/using-einstein-activity-capture-unable-to-show-mails-and-events-in-custom-compo
Describe the solution you'd like Can we have the ability to query and plot 'virtual' objects in Time Warp?
Describe alternatives you've considered As the post indicates, there are no APIs to fetch those objects from the AWS Store.
Additional context Attached screenshots illustrates the problem - the 2 emails from 20/11 & 21/11 in the standard activity timeline are not plotted on the timeline.