### How do I manually update a booking?

104
views
0
3 months ago by
For example, how to set a booking to FAILED_CONFIRMATION or CANCELLED?

0
3 months ago by
As an example, let's suppose we need to set a booking to FAILED_CONFIRMATION. The first thing is to update the Booking….
...
"bookerId": "3bf32ff4-9339-4a5b-88d4-949e4627d1eb",
"bookingDatesItem": {
"confirmedDateTime": "2017-08-17T12:45:19.540+0000",
"confirmingActionUserId": "3bf32ff4-9339-4a5b-88d4-949e4627d1eb",
"confirmingDateTime": "2017-08-17T12:44:46.308+0000",
"createdDateTime": "2017-08-17T12:44:42.958+0000"
},
"channelReference": "GB779063000",
"currentState": "CONFIRMED",
...

You need to add a line similar to
"failedConfirmationDateTime" : "2017-08-22T13:05:00.000+0000"​

into the bookingDatesItem object. This then makes the Booking into FAILED_CONFIRMATION state.

To manually cancel a booking, update these fields:
"cancelledActionUserId"
"cancelledDateTime"
"cancellingActionUserId"
"cancellingDateTime"​

You will normally use the id of the booker.

You then need to update CloudSearch so it reflects that state, by sending a message like this to the travel-event SQS queue on prod/uat as appropriate:
{"Subject":"travel.BookingUpdatedEvent","Message":"{\"bookingId\":\"xxx\",\"principal\":\"xxxxxxxxxxxxxxxx\"}"}​

You need to update the bookingId and principal attributes to be the correct values (principal should be the bookerId from the booking in question).

Also send an event to update the reporting_booking table in redshift:
{"Subject":"travel.UpdateReportingEvent","Message":"{\"bookingIds\":[\"xxxxxxxxx\"]}"}​

Finally, send the details to IntOps of what you’ve done so that they can check if they need to do anything on their end (Go to the #int-ops-support channel and post to @int-ops). You may also like to inform Pioneer through one of their support channels.