Salesforce Marketing: Get Started with Python SDK

A simple and short way

--

The best way to perform an in-depth analysis of Salesforce Marketing Cloud data with Python is to load Salesforce Marketing Cloud data to a database or cloud data warehouse, and then connect Python to this database and analyze data.

Once the SDK is configured, initialize it by instantiating an ET_Client object:

The ET_Client object is the central object in the SDK and performs a number of tasks for you automatically, including acquiring and refreshing OAuth access tokens using the client credentials you specified in the last step.

Once the SDK is initialized, you can use it to programmatically interact with the account represented by the ET_Client instance. Here’s an example of the SDK being used to retrieve all lists in an account:

This code sample highlights the pattern for interacting with objects in the Python SDK. First, you instantiate an ET_Client object. Then, you instantiate an object of the type you want to work with, in this example ET_List. Then, you specify account context (the ET_Client instance) for the operation using the authStub property. Finally, you perform a REST-style operation on the object: get (retrieve), post (create), patch (update), or delete.

Tks,

https://www.linkedin.com/in/brunoluizmendes/

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response