a guest Jul 20th, 2017 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- Import a small set of contacts to Eloqua
- from os import environ
- from pyeloqua import Bulk
- # Initialize Bulk object
- # Here I pass environment variables which contain the necessary information
- # You could also pass strings with username, password, and company
- bulk = Bulk(company=environ['ELOQUA_COMPANY'],
- # define what action we are taking (import) and what object we are importing to (contacts)
- # define which fields we are importing
- bulk.add_fields(['C_EmailAddress', 'C_FirstName'])
- # define an identifier field which Eloqua will match on for upsert
- # define a sample set of data to import
- data = [
- 'C_EmailAddress': 'firstname.lastname@example.org',
- 'C_FirstName': 'tester'
- 'C_EmailAddress': 'email@example.com',
- 'C_FirstName': 'testing'
- # Initialize the import
- # send import data
- # initialize data sync
- # output will be status of sync
RAW Paste Data