# Create User Goal

Use the `createUserTracker` mutation to set personalized goals for the user across all available trackers.

### **Required Arguments**

<table data-header-hidden><thead><tr><th width="201.33333333333331">Argument</th><th>Type</th><th width="271.7804878048781">Note</th></tr></thead><tbody><tr><td>Argument</td><td>Type</td><td>Note</td></tr><tr><td><code>tracker</code></td><td>TrackerComponent!</td><td><p>All trackers available in Suggestic.</p><p><br>enum TrackerComponent {<br>BLOOD_PRESSURE_TRACKER<br>DAILY_MOOD<br>DAILY_RECAP<br>EXERCISE_TRACKER<br>FOOD_LOGS<br>FOOD_LOG_MEAL_TRACKER<br>HEART_RATE_TRACKER<br>HRV_TRACKER<br>HYDRATION_TRACKER<br>MP_MEAL_TRACKER<br>MY_CHECKLIST_TRACKER<br>PLAN_SUPPLEMENT<br>PLAN_SUPPLEMENTS_MY_CHECKLIST<br>SLEEP_QUALITY_SCORE_TRACKER<br>SLEEP_TIME_TRACKER<br>STEPS_TRACKER<br>TODAY_FOOD<br>TODAY_SUPPLEMENT<br>WEIGHT_TRACKER<br>}</p></td></tr><tr><td><code>goal</code></td><td>Float</td><td>Sets new goal for selected tracker ex. <code>20000</code> steps.</td></tr><tr><td><code>source</code></td><td>SourceType</td><td>Source of input, <strong>default</strong> is set to <strong>SUGGESTIC</strong>.  enum SourceType {<br>APPLE<br>FITBIT<br>GARMIN<br>GOOGLEFIT_NATIVE<br>GOOGLEFIT_REST<br>HEALTHCONNECT<br>HUAWEIHEALTH<br>IHEALTH<br>MISFIT<br>OMRONCONNECT<br>OMRONWELLNESS<br>OURA<br>POLAR<br>SAMSUNG<br>STRAVA<br>SUGGESTIC<br>SUUNTO<br>WITHINGS<br>}</td></tr></tbody></table>

### **Available Fields**

<table data-header-hidden><thead><tr><th>Field</th><th width="249.33333333333331">Type</th><th>Note</th></tr></thead><tbody><tr><td>Field</td><td>Type</td><td>Note</td></tr><tr><td><code>success</code></td><td>Boolean</td><td><strong>true:</strong> If the tracker goal has been created successfully. Otherwise, it displays <strong>false</strong></td></tr><tr><td><code>message</code></td><td>String</td><td>The message returns either if the goal has been created or not.</td></tr><tr><td><code>tracker</code></td><td>UserTracker</td><td><a href="/pages/YfDR6rqHyROTCOwqzRKJ">User tracker.</a></td></tr></tbody></table>

### Example <a href="#example" id="example"></a>

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

```graphql
mutation {
  createUserTracker(input: {
    tracker: STEPS_TRACKER
    goal: 20000
    source: SUGGESTIC
  }) {
    success
    message
    tracker {
      id
      tracker
      goal
      source
    }
  }
}
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "createUserTracker": {
      "success": true,
      "message": "User tracker successfully created",
      "tracker": {
        "id": "VXNlclRyYWNrZXI6MQ==",
        "tracker": "STEPS_TRACKER",
        "goal": 20000,
        "source": "SUGGESTIC"
      }
    }
  }
}
```

{% endtab %}
{% endtabs %}

Default goal

<figure><img src="/files/kWrzu4LrKZSJ71lszclm" alt=""><figcaption><p>Default Goal</p></figcaption></figure>

New custom goal

<figure><img src="/files/UdIEvt3zy9tvmjLjYuyd" alt=""><figcaption><p>New Goal</p></figcaption></figure>


---

# 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/query/mutations/tracking/user-tracker-goals/create-user-goal.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.
