I'd like to use CiviDiscount to create an automatic discount based on a custom data field on the contact record.

Looking at the options for the Automatic Discount, there is a field called "Specify api string for advanced filter" but when I put a value into this field and save, it isn't actually saved. I'm not sure if this is because the strong is wrong, or something else.

I was testing with a group value as this using the same advanced value that is used when creating contact reference fields:


1 Answer 1


There is an example here: https://github.com/dlobo/org.civicrm.module.cividiscount/blob/master/README.md

You need to specify the entity and format the api string as JSON.

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.