PipeDrive Client PHP doesn't update custom field value for person

We have created a custom field using “Data Fields” for Person which name is “Contact Address” and Now we are trying to create a person using php-client(GitHub - pipedrive/client-php: Pipedrive API client for PHP) api with custom fields. Custom fields are not updating values to the Contact Address(custom field) when trying to create person. only custom field value not updating to the person.

please refer the code of what we implemented.

Updated the customfield as below also. but the value is still not updating.

I have exactly the same problem which makes the whole PHP library pretty much useless to me unfortunately. Is there really no way to add custom field data?

We never really received any updates for this issue. We have already switched to another software and completed the project.

Hey!

The problem here lies in the fact that the intermediate step of creating a $new_person = new NewPerson($userData) will lose the custom fields. The model can only handle the fields that are listed in our API reference.

Currently, the solution here is to skip this step and add the person data straight to the addPerson function: addPerson($userData).

There is also an open issue in github about it and you can find more examples there. We’ll investigate this further from our side and let’s see whether we can:

  • make the model work with all the fields or
  • update the code examples in the docs to reflect the working solution