Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Auto assignment behavior:
POST https://text.berniesanders.com/autoassign with JSON body:
{ "slack_id": "USDF201", "count": 500 }
Possible responses include:
401: Unauthorized
500: No user found with slack id USDF201
500: There are no campaigns left to assign a tester to
200: { "numberAssigned": 500 or less }
Behavior beyond auth / user existing:
If there are no campaigns with unassigned contacts, throw an error!
If there are no campaigns with more that
count
texts left unassigned, assign this texter the number of unassigned texts in the campaign with the most unassigned texts (getting closest to the requested amount).Else, of the campaigns with more unassigned texts than
count
, choose the one that has the smallest proportion of its texts assigned.