I'm using Python and the associated Fuel SDK package to make API calls to SalesForce Marketing Cloud. I'm attempting to consolidate information from various cloud objects to obtain the same information found in the "My Tracking" portion of the Marketing Cloud site shown here:
My problem is that I'm not sure how to connect the objects I've created within Python to replicate the above. The sent event object I created could get me Job ID
, Total Sent
and Date Sent
. Using a data extensions object could get me Name
and Data Extensions
, but I can't find a shared object property between the two to help me link them. Is there something I'm missing? Is there maybe some other object I'm supposed to use to get me what I need?
Here are sample responses.
#folder object gets me the 'Name' portion from the image above
[(DataFolder){
Client =
(ClientID){
ID = a
ModifiedBy = 6779065
EnterpriseID = a
}
PartnerKey = None
CreatedDate = 2020-02-11 13:34:00.660000
ModifiedDate = 2020-02-11 13:34:00.660000
ID = 124676
ObjectID = "0846b221-1a51-4548-87ee-7ae16ae3d8ab"
CustomerKey = None
ParentFolder =
(DataFolder){
PartnerKey = None
ID = 60479
ObjectID = "a387aa5e-daf6-4a5e-b023-e22211ef1a3a"
CustomerKey = "dataextension_default"
Name = "Data Extensions"
Description = None
ContentType = "dataextension"
IsActive = True
IsEditable = False
AllowChildren = True
}
Name = "Y12_Week_7_Email"
Description = None
ContentType = "dataextension"
IsActive = True
IsEditable = True
AllowChildren = True
}]
#Using the ID from the folder object, I can use it to retrieve the data
#extensions within the folder to get me 'Data Extensions` from the image above
(DataExtension){
Client =
(ClientID){
ID = a
}
PartnerKey = None
CreatedDate = 2020-02-11 13:37:34.067000
ModifiedDate = 2020-02-11 13:37:34.067000
ObjectID = "389264ef-054d-ea11-a2e8-1402ec94b121"
CustomerKey = "9209B1FA-E92B-4E2E-AA31-B168BE174BB5"
Name = "Y12_Week_7_Both"
Description = None
CategoryID = 124676
}
#the sent event object can get me the 'Job ID' using the SendID, but there doesn't appear to be any other info within this object or the other two to help me link this object to the two from before.
(SentEvent){
Client =
(ClientID){
ID = a
}
PartnerKey = None
PartnerProperties[] =
(APIProperty){
Name = "ListID"
Value = "132509"
},
(APIProperty){
Name = "SubscriberID"
Value = "205946194"
},
ObjectID = None
SendID = 4347170
SubscriberKey = "dummyemail"
EventDate = 2020-02-11 17:30:46.390000
EventType = "Sent"
TriggeredSendDefinitionObjectID = None
BatchID = 1
}