PATCH Constituent Custom Fields?

I'm working on a database sync project between NXT and Hubspot. Is it possible to update custom fields for an existing constituent using the SKY API? 

I realize that the documentation limits PATCH requests to a certain number of fields, but I'm curious if there's a workaround to fields like religion,hubspot_id, etc.


Thanks! 

Comments

  • Hi Filipp,


    If you mean you want to edit an existing Constituent Custom Field - as in one on a Constituent, not the Custom Field itself - then I believe you can use the PATCH Constituent Custom Field endpoint to do so. However, as you say, you're limited in what you can do.


    For example, you can't change the Type of the field from, say, Date to Text or Boolean to Number.


    So if you had a Custom Field such as


    Id: 2345

    Parent Id: 280

    Category: Current Board Member

    Type: Boolean
    Value: True

    Date: 2020-01-01 00:00:00

    Comment: Previously a member of XYZ's board.


    Date Added: 2020-01-01T13:14:15
    Date Modified: 2020-01-01T13:14:15


    then only the fields in blue can be changed (and the field in orange is updated automatically).


    In your question you mention changing particular Custom Fields such as Religion and HubSpot ID but I expect that these are probably categories that have been set up in your own environment. If you wanted to change these for a particular Constituent - eg change Religion to Divine Affiliation - you would either have to delete Religion and add Divine Affiliation if it already exists as a category, or, if you were looking to replace the Religion category with Divine Affiliation globally, you would need to rename the Custom Field Category from "Religion" to "Divine Affiliation" which would change this on all records with a Religion Custom Field. (You would restricted on what else could be changed.)


    I hope that helps.

    Steve Cinquegrana | CEO and Principal Developer | Protégé Solutions

     
  • Steven Cinquegrana:

    Hi Filipp,


    If you mean you want to edit an existing Constituent Custom Field - as in one on a Constituent, not the Custom Field itself - then I believe you can use the PATCH Constituent Custom Field endpoint to do so. However, as you say, you're limited in what you can do.


    For example, you can't change the Type of the field from, say, Date to Text or Boolean to Number.


    So if you had a Custom Field such as


    Id: 2345

    Parent Id: 280

    Category: Current Board Member

    Type: Boolean
    Value: True

    Date: 2020-01-01 00:00:00

    Comment: Previously a member of XYZ's board.


    Date Added: 2020-01-01T13:14:15
    Date Modified: 2020-01-01T13:14:15


    then only the fields in blue can be changed (and the field in orange is updated automatically).


    In your question you mention changing particular Custom Fields such as Religion and HubSpot ID but I expect that these are probably categories that have been set up in your own environment. If you wanted to change these for a particular Constituent - eg change Religion to Divine Affiliation - you would either have to delete Religion and add Divine Affiliation if it already exists as a category, or, if you were looking to replace the Religion category with Divine Affiliation globally, you would need to rename the Custom Field Category from "Religion" to "Divine Affiliation" which would change this on all records with a Religion Custom Field. (You would restricted on what else could be changed.)


    I hope that helps.

    Steve Cinquegrana | CEO and Principal Developer | Protégé Solutions

     

    Hi Steve, thanks for your input. In this particular instance, "Religion" is a custom field that I have created for a constituent in Raiser's Edge, and the goal of this project is to be able to modify the value of that custom field for a given constituent using an API call. Am I able to do that through a patch request?

  • Short answer: Yes, I believe you should use the PATCH Constituent Custom Field endpoint.

     
  • Thanks again for your help Steve - but I'm still a little lost. How do I identify in the PATCH call which constituent I want the field to be updated for?
  • You'll need to get the list of Custom Fields per the Constituent you're interested in then use the Custom Field ID to pass in the PATCH call.

     

Categories