move-coop / parsons

A python library of connectors for the progressive community.
Other
254 stars 125 forks source link

[Feature/Addition] Add CampaignId to ngpvan apply_response() #1075

Open retacg opened 2 weeks ago

retacg commented 2 weeks ago

An org I am working with would like to be able to sync campaignId in a survey response sync into VAN myVoters. This just requires a small change to the apply_response method because campaignId is an available parameter in the canvass context of the canvass response endpoint (https://docs.ngpvan.com/reference/peoplevanidcanvassresponses)

Detailed Description

Add campaignId as an optional parameter in the ngpvan apply_response() method (https://github.com/move-coop/parsons/blob/d512faa4dde4d3ad6434be6c2fd5f05e66ab46d3/parsons/ngpvan/people.py#L578). It should be added as an optional argument in the function and thus added to the canvassContext portion of the json.

Context

Other users would be able to leverage this function to ensure campaigns are properly associated with canvassresponses when added to ngpvan

Possible Implementation

see detailed description

Priority

The member would like this implemented before the end of July so ideally it would be added to parsons before the end of June!!