systopia / de.systopia.twingle

CiviCRM Twingle Integration
Other
4 stars 2 forks source link

Example configuration for custom_fields #32

Closed MarcMichalsky closed 4 years ago

MarcMichalsky commented 4 years ago

Hello community,

I am trying for hours to get the custom_fields working. I am doing API calls via curl to our test server and apparently they are making it through.

I added "custom_fields":{"event":"773"} to the call and event=custom_393 to the custom field mapping. No error at all, but the value does not show up on the custom field.

Maybe someone could give me their configuration?

jensschuppe commented 4 years ago

Your configuration should be correct. For existing contacts, make sure the custom fields are in XCM's list of fields to fill, because otherwise they would only be set on contacts created by the Twingle API call. Also, the custom fields feature is only available since version 1.1.

N.B. The value depends on the custom field type. List fields (e.g. with option values as possible values) need to be passed as an array. Basically, the Twingle API is passing the custom field values to XCM, which is taking all values the Contact.create API understands. The same is true for custom fields on Contribution entities (passed to Contribution.create).