Repository navigation
🐛 Source Facebook Marketing: Add statuses filters - #32449
Anatolii Yatsuk (tolik0) merged 24 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
Before Merging a Connector Pull RequestWow! What a great pull request you have here! 🎉 To merge this PR, ensure the following has been done/considered for each connector added or updated:
If the checklist is complete, but the CI check is failing,
|
e9daa94 to
4fc52c2
Compare
M. Marx (marcosmarxm)
left a comment
There was a problem hiding this comment.
Hello Siarhei Ivanou (@iSINUS) thanks for the contribution and patience. I'll run tests and return with any update during the week.
|
Hi, M. Marx (@marcosmarxm)! Is there any update? |
|
Hi, M. Marx (@marcosmarxm)! Is there any update? |
|
I asked to the team make the final review. I'll ask again, sorry the delay Siarhei Ivanou (@iSINUS) ! |
Serhii Lazebnyi (lazebnyi)
left a comment
There was a problem hiding this comment.
Need change fields to enum and follow to braking change procedure (M. Marx (@marcosmarxm))
| if self._cursor_values: | ||
| result_state = {account_id: {self.cursor_field: cursor_value} for account_id, cursor_value in self._cursor_values.items()} | ||
| result_state["include_deleted"] = self._include_deleted | ||
| result_state["filter_statuses"] = self._filter_statuses |
There was a problem hiding this comment.
We need avoid braking change and if user has included_deleted parameter use it.
There was a problem hiding this comment.
The main idea of the change is to avoid single option to do not process deleted and have specific statuses for streams.
So there will be no changes from our side.
There was a problem hiding this comment.
I understand the main idea, but for users who have already set up synchronization, this will be a breaking change, requiring them to reconfigure their connections.
We aim to avoid this inconvenience. Therefore, let's revise the logic so that if the include_deleted parameter exists, we will utilize the old logic. However, if the filter_statuses list is set up, we will exclusively use this list.
There was a problem hiding this comment.
It is breaking change - who do not need new functionality should stay on older version. I will not over-engineer for backward compatibility. The issue will be if both parameters are set, but filter_statuses exclude "DELETED" - it will require additional explanation to user (should we include deleted in such cases?) - not straight forward behaviour.
| if self._cursor_values: | ||
| result_state = {account_id: {self.cursor_field: cursor_value} for account_id, cursor_value in self._cursor_values.items()} | ||
| result_state["include_deleted"] = self._include_deleted | ||
| result_state["filter_statuses"] = self._filter_statuses |
There was a problem hiding this comment.
I understand the main idea, but for users who have already set up synchronization, this will be a breaking change, requiring them to reconfigure their connections.
We aim to avoid this inconvenience. Therefore, let's revise the logic so that if the include_deleted parameter exists, we will utilize the old logic. However, if the filter_statuses list is set up, we will exclusively use this list.
|
Siarhei Ivanou (@iSINUS) Hi, could you grant me permission to push changes to your branch? I'd like to add my fixes and then merge your PR. Thanks! |
Anatolii Yatsuk (@tolik0) Hi! I have no rights to repo with branch, person who has is on vacation today. Will ask tomorrow. Thank you! |
Anatolii Yatsuk (@tolik0) Done. Now you should have access. Please, take into account that you have removed AdCreative status, but it is required - https://developers.facebook.com/docs/marketing-api/reference/ad-creative/ |
…book-marketing-statuses
|
Siarhei Ivanou (@iSINUS) Hello. The |
Anatolii Yatsuk (@tolik0) OK. Thank you. |
Co-authored-by: Anatolii Yatsuk <tolikyatsuk@gmail.com>
What
Add status filters to source connector Facebook Marketing for streams Campaigns, AdSets and Ads (#32421).
Remove option "include_deleted" as it from older versions of Marketing API and operates with not actual fields and values.
New config UI looks like:

How
Updated the specification and stream filtering. State migration was implemented to ensure no disruptions for users. The
include_deletedoption is now mapped to all possible statuses and is still retained in the stream status for backward compatibility.Recommended reading order
x.javay.python🚨 User Impact 🚨
If user are interested in getting "deleted" stream data it is required to update configuration and set desired statuses ("ARCHIVED", "DELETED") per stream. To match the behaviour with
include_deletedfrom the previous version, all possible statuses should be selected.Previous version of code worked not really correctly (there is no field
delivery_infoby which it was filtered and statuses used in code were in lower case and not correct for current Marketing API version).Incorrect current version call:
/adsets?filtering=[ { "field": "adset.delivery_info", "operator": "IN", "value": [ "paused" ] }]New version call:
/adsets?filtering=[ { "field": "adset.effective_status", "operator": "IN", "value": [ "PAUSED" ] }]