make curl request from mautic campaign's condition events

20 Views Asked by At

I am making this plugin that will implement custom condition, actions and decisions. Being specific, 'conditions' is all needed for now. But these conditions require data from remote server to evaluate.
Initially tried making local checks (within the body on condition callback). the condition callback is being called for each contact. like 80% condition pass and 20% condition fail. but using API to perform the same check from that same function. That condition only executes for once and the API is also called for once. The result also says 100% success for all contacts from the segment.
Expected behavior is that, the API should be called for each contact. That specific condition should have executed for each contact. Resulting in 80%pass and 20% fail on condition check.

I again tried using local condition check which worked well again. but as soon as i try using API for condition check it just doesn't work the same way.

Is it being caused by using curl in symfony environment? If yes, is there other where around because i have to manage the Bearer tokens as well.

TL;DR I want to make 'API calls' to remote server from Mautic Campaign with custom Conditions, Decision and Action.

0

There are 0 best solutions below