Built-in tool
Set a goal
Set or change a workspace goal: a target for a metric over a period, with the agent responsible.
Endpoint
Parameters
| Name | Type | Required | Note |
|---|---|---|---|
| namestring · optional | string | optional | Short name, e.g. 'Connection requests per day'. Defaults to the metric and period. Example: |
| notestring · optional | string | optional | Why this target, or who set it. |
| unitstring · optional | string | optional | For a reported metric: its unit, e.g. 'calls', 'comments', 'USD'. |
| endsOnstring · optional | string | optional | Last day, YYYY-MM-DD, e.g. the end of an 8-week test. Omit for an ongoing goal. Example: |
| goalIdstring · optional | string | optional | Change this goal. Omit to set the goal for a metric and period (an existing active goal for the same metric, period and Workflow is updated). |
| metricstring · optional | string | optional | What is counted. Measured by Connie: connection_requests_sent, connections_accepted, messages_sent, replies, positive_replies, accept_rate, reply_rate, positive_reply_rate, people_added, calls_booked, credits_spent (rates in percent). Any other name (e.g. 'post_comments', 'followers_gained') is a reported metric whose value you record with goal-report-progress. |
| periodstring · optional | string | optional | Over what the target counts: 'day', 'week' (Monday to Sunday), 'month', 'quarter', or 'total' (from startsOn to endsOn). One of: |
| statusstring · optional | string | optional | 'archived' retires the goal (with goalId). One of: |
| targetnumber · optional | number | optional | The number to reach, or the limit to stay under. Rates in percent (30 means 30%). |
| startsOnstring · optional | string | optional | First day, YYYY-MM-DD. Default today. |
| timezonestring · optional | string | optional | IANA time zone the days and weeks follow, e.g. 'Asia/Makassar'. Default UTC. Example: |
| directionstring · optional | string | optional | 'at_least' (reach it) or 'at_most' (stay under it, e.g. a spend limit). Default at_least; at_most for credits_spent. One of: |
| workflowIdstring · optional | string | optional | Count only this Workflow (campaign). Omit for the whole workspace. |
| ownerAgentIdstring · optional | string | optional | Agent responsible for the goal. Defaults to the agent calling. |