How to Manually Create a Booking Voucher

How to create a voucher booking manually via the Automation System

Manual Booking Voucher Creation

Steps to Create a Booking Voucher Manually

1. Prepare the List of Booking References

  • Collect the list of booking references you wish to process.

  • Convert this list into a JSON array format using a tool like wtools.io.

  • Example JSON Array:

    ["007-9812EF9039B", "007-9812EF9039A"]

2. Verify the Rule and Process

  • Check for the rule that is triggered by Voucher_Generation_Manual:

    • Go to the Rules Settings.

    • Confirm that the rule is set up to handle the Voucher_Generation_Manual event.

    • Ensure that the process you want to execute (e.g., Accommodation Voucher Generation) is correctly linked to this event.

3. Trigger the Event via API

  • Access the API Swagger page to locate the relevant endpoint.

  • Make a POST request to:

    https://live-api.nucotravel.com/services/automation/trigger-event/voucher-generation
  • Include your JSON array of booking references in the request body.

    • Example Request Body:

      ["007-9812EF9039B", "007-9812EF9039A"]
  • This endpoint will:

    • Iterate over the booking references.

    • Raise the Voucher_Generation_Manual event for each booking.

    • Allow the Event System to process these events using the configured rule.

4. Verify the Event Processing

  • Check the logs or dashboard in your event system to ensure the events were successfully triggered and processed.

5. Consider Updates (Optional)

  • Note that in the development environment, a recent PR has introduced three separate methods to replace /trigger-event/voucher-generation. These methods handle specific processes and their corresponding event types. If you're working in development or testing environments, refer to ServicesController.cs for details on these new methods.


Additional Notes

Discount Codes Updates

  • A new update allows viewing metrics like Average Profit Per Person and Average Discount Per Person (columns P & S) per discount code. Use this data to assess the effectiveness of your discount campaigns.

Last updated

Was this helpful?