In order to sync qualifications, PLAY calls/members/member-qualified
with the params
organisation_id: // office externalid period_id: // from a seasonId mapped using `syncprovider.meta` qualification_type: // default to OFFICIAL last_updated_at: // date/time specified
Play then loops over the response.member
and looks for member_qualification.qualification.qualification_category
. It then creates the QualificationCategory
in PLAY if it doesn't exist.
It then loops over response.member -> member_qualification
again and parses the SID qualification:
{ participant: { firstName: member.first_name, lastName: member.last_name, HCRId: member.unique_identifier, externalId: member.member_id, tenantId, }, seasonId: member_qualification.period.start_date (parsed), level: member_qualification.qualification_level.display_order, notes: member_qualification.memo, expiry: member_qualification.expiration_date (parsed), officeExternalId: member.organisation.organisation_id, categoryExternalId: member_qualification.qualification_category.qualification_category_id externalId: member_qualification.member_qualification_id, isDeleted: result.deleted_at != null, }
WILL NOT GET SYNCED IF:
level
is undefinedseasonId
is undefinedif can’t find the office in PLAY with the
officeExternalId
if its
isDeleted