Questions tagged [python]

Python is a widely used easy to learn programing language with which one can automate a lot of salesforce tasks by writing scripts. There are python packages like beatbox among others which are salesforce clients and support commands like SOQL queries, upsert, updating, and creating records in salesforce.

46 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
1answer
173 views

InteractionDefinition not valid ObjectType [Python FuelSDK]

I am trying to get my journey objects via the API, however I get: Message: Error: InteractionDefinition is not a valid ObjectType. I am using the python Fuel-SDK. I do not understand why this Object ...
5
votes
1answer
69 views

Retrieving the ExclusionFilter field of a TriggeredSendDefinition

Using the Python FuelSDK, I am able to ​create​ a TriggeredSendDefinition with an ExclusionFilter, as well as ​update​ an existing TriggeredSendDefinition's ExclusionFilter. This uses the prop "...
3
votes
0answers
169 views

How to insert records into an SObject using python beatbox module?

I am looking through beatbox's github repo here https://github.com/superfell/Beatbox/blob/master/beatbox/_beatbox.py#L122 And I am not sure whether I am using it correctly, specifically I am not sure ...
3
votes
0answers
249 views

request.patch gives duplicate value found error for a Salesforce API

I have referred this guide to make patch request to a salesforce api. My python code : headers = {"Authorization" : "OAuth %s"%str(accessToken), "Content-Type" : "application/json"} try: ...
2
votes
1answer
570 views

How to return full report (>2000 rows) using rest api?

