Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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'))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement