Animal groups
What this page helps you do
Section titled “What this page helps you do”Animal groups organise a working cohort without changing an animal’s identity. Use them to manage explicit or rule-based membership and, where applicable, breeding-male exposure for the correct animals.
Open Livestock → Animals → Groups to organise animals into logical cohorts. An animal can belong to more than one group. A group is not necessarily a physical pen: use farm pen management for housing, and groups for collections such as a milking line, treatment cohort or mob.

Who can use it
Section titled “Who can use it”Every farm role can read the group list, group details and member roster. Creating or editing a group, changing manual membership, refreshing an automatic group and managing breeding-male periods require the relevant animal-management authority, normally a Farm Owner or Manager. A rule-based group’s membership remains read-only even for those roles because the saved rule owns it.
Group list and creation
Section titled “Group list and creation”Each card shows Name, Code, group type, membership count and optional capacity. An Auto badge means a rule-based group; a warning badge means its last refresh failed and membership may be frozen at the last successful refresh. Open a card for its roster and actions. The list has page and page-size controls (25, 50 or 100).
With permission, click New group and enter:
| Control | Accepted value and effect |
|---|---|
| Group Name | Required, 1–200 characters. The form suggests a code from this name until you edit the code yourself. |
| Group Code | Required, 1–50 characters. The suggestion converts the name to uppercase letters/numbers separated by hyphens and stops at 20 characters. Farmlync trims and stores the final code in uppercase. It must be unique among undeleted groups on this farm. |
| Group Type | Optional catalogue choice such as Batch, Milking line, Treatment or Custom. The available options come from the application catalogue. A physical Pen is managed separately. |
| Capacity | Optional whole number at least 1. The detail page displays count/capacity. |
| Hand-picked | Default: you manage animal membership yourself. |
| Rule-based (auto) | Membership follows an FQL filter of at most 2,000 characters. The server validates the rule. Matching animals join and stop matching animals leave on refresh; manual add/remove is unavailable. |
| Create Group / Cancel | Save the definition or leave without creating it. Creating a group does not move animals into a physical pen. |
The example SCC > 250 AND DIM > 30 illustrates FQL syntax only; use Herd Queries to check a real rule against your data before saving.
A dynamic membership rule is one animal-list FOR condition. It cannot contain BY, SORT or an explicit LIMIT, and it cannot refer to GROUP membership because that would make the rule depend on the set it is changing. Summary commands such as COUNT, SUM, AVG, TREND and BREAKDOWN are not membership rules. Farmlync validates this shape and the live farm references before creating the group.
Creation saves the definition and attempts its first refresh immediately. A temporary refresh refusal does not remove the new group: its card/detail shows a warning and the background refresher tries again. Automatic groups are then reconsidered by a scheduled sweep approximately every 10 minutes, so a changed animal fact is not guaranteed to change membership instantly.
Inside a group
Section titled “Inside a group”Open cohort in register takes you to Animals list filtered to this group. Edit Group changes its name/type/capacity and, for an existing rule-based group, its FQL rule. Group Code is shown read-only after creation because reports and selectors use it as the stable identifier. The current edit form cannot turn an existing hand-picked group into rule-based; create a new rule-based group when that is required.
An edit can detach a dynamic rule while keeping the current members as a hand-picked group. Detaching clears the saved rule and its refresh status, and future membership becomes manual; read the warning before saving.
For a hand-picked group, Add animal opens a selector. Select one or more animals, set In group since to the actual membership date and save. The date matters when a breeding male ran with the group, because exposure can be used to attribute later natural services. A row’s Remove action asks for confirmation; it ends current membership but preserves historical attribution. A rule-based group’s member roster is read-only.
For a rule-based group, Refresh now recomputes membership from the saved FQL rule. Read the joined/left result or error. Farmlync also reports animals skipped because they have exited. A failed or truncated evaluation records a warning and leaves the complete previous membership in place; it never applies a partial match set. Do not interpret the visible count as the current rule result until refresh succeeds.
The Breeding males card records periods when a male was with the group. Put male in selects a breeding male, In with group from date and optional notes. Pull out enters Out of group on. Deleting a period removes that exposure record, so review downstream breeding history first. A dynamic group cannot be used as a breeding mob for new exposure because its membership can change automatically; old periods remain visible for review.
After any change, open the group’s roster and the filtered Animals list to verify the intended members. Membership does not itself record heat, service, treatment or movement.
Delete a group safely
Section titled “Delete a group safely”The Farm Portal group page does not contain a delete action. An Owner or Manager can find it under Admin → Farms → open the farm → Animal Groups → Delete. Farmlync asks for confirmation and then removes the group from normal lists.
Before deleting:
- Open the group and remove all hand-picked members, or detach/resolve an automatic group and clear its roster.
- Close or remove breeding-male periods only when the farm record genuinely requires that correction.
- Confirm that reports, feed plans, work instructions and staff no longer rely on the group code.
- Delete it from the farm’s Admin detail page.
The current delete command soft-deletes the group definition without checking for current membership or breeding-male exposure records. Those records are not presented for cleanup after the group disappears from normal selectors. Treat deletion as final configuration cleanup, not as the way to empty or retire an in-use cohort.
Manage all memberships for one animal
Section titled “Manage all memberships for one animal”On an animal record choose Manage beside its group chips, or use Add to group when no memberships exist. The Manage Groups panel edits the animal’s complete set of manually controlled memberships in one save.
| Control | What to enter or check |
|---|---|
| Memberships | Existing memberships appear as chips. Choose Add a group… to add another hand-picked group; select the X on a chip to remove it. An animal can be in several groups, up to 200 desired memberships in one request. |
| Auto chip | Identifies a dynamic-group membership. Its FQL rule controls that membership, so it cannot be removed or added in this panel. Edit or refresh the group rule instead. |
| In group since | Appears when at least one new group is selected. It defaults to the farm’s current date and applies to every newly added group in this save. It cannot be in the future. If it predates the animal’s farm entry, Farmlync anchors it to the entry date. |
| Save Changes | Atomically adds and removes the selected hand-picked memberships. It is disabled when nothing changed. The confirmation states how many were added and removed. |
| Cancel | Closes without changing the memberships. |
Removing a chip ends the active membership interval; it does not erase the animal’s earlier membership or breeding-exposure history. An exited Sold, Culled or Deceased animal can be removed from a stale group but cannot be added to a new one.
Add several animals to one group
Section titled “Add several animals to one group”Select animals in the Animals list or animal-selection window, then choose Add to Group. This action adds the selected animals to one manually managed group. It does not replace their other memberships.
| Control | What to enter or check |
|---|---|
| Selected count | Read-only number in the heading. The action accepts 1–500 distinct animals. Reduce a larger selection before submitting. |
| Destination group * | One hand-picked group on the selected farm. Dynamic groups are omitted because their rules own membership. If the farm has no manual groups, create or convert one before continuing. |
| In group since | Farm-local date when these animals actually joined the group. It defaults to today and cannot be in the future. The same date is applied to every successful animal. |
| Add n Animal(s) | Adds all selected active animals. An animal already in the group is left unchanged and counted as successful. |
| Cancel | Closes without adding any membership. |
The batch can partially succeed: an animal missing from the farm or already in a terminal state fails while valid animals are saved. The message gives success and failure counts. Refresh the group roster and Animals list to identify unchanged animals before retrying; the successful additions already exist.
Only Owners and Managers with animal-management authority can save manual membership changes. Farmlync Support cannot alter a group while its membership is evidence for a breeding-male exposure period; a farm user must make that change.
Why the membership date matters
Section titled “Why the membership date matters”A breeding-male period and an animal’s group-membership interval can overlap. Farmlync can use that overlap when attributing a natural service. Backdating every selected animal to the same approximate day can therefore create misleading exposure evidence. Use the actual day each animal joined; split the work into separate batches when the dates differ.

