Polymorphic & Relationship Fields I'm trying to insert a task via Bulk API and providing the below csv headers, but getting Malformed_ID error.


What should be the correct headers for Owner, WhoId and WhatId if I want to use the relationship fields ?

1 Answer 1


So -- the values in the rows be used for insert

  • Task.WhatId should be the Case.Id (i.e. starts with 500...)
  • Task.WhoId should be a Contact.Id (i.e. starts with 003...)
  • Task.OwnerId should be some User.Id (i.e. starts with 005...)

What you are trying to do is upsert a task using external Ids to identify the parent (CaseNumber for the Whatid). caseNumber is not an external Id field.

Same issue with FederationId for the OwnerId. If you look at the metadata for that field, it is not marked as an ExternalId

  • I want to use the User's Federation Id for updating the owner, similarly I want to use the CaseNumber on the case instead of caseId.
    – Sid
    Commented Dec 10, 2019 at 14:32

You must log in to answer this question.

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