title: SalesForce Bulk API: Relationship between custom object and Account
body: <p>I have a custom object in SalesForce called Deal, which is a child of the built-in Account object.  I am trying to use the Bulk XML API to upload a batch of records, but I can't seem to figure out how to specify this relationship correctly.  From the documentation it says that you should reference a custom object's relationships like so:</p>
  
  <pre><code>&lt;Relationship__r&gt;
     &lt;sObject&gt;
        &lt;some_indexed_field&gt;#####&lt;/some_indexed_field&gt;
     &lt;/sObject&gt;
  &lt;/Relationship__r&gt;
  </code></pre>
  
  <p>If you have any idea how to specify a relationship to the Account object from a custom object I'd really appreciate it.</p>
  
  <p><strong>Added</strong></p>
  
  <p>The Deal object has the following 2 fields:</p>
  
  <ul>
  <li>DealID
  <ul>
  <li>API Name - DealID__c</li>
  <li>Data Type - Text(255)(External ID)(Unique Case Sensitive)</li>
  </ul></li>
  <li>Account
  <ul>
  <li>API Name - Account__c</li>
  <li>Data Type - Master-Detail(Account)</li>
  </ul></li>
  </ul>
  
  <p>Request XML:<br>
  <code>&lt;Account__r&gt;<br>
  &lt;sObject&gt;<br>
  &lt;ID&gt;0013000000kcWpfAAE&lt;/ID&gt;<br>
  &lt;/sObject&gt;<br>
  &lt;/Account__r&gt;</code></p>
  
  <p>Result XML:<br>
  <code>&lt;result&gt;<br>
  &lt;errors&gt;<br>
  &lt;message&gt;Field name provided, Id is not an External ID or indexed field for Account&lt;/message&gt;<br>
  &lt;statusCode&gt;INVALID_FIELD&lt;/statusCode&gt;<br>
  &lt;/errors&gt;<br>
  &lt;success&gt;false&lt;/success&gt;<br>
  &lt;created&gt;false&lt;/created&gt;<br>
  &lt;/result&gt;</code></p>