I am unable to fetch a full report using the Salesforce REST analytics API. As was posted on another question, I am using the following solution(python): reportFilter = { "reportMetadata": {"...
2
votes
0answers
139 views

Limited speed of downloading from Attachment endpoint

For an Attachment sobject, there is a 'Body' field, whose value looks like: /services/data/v39.0/sobjects/Attachment/00Q5700000v3mCFREE/Body. When I make a GET request to this endpoint using Python ...
2
votes
0answers
112 views

Salesforce-bulk authentication issue

I'm trying to login using the Bulk API with the Python interface salesforce-bulk by: bulk = salesforce_bulk.SalesforceBulk(username=userName, password=p) This gives an error AssertionError: Couldn'...
1
vote
0answers
31 views

Adding parameters to SOAP API call from SF by changing WSDL

I am working on an application using zeep and wsdl to call a SOAP api. The wsdl has a function that is pulling ~15 fields from salesforce, which are later written to a csv file (through python). I ...
1
vote
0answers
82 views

How to resolve Heroku build error specific to Python 3.8.0

I'm deploying a Python (flask) app to Heroku via the commandline, and after specifying Python 3.8.0 in the runtime I got an error relating to '_ast27' extension I'm not sure what to do with. If I ...
1
vote
0answers
30 views

How can I use Salesforce SOAP APIs to pull the org name for an org subscribing to my managed package?

Background: I threw together a quick script to pull AppAnalytics logs from my LMA programmatically via python. This part is working just fine. I am including my script here in case it helps someone ...
1
vote
0answers
61 views

How to add a Send Email Activity to an Automation with FuelSDK-Python?

I unable to associate an Email Send Activity when creating an automation in Fuel-SDK Python. Below is my props dictionary setup. When posted the Automation is created but there is no Send Email ...
1
vote
1answer
75 views

Open Html file from Heroku Bash

I have deployed my Flask python application on Heroku. The problem is that in one line of my python code I must open an HTML file (where some javascript gets executed). Obviously, it locally works in ...
1
vote
0answers
153 views

Python-driven Bulk API 2.0 hardDelete yields “errorMessage”: “InvalidBatch : InvalidBatch : The 'delete' batch must contain only ids”

I am trying to write a bit of python code to permanently delete some records using the Salesforce.com Bulk API v2. Using curl, I have success. I: create an Bulk API 2 hardDelete job PUT the file to ....
1
vote
0answers
78 views

Marketing Cloud Fuel SDK API : get DataExtension/List related to Email, get Contact info from those DataExtension/List

I am working on Salesforce Marketing Cloud API to extract Email Receiver Contact detail. For that I used below approach. Step 1 : Extract List related to Email (used ET_ListSend()) using below code....
1
vote
1answer
91 views

Salesforce Report - Column list

I am trying to see if I can fetch all columns in Reports object. I have the before import pandas as pd from simple_salesforce import Salesforce sf_data_cursor = Salesforce(username='mail@mail.com', ...
1
vote
1answer
92 views

Flatten SOQL Subquery to return 1 row per ActivityHistory

I currently have this query: SELECT (SELECT CallDurationInSeconds, CallData__c, Closed_After_DueDate__c, Reminder_Date_Time_LEX__c, PrimaryWhoId, Current_User_Assigned__c, LastModifiedById, ...
1
vote
2answers
168 views

First time accessing the sales force api **token**

Hello according to this link : Accessing the Salesforce API for the first time... using python I have executed a python and got the following C:\ProcesosCTM\Sales_Force>call python C:\...
1
vote
0answers
59 views

not able to filter data_extension_column output in python

import FuelSDK arg = {'clientid':'clientid', 'clientsecret':'clientsecret'} myClient = FuelSDK.ET_Client(False, False, params=arg) data_extension_column = FuelSDK.ET_DataExtension_Column() ...
1
vote
1answer
161 views

Python Duplicates_Detected during Update

So when using Simple_Salesforce (has been working fine for quite some time) but recently made changes so that it would check if Contact exists first and if exist then use sf.Contact.update instead of ...
1
vote
0answers
28 views

salesforce Files User permission for SOQL

I am trying to use Phyton/Beatbox and execute a query SELECT Id, LinkedEntityId, ContentDocumentId, ShareType FROM ContentDocumentLink WHERE LinkEntityId = 'Case ID goes here' The purpose is to list ...
1
vote
0answers
77 views

Heroku Connect - Able to Handle Recursive Model Fields like Django?

In Django (and other frameworks), I can do the following: class Book(models.Model): prerequisites = models.ManyToManyField('self', symmetrical=False) This forces Django to produce a multi-select ...
1
vote
0answers
60 views

Can't Get Email Content using FuelSDK and Python

I am running the basic example of getting Email content through the FuelSDK package in Python, but the results always come back empty. I am able to get results back for different types of events (...
1
vote
1answer
131 views

Unable to find the FromAddress of a send job using FuelSDK in Python

I am trying to find the FromAddress associated with particular send jobs using the FuelSDK package in Python. After scouring through the documentation and source code, it doesn't appear to be ...
1
vote
0answers
434 views

Timeout when attempting to retrieve data extensions

I am new to working with the FuelSDK Python API but I am puzzled by my initial attempts at using it. First, I tried getting content area objects using the steps described here: https://code....
1
vote
2answers
833 views

parsing outbound message in python

I am capturing outbound message from salesforce as a POST <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://...
1
vote
1answer
102 views

User Lock Out (Python/Beatbox)

I'm currently implementing a solution using python to bring in information via the Beatbox module for python. http://tomhayden3.com/2013/08/04/salesforce-python/ I got it to write successfully to a ...
0
votes
0answers
7 views

Problem connection this server with my discord bot

So I run into this Problem every time I try to connect my discord bot with this Server. Can anybody help me?(Problem shown in the following screenshot)
0
votes
1answer
28 views

Building Salesforce Applications using the Salesforce API

I am creating a salesforce deduping application using python. The issue I am running into is that deduping applications literally take hours to run through large databases. How do others execute ...
0
votes
0answers
22 views

Heroku 'log-runtime-metrics' will not Disable

I created a new application in order to host a discord music bot I created, however I keep getting a message like this message spammed in my logs every minute or so. heroku[worker.1]: source=worker.1 ...
0
votes
0answers
18 views

Create Activity and Automation through FuelSDK for Python

I was wondering if anyone has successfully been able to create Activity and Automation objects via Python FuelSDK. I can successfully start Automations but not sure what code to use to create an ...
0
votes
0answers
38 views

simple_salesforce bulk insert - Duplicate Id error

I am using the Python package simple_salesforce to bulk insert instances of a custom object. The custom object has Account Id as a foreign key, which I am inserting during the bulk insert. I'm seeing ...
0
votes
1answer
69 views

SSO authentication at API level

I am trying to automate a mobile application in my organization which uses SAML based SSO authentication to allow any user to login to the app. What I am trying to achieve is to perform an action in ...
0
votes
0answers
139 views

Getting change data capture events in Python

I am trying to figure out how to subscribe to streaming channel and get cdc events in Python, after success in creating new PushTopic and StreamingChannel. I saw some code examples in Java and NodeJS,...
0
votes
0answers
84 views

Why do not container upload to registry?

I read official heroku manual for deploy python-application via docker container: https://devcenter.heroku.com/articles/container-registry-and-runtime#getting-started I created app and going to step: ...
0
votes
0answers
393 views

Getting error while opening app in Heroku

I have deployed an application in python and django which is successfully deployed in Heroku. But when I am trying to open there it is showing error as below - After checking in logs it is showing ...
0
votes
0answers
50 views

Problem creating email in specific folder using python FuelSDK

I'm trying to create an email using the Python FuelSDK package and I'm getting the following error: Post Status: False Code: HTTPStatus.OK Message: Error Result Count: 1 Results: [(CreateResult){ ...
0
votes
0answers
46 views

How to fetch “bulk data loads” from salesforce using python and store it in postgres table?

How to fetch the number of record processed and number of record failed in salesforce using python. After a Bulk API upsert, how can i inspect the batch to find the count of record I am using the ...
0
votes
1answer
548 views

Getting error in Python when login to Salesforce

I am using simple-salesforce 0.74.2 for connecting to Salesforce by using below code, from simple_salesforce import Salesforce,SalesforceLogin sf = Salesforce(instance_url='https://xxxxx-xxx.my....
0
votes
1answer
194 views

Best way to retrieve tracking event from marketing cloud ? [Python]

Using FUELSDK library, We recently implemented our sync pipeline to sync data from our side into Salesforce marketing cloud. Now, the next thing that we would like to do is to fetch all tracking ...
0
votes
1answer
153 views

Is it possible to create a complex filter with additional operands in Python FUEL SDK?

I am able to create a somewhat complex filter in Python using FuelSDK from_filter = {'Property' : 'EventDate', 'SimpleOperator' : 'greaterThan', 'DateValue' : fromDate} to_filter = {'Property' : '...
0
votes
0answers
30 views

checking if an attachment already exist given custom object

I am using python code with the SalesforceBulkpy API to upload an image to a custom object. I want to make sure I only upload the image once so I thought on adding a check if an image exists before ...
0
votes
1answer
77 views

Python FuelSDK - feed a list to search_filter?

Is there a way to feed a list of values to an ET object search_filter so that it will match on any of the strings in the list? email_list = ['email1@gmail.com', 'email2@gmail.com', 'email3@gmail.com']...
0
votes
1answer
256 views

Running a python script to update accounts?

Sorry if this should be inherently obvious, but I'm a total newbie at SalesForce. I need to update a large number of customer accounts that we have in our system based off a .csv that I have locally ...
0
votes
1answer
59 views

Using Python API to Update Assets fails with CANNOT_EXECUTE_FLOW_TRIGGER

We have an asset object that has a child asset attached to it. We have a Process Flow that updates the AccountID and State of the child asset if the parent asset is changed (so the parent and child ...
0
votes
1answer
76 views

clickEvents numbers from API not matching WebUI

The number of click events I retrieve from the FuelSDK API does not match the numbers I'm getting from the webUI. The API is giving me a lower number of click events compared to the webUI (4688 vs ...
0
votes
1answer
38 views

Metadata API not working on sandboxs

I am trying to connect to the metadata Api via a python script. Essentially, I am authenticating into the SOAP Api, getting a session Id, then setting the session if in my Metadata client class. This ...