salesforce-marketingcloud / FuelSDK-Python

FuelSDK for python
Other
127 stars 193 forks source link

Possible to access Automation objects? #86

Open f4f343w4tcfwv4tz5tb5 opened 6 years ago

f4f343w4tcfwv4tz5tb5 commented 6 years ago

I don't see this capability but thought we might be able to add it.

leugimmai commented 5 years ago

So after painless testing I figured out how you can do it. And essentially get any SOAP object you want. Just change the obj_type to something you would want and update the props also


stubObj = ET_Client.ET_Client(False, False, {
            "clientid": "clientId",
            "clientsecret": "clientSecret"
        })

search_filter = {'Property': 'CustomerKey', 'SimpleOperator': 'equals', 'Value': "automation-external-key"}

get = ET_Client.ET_Get(auth_stub=stubObj, obj_type="AutomationInstance", props=["Name", "ScheduledTime", "StatusLastUpdate", "IsActive"], search_filter=search_filter )

print(get.results)
Thom3435 commented 5 years ago

@leugimmai Do you know how to add Activities(i.e. Send Email or Import File) to an Automation?

leugimmai commented 5 years ago

@Thom3435 Sorry I do not know how to do it. At least yet....

barokzi commented 4 years ago

Is there an equivalent for this in C#? I tried but in version 1.3 "ET_Client" is deprecated and ETClient object does not have an exposed "Get" method.

Thanks.