Created
March 4, 2020 22:01
-
-
Save danlynn/04445a0332e86c5a6bebd2b5fc519e36 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # statuses: | |
| # * Unclipped - Campaign has not been clipped yet | |
| # - only the full mass clip will update this status - not the test clips | |
| # - the show page hides the metrics and log | |
| # | |
| # * Clipping - Campaign is currently clipping the offers | |
| # - full mass clip AND test clips will set this status | |
| # - when full mass clip completes, status will update to Clipped | |
| # - when test clips complete, status will update to Test Clipped | |
| # - show the metrics and logs and run the ajax updates while in this state | |
| # | |
| # * Test Clipped - Campaign has been clipped to one of the test groups | |
| # | |
| # * Clipped - Campaign has been clipped to the full subscriber list | |
| # | |
| # * Exporting - CSV is being exported/uploaded to campaign monitor | |
| # | |
| # * Exported - CSV export has finished | |
| # | |
| # * Clip Cancelled - The 'Cancel Clip' button has been clicked | |
| # | |
| # * ERROR - Check the log for clip or export failures | |
| # | |
| # The 'export csv' button is disabled unless the metrics show > 0 successful | |
| # clips. The `subject_line` and `send_at` fields must also be filled-in in | |
| # order to perform the export/upload to campaign monitor. | |
| # | |
| # The 'clip xxx' buttons are disabled until subscribers have been uploaded and | |
| # offers have been selected. | |
| # | |
| # | |
| # subscribers: | |
| # Each campaign is associated with a campaign subscriber list. This list is | |
| # different from the campaign monitor subscriber list. The campaign monitor | |
| # subscriber list ID is stored in the auto clip campaign record so that it | |
| # knows where to upload the CSV after a mass auto clip. The auto clip | |
| # campaign subscriber list is the actual list of subscribers which the | |
| # campaign will attempt to clip the offers to during the mass auto clip. | |
| # | |
| # The campaign's subscriber list is held in a db table associated with this | |
| # specific campaign. Subscribers can be added to this list in two ways. There | |
| # will be an 'Add Program Members' button and 'Upload CSV' button. These | |
| # buttons can be clicked multiple times to add additional subscribers from | |
| # multiple programs and/or multiple CSV files. There will be a | |
| # 'Clear Subscribers' button to reset the list of subscribers associated with | |
| # this campaign. This list of subscribers is persistent until cleared. If a | |
| # mass clip has already been performed and there are metrics associated with | |
| # certain subscriber records then those records will be retained - but marked | |
| # with a deleted status (for metrics). | |
| # | |
| # offers: | |
| # Arbitrary offers can be associated with each campaign. These offers will | |
| # be clipped to every subscriber associated with the campaign during the mass | |
| # auto clip. An offer can be added by clicking a '+' button then entering | |
| # search criteria into 'tags' or 'title/desc' fields. Selecting an offer from | |
| # the search results will associate it with the campaign and display a | |
| # preview of the offer. Additional offers can be added in the same fashion. | |
| # Only offers which are currently active or will be in the future will appear | |
| # in the search results. Offers can also be individually deleted from the | |
| # campaign. | |
| # | |
| # clip target: | |
| # The clip target is a dropdown list that contains all of the test groups | |
| # and the "subscribers list". The test groups are defined in the | |
| # config/auto_clip.yml file under the 'test_groups' node. The "subscribers list" | |
| # item refers to the subscribers associated with this specific campaign. This | |
| # clip target dropdown controls which list will have offers clipped to them by | |
| # the 'Clip Campaign' button. | |
| # | |
| # Campaign Monitor API docs: | |
| # https://www.campaignmonitor.com/api/ | |
| # | |
| class Admin::AutoClipCampaignsController < ApplicationController |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The rest of the code is left out of this gist.