Closed 1v4n4 closed 6 months ago
@destag
Here are the instructions on how to set up the MTT campaign, I'm not sure how deep you need to go into it at this moment, each of these steps needs further explanations and possibly authorizations (ask for help). The last two are important.
You can use a test campaign
"id": 751, "name": "remove_targets_test", "org": { "name": "ftsq", "title": "Fix the Status Quo" }, "title": "Remove targets"
and widget
"actionpage": 3490
, preview page https://widget.proca.app/d/remove_targets_test/ftsq/en/index.html?proca_test (adding
?proca_test` at the end of the URL puts the widget in test mode).
What email do you use for proca setup? I think you need to be a part of FTSQ org to be able to access/change this campaign (will send you an invitation)
Add a campaign using mutation, proca cli, or the dashboard (I added remove_targets_test under FTSQ organization)
Add MTT settings and letter text to campaign configuration (“config”), our example:
{ "config": { "component": { "email": { "counter": true, "field": { "message": { "required": true }, "subject": { "required": true } }, "filter": [ "country" ], "listUrl": true, "salutation": false, "selectable": true }, "loader": { "appendLocale": true, "json": true, "url": "https://ep2024_citizen_votepalestine.proca.app/" }, "register": { "actionType": "email", "button": "action.email", "field": { "comment": false, "country": false, "lastname": true, "locality": true, "postcode": { "required": false } } } }, "journey": [ "Email", "Share" ], "layout": { "template": "ep2024.html" }, "locales": { "en": { "common:": { "selectAll": "Select all", "target": { "missing": "Select at least one out of {{total}}" } }, "letter:": { "part-1": "", "part-2": "", "part-3": "", "part-8": "Thank you for your support.\n{{name}}", "subject": "" } } }, "portal": [ "LoaderAsync" ] }, "id": 751, "name": "remove_targets_test", "org": { "name": "ftsq", "title": "Fix the Status Quo" }, "title": "Remove targets" }
Run Snowflake Engine – an app (https://github.com/fixthestatusquo/snowflake_engine) that randomly generates the message from “letter” keys in the "config", and we fetch that message from the widget.
Text example uses API from the Vote for Palestine campaign (“url” key in “config”, https://ep2024_citizen_votepalestine.proca.app/
)
The last two steps are about target management (same as the issue) it would be important to understand
The test campaign uses a few ep2024 real targets, 11 from source/ep2024_citizen_votepalestine. They are here https://widget.proca.app/t/remove_targets_test.json
@tttp, please add/change if I'm not making sense.
User story: as a campaigner, I want to be able to stop sending emails to a target (for instance if they said they will do what we want or aren't working there anymore)
right now for safety reasons, the api
has a parameter replace=true mode that tries to remove the targets that were on the server but aren't sent in the targets parameter if and only if there aren't any real (non test) action/message associated with the target
this is good to prevent data loss, however it has proved its limitation and we need to be able to remove targets even if they had messages
We need to be able to "soft delete" a target that has messages, ie:
We can either have new api call[s] (eg deleteTarget[s] ) or add an extra param/mode on the upsertTargets (eg. forceDelete) that will soft delete the target AND soft delete the messages/actions. I'd prefer the second option
to soft delete a target, a solution - is to be able to change the target's email status to "canceled". In that case, it will automatically prevents any pending emails/actions to be processed further
We have these email statuses now:
We probably should modify the actions too to explicitly show they will never be processed (processing_status) to be investigated further