I am using Salesforce API via Beatbox Python. I wrote SOQL queries using beatbox and fetching the response. But the order of fields in request and response are not the same. For example sample query I wrote

Request: Select Name, BillingCity, BillingState From Account

Response Fields Order Actual: BillingCity, BillingState, Name

Response Fields Order Expected: Name, BillingCity, BillingState


2 Answers 2


I don't believe this is something you will be able to change unless you reorder your SOQL and hope for the best. If you believe that this is an issue, you should post your concern under the issues tab in github under the project for Beatbox. this seems like a behavior that originates from the library itself, not your soql or Salesforce.

You can always try to get debug logs from the requests sent to Salesforce.

fyi: using simple salesforce's library, the same SOQL returns in the expected order.


You need to check this with Beatbox, because SOQL will return results in the exact same order which you have written in the query.

Beatbox internally might be doing some changes on the results like the field name should be in ascending order

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .