Hosted Scheduling Booking Error

When using the hosted scheduler in this form: Hosted Scheduling Pages | Nylas Docs

I am getting this error when trying to submit the booking when I pass in query params:

Create Booking Error
json: cannot unmarshal object into Go struct field CreateBookingRequest.additional_fields of type string

@Blag

Hello @sboynton Already requested some help on this one :slight_smile:

Hey @sboynton would you mind showing me what you mean by query params? Or add any screenshots you think might be relevant?
Thank you!

@antoine with the hosted configuration, I go to this link:

https://book.nylas.com/us/<client_id>/dummy_slug?name=sam&email=samsemail&phone_number=123

You can see that we navigate from our page to this page, and hope to pre-populate some fields based on information coming from our app… The boxes are properly filled in for us, but when we go to click ‘book now’ we get this error.

1 Like

In the above example, please assume my email is proper. That was just a poor example for that field, same goes for the phone number. Thanks

1 Like

@antoine another question we had during this implementation flow was… Is there a way to store some of our unique data on event bookings? We’ve seen references to additional_fields and metadata but have been unsuccessful in using them. In this flow for instance, if we wanted feed_id to be stored on the event, would it? In other words, where do the results of these custom fields get saved to? We’ve run some tests and are not seeing these values be populated onto nylas events. Thanks for the help :+1:

@sboynton thanks for raising this - I think what you’ve discovered is a legitimate bug. I looped in our engineers and they’ll be fixing it today, and releasing it in the coming days. Once the fix is released, I’ll be sure to comment here!

Regarding metadata, all additional fields are stored in the /booking objects - we are working to add that information to the GET /bookings response as it’s not returned currently. However, our webhooks do currently return that information (if you subscribe to booking.created webhooks). Notification schemas | Nylas Docs

I should mention that additional fields are currently displayed in the confirmation emails we send to guests and hosts!

@sboynton just upgrade the version of web-elements or nylas-react whatever you are using it will fix the issue

I’m on the latest version, and on acceptable node version. It also shouldnt have any effect since we are using their hosted version

@antoine any update on this bug fix? It is currently halting our workflow.

@sboynton the fix should be released today!

2 Likes

@antoine Thanks, I can confirm this works and helps a lot. Just another question… is there a way to force the additional fields to be read only or hidden. In v2 we were able to but it seems like v3 might have changed to disallow this. In this example we would pre-populate the fields below email and keep them hidden or read-only

This is what we want for v3. Any help?

@blag Would you mind taking a look at my question above? Thanks a lot

Sure thing @sboynton Let me nudge the right people :wink: