Auto-assignment examples

Example auto_assign request (3 surveys)

In this example, the user is being created with an auto_assign object containing three surveys.

  • One, Activity Interests (AI), will be assigned to the user.
  • One, also Activity Intersts (AI) will be assigned to the UUID of another user
  • The third, Time Actions (TA), is being assigned to the UUID of a group
     

Notes

  1. The third auto_assign object’s target is a UUID – the same as that being passed to the group_uuid parameter. Therefore the user is being made a member of that group – via the group_uuid parameter – and this will inform PfP to present the survey to the user in the context of “we/us/our“.
  2. The group_uuid parameter is optional.
    • Had it not been passed, and the user was not in the group specified in the auto_assign, the assignment would still take place (the user’s survey would be in the context of they/them)
    • Had it not been passed, and the user was in the group specified in the auto_assign, the assignment would still take place (the user’s survey would be in the context of we/us)

 

Structure of the auto_assign object in the above request:
[
    {
        "key":"AI",
        "target":"a32b8a23-5a35-4400-8d22-67233ebfd660"
    },
    {
        "key":"AI",
        "target":"95a643eb-6f52-4e78-9e7f-f151dff8fde2"
    },
    {
        "key":"TA",
        "target":"66a1fab1-2a24-4460-8036-7fb2e8925129"
    }
]
Example auto_assign response
{
    "message": "User created",
    "data": {
        "uuid": "3cab6bdf-d108-4392-aa95-0c85fb64fbe5",
        "sex": "F",
        "country": "NZ",
        "occupation": {
            "code": "1312",
            "name": "Aquaculture and fisheries production managers"
        },
        "member_of": {
            "name": "XYZ Example Corporation, Inc",
            "type": "Company",
            "uuid": "66a1fab1-2a24-4460-8036-7fb2e8925129"
        },
        "assignments": [
            {
                "assessment_key": "AI",
                "assessment_uuid": "1ee62557-46aa-4512-91cb-2f3d6d4d3e86",
                "assessment_context": "self (f)",
                "target_type": "person",
                "target_uuid": "3cab6bdf-d108-4392-aa95-0c85fb64fbe5"
            },
            {
                "assessment_key": "AI",
                "assessment_uuid": "897970d7-fcbb-42dc-8a84-99eae4d5ed8e",
                "assessment_context": "she",
                "target_type": "person",
                "target_uuid": "95a643eb-6f52-4e78-9e7f-f151dff8fde2"
            },
            {
                "assessment_key": "TA",
                "assessment_uuid": "284fa578-3880-4d6d-9a3a-386962486428",
                "assessment_context": "we",
                "target_type": "group",
                "target_uuid": "66a1fab1-2a24-4460-8036-7fb2e8925129"
            }
        ]
    }
}