Survey Gizmo

A mailer, member database, and so much more, for digital activism.

Survey Gizmo

Identity can pull surveys responses from your Alchemer (previously Survey Gizmo) account and log these as actions against your members. In addition, it can log the individual answers to questions that they have made, and make these available to be searched. Note - you can only use the Alchemer API if you’re on a Professional plan or higher.

To enable this you simply need to add the following settings:

In your environment variables: ALCHEMER_ACTIVATED: true ALCHEMER_API_KEY: your API key ALCHEMER_API_SECRET_KEY: your API secret key ALCHEMER_REGION: your region - can be ‘ca’, ‘eu’ or ‘us’. Defaults to ‘ca’

Alternatively, you can make changes in your org’s settings file. In settings/your-org.yml: external_services.alchemer: true alchemer.pull_activated: true alchemer.api_key: your API key alchemer.region: your API secret key alchemer.api_secret_key: your region - can be ‘ca’, ‘eu’ or ‘us’. Defaults to ‘ca’

If you’re on the right plan, you can get an API keys by going to Security > API Access in your Alchemer account.

When initially enabled, the integration will pull in survey responses up to a year in the past. After that it will only gather responses newer than the most recent response which is already saved. The sync is run immediately on app startup and every 2 minutes after that.

Connecting to members

The identity Alchemer integration will only store survey responses which include an email type question, this is so the answers can be linked with a member record. Surveys without email questions and responses where the email question is left blank are ignored. All survey answers are saved as “MemberActionData”, email is the only question type applied directly to the member record.

Testing

If you’re not sure if the integration is working yet, the simplest way to check is to check if any Alchemer member actions have been created, you could use this query in a rails console:

> Action.where(technical_type: 'alchemer_survey').count

If you have survey responses saved, you can use the “Has given answer to Survey question(s)” (AKA survey-answer) search filter to gather members who gave certain answers.

Backfill

If you wish to pull in Alchemer responses more than a year old, or the integration has been improved and you wish to re-import older responses, you can run the sync manually starting from any point in the past. Be warned, while identity makes every effort to record actions idempotently, where formatting or naming have changed you may end up with duplicate survey answers. Here’s example code pulling all responses in the last 2 years:

ExternalSystems::IdentityAlchmer.pull_all(2.years.ago)