Added Member Lead mutuation. Queries, Filters
We have added API endpoints to add,edit and get details of member leads.
Mutations:
- memberLeadCreate - To create Member lead
- memberLeadUpdate - To update Member lead.
- memberLeadContact - To move lead to contact status
- memberLeadProcess - To move lead to process status
- memberLeadRecruit - To move lead to recruited status
- memberLeadReject - To reject lead.
Queries:
- memberLeads - List all Member leads.
- memberLeadGet - To get details of particular lead.
Filters
lead_name, email, status, employement_status, home_lc_name, home_mc_name, created_via, referral_type, background_ids, employement_status, manager_ids, has_managers, status_last_updated_at
Timeline:
- created_at
- creator
- date_moved_to_contacted
- date_moved_to_in_process
- date_moved_to_recruited
- date_moved_to_rejected
- moved_to_contacted_by
- moved_to_in_process_by
- moved_to_recruited_by
- moved_to_rejected_by
Country and Alignment fields:
Use the following API to get the list of countries and the alignments. Which ever country is selected the respective mc_aligments has to shown in alignment field. When submitting the form, along with alignment_id selected the id inside lc object should also be sent in the request.
query{
mcsAlignments{
id
name
label
mc_alignments{
id
keywords
lc{
id
}
}
}
}
Added New API to check if the Lead is present. This is to be used in customer facing application. When the user enters the email id pass this argument to memberLeadCheckIfExists API endpoint. This will return either entity_not_found or entity_already_exists in response object for key name sub_code.
Note: We have added new types to constants. employment_status, preferred_mode_of_contact, academic_level, referral_type . Use the constants from these types in create, update and show for the following (employment_status_id, preferred_mode_of_contact_id, academic_level_id, referral_type_id) fields in Member Lead.
Checklist:
There are two mutations added to bulk create checklist and creating responses for the checklist.
mutation:
Add member_lead mutation with params id which should be the committe id.
mutation {
memberLeadChecklistQuestionBulkCreate(id: 1,checklist: [{
question_text: "Are you a volunteer updated",
description: "new updated description 1"
},
{
question_text: "Are you having a passport updated",
description: "new updated description 2"
}
]
){
id
description
question_text
question_type
survey
}
}
To add response use memberLeadChecklistResponseCreate with the params id, survey_id, and answers where member_lead id should be passed in id and survey id should be passed in survey_id
Eg:
mutation {
memberLeadChecklistResponseCreate(id: 1, survey_id: 10,answers: [{
question_id: 720,
answer: "true"
},
{
question_id: 718,
answer: "false"
}
]
) {
id
answers
survey {
id
survey_questions {
id
question_text
question_type
}
}
}
}
Queries :
To list all checklist question use the query getChecklistQuestion with params id where you should pass committe id
Eg:
query{
getChecklistQuestion(id: 1){
id
question_text
question_type
description
}
}
FrontEnd need to check the member_lead whether they have permission to create checklist_response, to check this there is a permission added inside member_lead types called can_fill_checklist which returns boolean value, if its return true then the frontend can allow the user to create response.