### How do i manually change the status of booking in pioneer

75
views
0
5 months ago by
For example, how to set a booking to CONFIRMED or CANCELLED?

0
5 months ago by

The first thing is to update the booking status in the relevant pioneer table.

If you just have a travel booking ID i.e. 100002583 search for this record in the travel.pbPersistence to get the corresponding sfsBookingId i..e T100920

Now update the status of the pioneer booking by going to the relevant table, sfs-trains.bookings in this example.
Change the status to what is required (CANCELLED in this case - see below ).
-  Note: the different allowed statuses can be found in the doc:

...
"id": "T100920",
"previousBookingId": null,
"previousCouponId": null,
"product": {
"bookingReference": "34BX8HN8",
"channelErrorMessage": null,
"errorCode": null,
"status": "CANCELLED",
...

Now a BookingUpdatedEvent needs to be fired so travel can update the booking on their end.

Send a message as shown below to the travel-event SQS queue with the pioneer booking id of the updated booking.

  "Subject": "sfs-trains.BookingUpdatedEvent",
"Message": "{\"id\":\"T100920\",\"flag\":\"false\"}"
}