-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to remove filter/ segmentation from campaign via API? #18
Comments
Hey @franz-josef-kaiser, apologies for the delay. At the moment it's not possible to delete or modify a segment that was used in a sent campaign - a However, we're working on optimizing the segmentation feature as we speak. One of the new functionalities we're working on is a soft-delete of a used contactfilter, which will basically mark it as Hope that helps :) Regards, |
Hi @adamyanliev , do you have any update on this as there passed some time? :) |
Hi @franz-josef-kaiser , sorry, there wasn't much development on this project - it was delayed to free up bandwidth for other projects. As soon as there's additional info, I'll post it here. Regards, |
Task
House cleaning to not end up in an unmaintainable state with left overs all over the place:
/contactfilter
resource/campaigndraft
resource(Note: This is a follow up during the work on #15 while testing setups).
Steps to reproduce
1. Create the filter
(optional) Install
jq
orjson_pp
(prefer the further) for human readable JSON output in the shellCreate a file named
mjkey
(w/o extension) and store nothing than the$APIKEY:$SECRET
, that you can find in the MailJet Webapp:https://app.mailjet.com/account/api_keys
Create a second file, named
filters-create.sh
and store the following contents:Create a contact meta data entry named
purchase
in the MailJet Webapp:https://app.mailjet.com/contacts/lists/properties
Create a file named
filter.json
with the following contents:Call the file in your CLI/ terminal/ shell like in the following example. Pipe the output to
jq
:Write down the Segmentation ID from the response (or query it via the API
GET
–request athttps://api.mailjet.com/v3/REST/contactfilter
later on).2. Attach the filter to a
/campaigndraft
resource– Create a file named
campaign-create.sh
with the following contents:– Create a file named
campaign.json
with the following contents and substituteContactsListID
with the ID of an existing contacts list and segmentation ID :3. Attempt to delete the filter again
List all filters. Create a file named
filters-list.sh
:Execute the file in your CLI
Response:
Delete the filter again: Create a file named
filter-del.sh
and add the following contents:Call the file in your CLI
Response:
Other attempts
I tried to remove the segmentation from existing
/campaigndraft
resources by updating the resource:The response was the following:
I then updated the
AXTesting
value as well:The response was the following:
Finally I tried to update the
/contactsfilter
valueStatus
tounused
:The response was the following:
Expected Outcome / Behavior
I expected to be able to do one of the following:
/contactsfilter
resource via the API and the connections/ dependencies/ links update themselves./contactsfilter
by ID and then be able to delete it.Questions:
The text was updated successfully, but these errors were encountered: