1

I'm trying to use CiviRules in WordPress to create a new Case for contact records using a Field Value Comparison (when a custom data field "is not empty").

My test cases are confirming that the rule is executing and certain other rule Actions are being applied (e.g. adding the contact to a Group), but the Case is not being created on the Contact record.

There is a log entry that is added each time the rule executes that I believe is related to why the Case is not being created, but I am not sure how to interpret it.

It's an error message that says Rule: 'Test Rule' with id xx failed for contact xxxxx because of Failed to execute action.

For more detail, here is the Context section of the error message:

(
    [rule_title] => Test Rule
    [original_error] => Civirules could not fund case: Expected one Case but found 0. API call: Case.getsingle with params: contact_id="xxxx", case_type_id="3", status_id="1"
    [reason] => Failed to execute action
)

Any insight that can be provided about places to look for additional information or things I possibly may not have configured properly would be very helpful.

1
  • Hello, Rainer. Did you ever get a resolution to this issue? I've encountered the exact same error as you.
    – gillenpj
    Commented Jul 26, 2023 at 16:44

1 Answer 1

1

I would debug the Field Value Comparison (class CRM_CivirulesConditions_Generic_ValueComparison and function isConditionValid) to check if the condition is OK.

What CiviRules action are you using to create the case?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.