Hello!
I am trying to figure out how I can implement custom targeting logic.
(1) I want to do some numerical logic.
Example: i have an attribute called “cartTotal”.
I want to target cartTotal to be greater than 100.
(greater than, less than, equal, etc.)
(2) I want to target a date value.
Example: i have an attribute called “lastPurchaseDate”
I want to target lastPurchaseDate to be equal to a certain date. Am I able to add a date picker for this field?
Is this possible? Can I create a plugin for this? I am not able to find any examples for this custom targeting and custom values.
Thank you!
Hi @applechips , welcome to the forum! Have you checked out custom fields? I think that may be a better option for the field types you need. They will be available on the data
object for your content and you can query off of them. Try it out with our interactive API explorer here!
@ancheetah thank you for your help!
i was wondering could i achieve something similar using: Extending Builder.io with Plugins - Builder.io ? would i be able to create a custom type editor for targeting? if so, what is the location name i can use to surface this up when adding custom targeting? i only see options like editor.mainTab
but none for targeting.
thanks again!
No problem! Yes it is possible to create custom types and you can read more about it in the link below. Please note that this feature is only available for enterprise plans.