Sendy Mail List Spec
- Using rails to get member groups from kdan cloud
- Using gem Sequel to access sendy mysql db
Story
- Need a one-time promotion mail list creater.
- Need to do a/b testing on a certain event.
- Should not bother opt-out users.
- Should not sent to mark-as-spam users.
- Should not sent to invalid email address.
Features
To create list
- prefix: [ZCR]
- manually enter description
To add subscriber into list
- member_center
- from_application (member.from_application)
- comfirmed (member.confirmed_at)
- location (member.identity.location)
- language (member.identity.language)
- iap_service
- app_series (receipt.product.app.app_series)
- pack (receipt.product.pack)
- platform (receipt.product.app.device)
- subscription_status (kdan.subscriptions)
- A/B Testing
- Main version %, default 100%
To prevent unsubscribed, bounced, complaint emails into the list
- Unsubscribe flag should be considered as global
To delete list
Models
Member Center
Member
add_column :members, :sendy_sub_status, enum: [:active, :unsubscribed, :bounced, :bounced_soft, :complaint]
Schedule.rb
- update :sendy_sub_status every 15m
- select subscribers.timestamp > 15.minutes.ago
IAP Service
Kdan
has_many :subscriptions, class: 'KdanPackSubscription'
KdanProduct
has_many :subscriptions, class: 'KdanPackSubscription'
KdanPackSubscription
- only apply to following packs
- Creativity 365
Creativity 365 Teacher & Student
- Document 365
Creativity 365 Education
Creativity 365 Business
Document 365 Volume Licensing
belongs_to :kdan
belongs_to :kdan_product
{
kdan_id:integer,
pack_id:integer,
stauts:[free_trial, active, expired, refund, cancel]
}
- free_trial: Subscription is in free trial period.
- active: Subscription is active now.
- expired: Subscription is expired now.
- cancel: Auto-renew canceled but current subscription not changed.
- refund: Auto-renew canceled and current subscription rollbacked.
- status priority: active > free_trial > expired > cancel > refund
Schedule.rb
- update KdanPackSubscriptionStatus every 15m
- select updated receipts in 15min
- select expired receipts in 15min
CR System
SendyMailList
{
description:string,
sendy_list_long_id:string,
sendy_list_short_id:integer,
select_criteria:json,
active_count:integer,
unsubscribed_count:integer,
bounced_count:integer,
bounced_soft_count:integer,
complaint_count:integer,
sendy_delete_at:datetime,
}
Views
CR System
Select Criteria
- member_center
- from_application
- comfirmed
- location
- language
- iap_service
- app_series
- pack
- platform
- subscription_status
- A/B Testing
- Main version %, default 100%
Search Result
Going to Build up Sendy list [Go]
- List Name: [ZCR] my list
- List Count: 100
- List Content:
- kdan_id, email, from_application, comfirmed, location, language, app_series, pack, platform