Auto-assignment parameters

In addition to the basic assignment POST parameters, if, during user creation, you wish to automatically assign assessments to the user, you must POST two additional parameters

auto_reserve: This flag stands in as a purchase confirmation, and is required if auto_assign is being requested. Value must be 1
auto_assign: Optional; if passed, must be a valid JSON object with the following structure:

Handling of auto_reserve

Your organisation may already have more unused surveys in reserve than are needed in the auto_assign phase of user creation (this can be achieved via the explicit use of surveys/reserve. In this case PfP will apply these unused surveys to the auto-assignment, before auto-reserving more to fulfil the order.

For example.

You have 5 surveys in reserve already.
You create a user and wish to auto_assign 7 surveys to the user.

Promana will
  • use the 5 surveys you already have in reserve (leaving you with none in reserve, and leaving the user still in need of two more assigned surveys)
  • auto-reserve two more surveys
  • auto assign the surveys to the user, leaving you with no surveys in reserve, but a user who has a fully supplied assignment
  • Structure of auto_assign depends on contract

Your organisation will be using the PfP API under a particular type of contract. Depending on whether or not your contract provides for a revenue sharing arrangement, you will need to populate the auto_assign JSON with one of two structures.

Parameter options for contract types: