Calculate Campaign Processing %

AHK

Active Member
Hello,
Like if we goto
/backend/campaigns/index
We can see each campaign processed % in Status Column, I Want to know how to calculate this % in my own query & which Tables are used ?

@VVT , @Vpul Shah , @Lakjin, @OptiBiz1 May be some one from you did it already, or we can ask @twisted1919

Thanks
 

twisted1919

Administrator
Staff member
@AHK - You can use the number of subscribers in a certain list (mw_list_subscriber table) and the number of emails sent so far for a campaign (mw_campaign_delivery_log).
 

AHK

Active Member
Hello @twisted1919,
Thanks for update I did that but the issue is if some list have segment then result is wrong...
How to fix this segment issue , as segment have many operators and conditions...
If you could help me with YII query or SQL query, it would be great
Thanks
 

twisted1919

Administrator
Staff member
@AHK - We already have defined functions to do this, have a look at apps/customer/components/behaviors/CampaignStatsProcessorBehavior.php Line 680.
If a campaign uses a segment, you can count the subscribers in that segment using $campaign->segment->countSubscribers()
 
Top