Workarea Mail Chimp
MailChimp plugin for the Worakrea e-commerce platform
This plugin creates a basic integration between the Workarea platform and MailChimp's v3 API
It requires a mailchimp access token which can be generated by following MailChimp's OAuth2 Flow here: http://developer.mailchimp.com/documentation/mailchimp/guides/how-to-use-oauth2/
Scope and Dependencies
This plugin currently wraps functionality for subscribing and unsubscribing users by email, as well as retrieving interest groups (or categories) for users and lists
It is dependant on the gibbon rubygem which provides a basic wrapper for the MailChimp v3 API.
Add the gem to your application's Gemfile:
# ... gem 'workarea-mailchimp' # ...
Update your application's bundle.
cd path/to/application bundle
This plugin requires gateway configuration in order to function.
In your secrets file:
mail_chimp: :api_key: APIKEY :default_list_id: LIST_ID :list_preferences_id: LIST_PREFERENCES_ID
To find your default list ID, in the mailchimp admin:
- Go to the list you wish to use
- Click the settings dropdown menu
- Choose the 'List name and defaults' menu item
- You will find the List ID on this page, at the time of writing it is displayed at the top left of the page.
To find your list preferences ID via the API playground:
- Visit API playground
- Enter your API key
- Click on the 'Lists' Link
- Find the subresources dropdown for your default list
- Choose 'interest-categories' from the subresources dropdown
- Click the name of your interest group
- Use the ID field shown in the details section, the 'list_id' field should correspond with your default_list_id
Testing & Maintenance
Ensure that the gateway credentials within application secrets are set in
spec/dummy/config/secrets.yml for test mode
To get specs to pass, you will need to configure a MailChimp account with the following data
A group/category with the same information as what is configured in
A user that was unsubscribed with the following email:
A subscribed user with the following email:
The specs use VCR cassettes to record http requests, so maintainers will need to flush the cassettes when modifying the requests.
Workarea Commerce Documentation
See https://developer.workarea.com for Workarea Commerce documentation.
Workarea Mailchimp is released under the Business Software License