planningcenter / developers

Planning Center API docs and support
https://developer.planning.center/docs/
85 stars 8 forks source link

Webhook. New contact & 1 email address. Primary = false #1181

Closed philfbcnz closed 4 months ago

philfbcnz commented 4 months ago

Affected Product Which product does this bug affect? People

Describe the bug When I receive email created webhook requests for a brand new person that only has 1 email address, the primary value = false. I would have thought that since this is the only email address on the contact, it would come through as true.

To Reproduce

  1. Create a person.
  2. Give the person an email address.
  3. Receive HTTP webhook request = "name": "people.v2.events.email.created",

"data": { "type": "Email", "id": "94315501", "attributes": { "address": "testing123@walkers.nz", "blocked": false, "created_at": "2024-04-16T06:30:13Z", "location": "Home", "primary": false, "updated_at": "2024-04-16T06:30:13Z" }, "relationships": { "person": { "data": { "type": "Person", "id": "146365670" } } },

  1. Call API using command "https://api.planningcenteronline.com/people/v2/emails?where[address]=testing123@walkers.nz" Result: [ { "type": "Email", "id": "94315501", "attributes": { "address": "testing123@walkers.nz", "blocked": false, "created_at": "2024-04-16T06:30:13Z", "location": "Home", "primary": true, "updated_at": "2024-04-16T06:30:13Z" }, "relationships": { "person": { "data": { "type": "Person", "id": "146365670" } } }, "links": { "self": "https://api.planningcenteronline.com/people/v2/emails/94315501" } } ]

Expected behavior I would expect the primary value in the http webhook to = true, not false?

Screenshots image image image image

Additional Context:

I have..

gjack commented 4 months ago

Hey @philfbcnz,

Thank you for reporting this issue to us. I'll close it for now, but I'll pass this bug report to our team, and we'll look into it. We'll let you know when a fix has been put in production.