Skip to main content

Fields

A condition compares one field of an entity with one or more values. Which fields you can use depends on the alert's type.

The dashboard lists the fields in the condition editor. Through the API, GET /v2/businesses/{business}/alerts/fields returns every field with its value type, the operators it accepts and, where relevant, its allowed values.

Value types​

Each field has a value type, which decides the operators it accepts and how its values are written. Values are always sent as strings.

Value typeHoldsExample valuesOperators
numberA number"2", "0.5", "-0.2"eq neq in not-in gt gte lt lte between exists not-exists
textFree text, matched by words"burnt pizza", "burn*"contains-any contains-all not-contains exists not-exists
enumOne of a fixed list"google"eq neq in not-in exists not-exists
enum-listSeveral of a fixed list"complaint"contains-any contains-all not-contains exists not-exists
idThe ID of an object, such as a location"loc_…"eq neq in not-in exists not-exists
id-listSeveral IDs"rcat_…"contains-any contains-all not-contains exists not-exists
booleanYes or no"true", "false"eq

Survey submissions (survey)​

FieldTypeDescription
locationidThe location the submission was made at.
surveyidThe survey the submission answers.
statusenumcompleted, or abandoned when the customer left part way.
step.ratingnumberThe rating (1 to 5) given on a smileys step. Needs step.
step.metricsid-listThe metrics picked on a metrics or staff metrics step. Needs step.
step.texttextThe text written on a comment step. Needs step.
commenttextThe text written on any comment step.
lowestRatingnumberThe lowest rating given on any smileys step.
staffid-listThe staff members the submission is about, including those picked on staff steps.
menuItemsid-listThe menu items rated on menu steps.
lowestMenuItemRatingnumberThe lowest rating given to any menu item.
riskScorenumberThe submission's fraud risk score (0 to 100), once calculated.
hasMediabooleanWhether the customer attached an image or audio recording.
hasCustomerbooleanWhether the submission is linked to a customer, i.e. they left contact details.

Fields starting with step. read one survey step, so their conditions must name the step's ID in step. A submission only ever answers one survey, so the step must belong to the survey in the alert's scope. See Contradictions.

tip

Use lowestRating for "any bad rating anywhere in the survey" and step.rating when one question matters, such as "Overall experience".

Submissions where the customer recorded their answers by voice are checked once Harlyy has transcribed them, so conditions on their answers work too.

Reviews (review)​

FieldTypeDescription
locationidThe location of the reviewed listing.
listingidThe reviewed listing.
platformenumgoogle, food-panda or chowdeck.
ratingnumberThe star rating (1 to 5).
contenttextThe review's title and text.
sentimentenumThe overall sentiment of the text: positive, neutral, negative or mixed.
categoriesid-listThe topics mentioned anywhere in the review, such as food quality or hygiene.
negativeCategoriesid-listThe topics of the review's negative or mixed sentences, i.e. what the customer complained about.
hasReplybooleanWhether you've replied to the review.
customerNametextThe reviewer's name.

Harlyy analyses a review's sentiment and topics shortly after receiving it, and checks the review again once it has. So an alert on negativeCategories still matches, just a few seconds later.

tip

negativeCategories is the most reliable way to catch a theme like hygiene. It's labelled sentence by sentence, so "the toilets were filthy" counts even if the review never says "hygiene". Combine it with a few phrases on content to catch both. See the hygiene example.

Social mentions (social)​

FieldTypeDescription
platformenumfacebook, instagram or tiktok.
documentTypeenumpost, reel or comment.
contenttextThe caption or comment text.
intentsenum-listWhat the author wants: lead, question, praise, complaint, health & safety or feedback.
sentimentenum-listThe sentiment of each mention of your watch targets. On your own accounts, every mention counts.
watchTargetsid-listThe watch targets mentioned, such as your brand, a menu item or a staff member.
ownAccountbooleanWhether it was posted on, or in reply to, one of your connected accounts.
authorHandletextThe author's handle.
languageenumThe language it's written in, as a lower-case ISO code such as en or ur.
countryenumThe country it was posted from, as an ISO code.
likesnumberLikes when it was analysed.
commentsnumberComments when it was analysed.
sharesnumberShares when it was analysed.
viewsnumberViews when it was analysed.

A post reaches your social alerts when it's on one of your connected accounts, or mentions a watch target you follow in your country, the same rule as Social Listening. Engagement counts are taken when Harlyy analyses the post, not updated afterwards.

Competitor reviews (competitor-review)​

FieldTypeDescription
competitorListingidThe competitor listing reviewed.
platformenumgoogle, food-panda or chowdeck.
ratingnumberThe star rating (1 to 5).
contenttextThe review's title and text.
sentimentenumThe overall sentiment of the text.
categoriesid-listThe topics mentioned anywhere in the review.
negativeCategoriesid-listThe topics of the review's negative or mixed sentences.

Competitor ratings (competitor-listing)​

FieldTypeDescription
competitorListingidThe competitor listing whose rating changed.
brandidThe competitor's brand.
platformenumgoogle, food-panda or chowdeck.
ratingnumberThe new average rating.
previousRatingnumberThe rating before it changed.
ratingChangenumberHow much it changed: negative when it dropped, e.g. -0.2.
reviewCountnumberThe competitor's total number of reviews.

Each rating change is checked once, when it happens. A competitor whose rating keeps falling can notify again on every drop.

Competitor alerts only see the competitors you track in your reputation settings.

Missing values​

A field can be missing. For example, a review may have no text, or a submission's risk score may not be calculated yet. When it is:

  • exists doesn't match and not-exists does.
  • Negative operators (neq, not-in, not-contains) match, because a missing value isn't the excluded value.
  • Every other operator doesn't match.

So "rating is not 5" matches a review without a rating. Add rating exists if that's not what you want.