Skip to content

Instantly share code, notes, and snippets.

@matthutchinson
Last active August 19, 2022 14:36
Show Gist options
  • Save matthutchinson/162b2498a12218718d52fb7334b112c3 to your computer and use it in GitHub Desktop.
Save matthutchinson/162b2498a12218718d52fb7334b112c3 to your computer and use it in GitHub Desktop.

Booking Session Migration Process

Work packages

  1. Create a single booking session for the work package, using the work package's existing booking:
  • start/end from booking
  • platform from booking platform
  • location from booking location note
  • trainer from booking trainer
  • trainer cost from booking trainer cost

NOTE: No changes to any work package billings/invoices.

Coures without bookings

All courses must now have a booking. Some older Administrate courses currently do not have booking.

  1. If no booking exists, create a basic one (using same Administrate default booking settings. I.e. lynsey as account manager/client admin, existing Course Org or Emphasis Training Ltd. Org, Booking costs are 0 etc.)

Single-part AND multi-part courses

  1. Create a single booking session for each course part (if multi-part, assign these all to the first course part's booking).

For each session we create use:

  • start/end from course part
  • platform from course part's booking platform (if no platform set, use "In person" platform)
  • location from course part's booking location note (if empty, use course part's "City" field)
  • trainer from course part's booking trainer
  • trainer cost from course parts' booking trainer cost
  • cancelled and postponed state/notes from course part
  • trainer attendance confirmed true/false from course part
  1. Copy location address (previously location identified) checklist item (note/confirmed state/required) from course part to booking session.
  2. Move all course part enrolments to Booking Session (no changes to delegate enrolment items)
  3. Move all course sample batches back to first part of course
  4. Move all course uploads back to first part of course
  5. Update all counters on course, e.g. attended and analysed counts for pricing

Multi-part course/booking merging

In addition to the steps above, for multi-part courses, we merge attributes from (non-first) course parts back onto the first course part and its booking.

So the first course part and its related booking become the combined booking you see in EMP. Other (non-first) course parts are no longer accessible (they are hidden/archived, data is not deleted).

Course Merging
  1. All billings (and their invoices) from all parts are moved back to the first part and deduplicated (i.e. same invoice not showing twice)

NOTE: For single-part courses, there are no changes to billings/invoices.

  1. Trainer course feedback is moved from all parts, back to the first part.
  2. Course checklist item notes and confirmed/required states are merged like so:
  • if the item is "confirmed" in any part, its marked as confirmed
  • if the item is "required" in any part, its marked as required
  • if the item has notes in any part (and the note is different from the first parts note) append the note into the item (with a prefix i.e. "2nd session:")
  1. Combine "Exceptional notes" from parts. If any part exception note is different, append it to first part and add a prefix i.e. "2nd session:"
  2. Merge scheduled feedback settings like so:
  • if scheduled sending enabled is true on any later part, set true on first part
  • if a scheduled sending override is true on any later part, set true on first part
  • if different email feedback content is set on a later part, use that for the first part.
  1. Merge Client and Delegate JI emails

If a course part has a JI email, with previously sent emails, the move it to the first part if:

  • no JI email exists on first part OR
  • JI on first part has no previous sends OR
  • JI on first part HAS sends, but they are older than course part sends
Booking Merging
  1. If learning design required is set on any part, set it on first part.
  2. If CPD certified is set on any part, set it on first part.
  3. Combine all booking note fields (with prefix i.e. "2nd session") (learning design notes, ops notes, trainer notes, finance notes, background notes)
  4. Apply all prices/quantities/discounts like so:
  • For each of these, if set on any later booking part (i.e. > 0) then apply that cost to the first booking part.
  1. Apply other name/text fields (I.e. pre_course_writing_analysis_name, post_course_writing_analysis_name, subscription_name, subscription_period, additional_name client_purchase_order_number) like so:
  • For each of these, if they are set on any later booking part, apply that text to the first booking part.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment