Skip to content
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

Campaign member tag not deleted #22

Open
mtuchi opened this issue Dec 10, 2024 · 1 comment
Open

Campaign member tag not deleted #22

mtuchi opened this issue Dec 10, 2024 · 1 comment
Assignees

Comments

@mtuchi
Copy link
Collaborator

mtuchi commented Dec 10, 2024

While following the Test Suite steps, we successfully removed a tag from a Contact on Mailchimp!
Step 1, "Delete member tag," was successful:
Log on the OpenFn platform: Success ✅
However, during testing of Step 2 (Campaign member tag not deleted) the job Get Deleted Campaign Members returned an error. Here’s what happens:
If there are no "Deleted Campaign Members" retrieved from the SF in the first query of the Get Deleted Campaign Members job, the workflow fails.
As a result, the second job, Remove Deleted Members Tags, does not run at all;
The odd part is the Input and Output tabs on the OpenFn platform;
We noticed that even when the query doesn’t fetch any data (Image 1), the Input (Image 2) and Output (Image 3) still display records;
Based on our Technical Diagram, this wasn’t supposed to happen, so I’m wondering if it could be related to the workflow failure (that is happening when NO "Deleted Campaign Members" are retrieved from the first job).
Can you help us to understand it, please?

@mtuchi
Copy link
Collaborator Author

mtuchi commented Dec 12, 2024

Quick update
I manage to figure out the workflow failure, @williandeavila it was related to the first query not returning contacts id that is why it was causing the second workflow to fail. I tidy up the implementation to handle such cases, below is the summary

  1. Clean up final state on the last job after the workflow run successfully. Return only lastSyncTime and lastRunTime

Each time a timed job succeeds, its final_state will be saved and used as the input state for its next run. That's why you were seeing all other data like contactsIdList, lastSyncTime, lastRunTime. You can learn more about cron triggers here

  1. Update edge condition to only run mailchimp step if we have data

Making sure the second job only runs if we have deleted campaign members

  1. I have added logic to run the second query only if we have contactsIdList and add few logs which can help during debug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant