Skip to content

Conversation

@NirTatcher
Copy link
Contributor

@NirTatcher NirTatcher commented Nov 29, 2025

feature: adding surveys methods/endpoints support in ActionNetwork module (https://actionnetwork.org/docs/v2/surveys)

issue-addressed: 1592 - #1592

What is this change?

Enable surveys support in the ActionNetwork module (https://actionnetwork.org/docs/v2/surveys).
Related to open issue #1592

Considerations for discussion

How to test the changes (if needed)

python -m pytest test/test_action_network/

@github-actions
Copy link

github-actions bot commented Nov 29, 2025

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  parsons/action_network
  action_network.py 1805
Project Total  

This report was generated by python-coverage-comment-action

@bmos
Copy link
Contributor

bmos commented Dec 3, 2025

Dupe of #1646?
Amazing timing 😯

@NirTatcher
Copy link
Contributor Author

NirTatcher commented Jan 1, 2026

Dupe of #1646? Amazing timing 😯

I guess it is! Wow I completely missed this PR (guessing we worked on that in parallel - when I started to work on the changes there were no existing PR to add surveys).
However, in the other PR I can definitely notice a small issue:
We do this:

if background_processing:
            payload["action_network:background_processing"] = background_processing

        return self.api.post_request("surveys", data=json.dumps(payload))

Meaning, we add the background_processing param to payload and it is usually being done by a query param in url (see other mrthods in the ActionNetwork connector) + according to the docs Surveys operations does not support background processing.
image

@bmos Please let me know what do you think we should do? Should I delete the PR and we can have @matthewkrausse handle the changes?

@bmos
Copy link
Contributor

bmos commented Jan 2, 2026

The documentation in the other pull request seems a little more complete, but otherwise I tend to lean towards yours?

@shaunagm
Copy link
Collaborator

Can we add a commit to this PR copying the documentation for Matthew's PR to this one? Then I can merge this.

@NirTatcher
Copy link
Contributor Author

NirTatcher commented Jan 23, 2026

Can we add a commit to this PR copying the documentation for Matthew's PR to this one? Then I can merge this.

Hi @shaunagm, after carefully reviewing the docs in ActionNetwork, I can see it says:

image

See here (under creating a new survey POST endpoint): https://actionnetwork.org/docs/v2/surveys

So I think that Surveys in ActionNetwork are one thing but ones created using the API (what we are doing) are behaving differently as they mention above.
Also, the doc string I used for documenting is copied from ActionNetwork's example for the POST method
image

@bmos @shaunagm What do you think?

@bmos
Copy link
Contributor

bmos commented Jan 23, 2026

I think you are confusing the request for documentation with inline code documentation?
I'm talking about the rst file which only covers one of the methods you are introducing.

…ng unnecessary method create_survey_with_creator (we can just ust the create_survey function), updated inline doc string in create_survey function to show we can create a survey with specifying a creator
@NirTatcher
Copy link
Contributor Author

I think you are confusing the request for documentation with inline code documentation? I'm talking about the rst file which only covers one of the methods you are introducing.

Got it, thanks for clarifying!
I added all an example on how to call all methods to the .rst file for ActionNetwork, I removed a function that we did not really need (create survey with creator, it's the same like create_survey), updated the inline doc string for create_survey to have an example on how to create with a creator.

Please let me know if anymore changes needed!

"title": "My Free Survey",
"origin_system": "FreeSurveys.com"
}
created_survey = an.create_survey(survey_payload)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be worth including what created_survey looks like?

see created_tagging above

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants