# Adherence

The `adherence` object contains details about an item's [Adherence Score](/graphql/start-here/core-concepts/adherence-score.md).

You may find this object in a [recipe](https://docs.suggestic.com/graphql/query/queries/recipes/recipe-by-id) and in a [menuitem](https://docs.suggestic.com/graphql/query/queries/restaurants/menu-item-by-id).

### List of Fields

| Field           | Type           | Note                                                                                                                           |
| --------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `score`         | Float          | Item's score. From 0 to 100.                                                                                                   |
| `color`         | adherenceColor | <p>Possible values: </p><p><code>Blue</code>, <code>Yellow</code>, <code>Red</code>, <code>Green</code>, <code>Grey</code></p> |
| `icon`          | Icon           | Possible Values: `Cross`, `Unknown`, `Alert`                                                                                   |
| `title`         | String         | General recommendation about the item                                                                                          |
| `reason`        | String         | List of matching rules that define the score                                                                                   |
| `isRecommended` | Boolean        | **False** if the item falls outside of a user's program rules or personal preferences and restrictions                         |

### Considerations

* A score of 0 can be caused by no match between a program's rules and the ingredients in the recipe or menu item. i.e. if a program has a single rule like "increase tomato" and the recipe has no tomato in it, then the item scores 0 for that program.
* Meaning of colors
  * Green: high score, recommended item
  * Yellow:  medium score, recommended item
  * Red:  low score, not recommended item
  * Grey: not enough information to calculate a score
  * Blue: may contain ingredients not allowed by the program or the user's restrictions
* Meaning of icons
  * Cross: associated with the color red. This item is not recommended.&#x20;
  * Unknown: associated with the color blue. Not enough information to calculate a score.
  * Alert: associated with the color blue. May contain ingredients not allowed by the program or the user's restrictions.

### Example

{% tabs %}
{% tab title="Query" %}

```graphql
{
  recipe(id: "UmVjaXBlOmFmMDkzMjQ0LWZkZTMtNGE3Yy1iMTA4LWUxODExNTBkNmNiZQ==") {
    name
    author
    adherenceDetails {
      score
      color
      icon
      title
      reason
      isRecommended
    }
  }
}
```

{% endtab %}

{% tab title="Results" %}

```graphql
{
  "data": {
    "recipe": {
      "name": "Tropical Storm Detox Shake",
      "author": "Dr. William Davis",
      "adherenceDetails": {
        "score": 0,
        "color": "RED",
        "icon": "CROSS",
        "title": "Outside of your program and/or restrictions.",
        "reason": "It contains: sweetener",
        "isRecommended": false
      }
    }
  }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.suggestic.com/graphql/objects/common/adherence.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
