Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save douglas-c-thomas/7a4a96baec17d1b63ddcd67660d411c8 to your computer and use it in GitHub Desktop.
Save douglas-c-thomas/7a4a96baec17d1b63ddcd67660d411c8 to your computer and use it in GitHub Desktop.
from pd.lib.salesforce.platform_api_enterprise_lead import PlatformAPIEnterpriseLead
from pd.lib.salesforce.platform_app import PlatformApp
# Persist the Enterprise Lead in SFDC
lead_data = {
'client_id': main_app.get('client_id'),
'organization_name': main_app.get('name'),
'first_name': user.get('first_name'),
'last_name': user.get('last_name'),
'email': user.get('email'),
'phone_number': user.get('phone'),
'marketing_campaign': marketing_campaign,
'marketing_keyword': marketing_keyword,
}
platform_api_enterprise_lead = PlatformAPIEnterpriseLead()
sf_lead = platform_api_enterprise_lead.create(**lead_data)
# Persist the corresponding Platform App in SFDC
platform_app = PlatformApp()
platform_app.create(app, app_type, sf_lead.get('Id'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment