# Activity Output Branching

## **Using activity outputs for branching**

Using this branching type, you -**the teacher, get to create "conditions" or use scores from activities and map these to branches.**&#x20;

### Creating activity output branching

This involves basing the branching decisions from the output of a particular activity - that is, output from an activity based on what the learner has contributed.

Some activities may have specific conditions (such as the number of correct responses for an [Assessment](/lams/tools/assessment.md)), and most activities support **Text-based conditions**, where LAMS can make branching decisions based on certain words that a student has or has not typed into an activity.

The [Q\&A](/lams/tools/q-and-a.md), [Forum](/lams/tools/forum.md), [Survey](/lams/tools/survey.md), [Chat](/lams/tools/chat.md) and [Notebook](/lams/tools/notebook.md) activities all support these branching conditions.

There are two key concepts involved in Tool-Based branching: **Conditions** and **Mappings**.

* **Conditions** are a way of grouping learners by their performance in the relevant activity. For example, a condition may be based on whether a student has answered all questions in an assessment correctly or not. Conditions can also be text based though and teachers can create these text-based conditions as best fit their needs.
* **Mappings** describe which Condition sends learners to which branch. Once LAMS determines which Condition the student is a part of, the Mapping is used to send that student to a particular branch.
* A particular Condition may only be mapped *to* a single branch, but a single branch may have **several different** conditions mapped to it.

Here's an example on how to use the score of an assessment activity to determine which branch the student should go to.

{% embed url="<https://www.youtube.com/watch?v=QADD4msFtgo>" %}
Creating a branching where teachers assign students to branches based on the output of an assessment
{% endembed %}

### Creating conditions for branching

All [LAMS activities](/lams/tools/activities-and-tools.md) produce an output type that can be used for branching. For instances the [Assessment activity](/lams/tools/assessment.md) by default gives you the following outputs to create conditions:

* Average score&#x20;
* Best score
* First score
* Number of attempts
* Time taken (in seconds)
* Last total score

But also, Assessment can provide you with the output for an specific question -giving you the possibility to further enhance the adaptability.&#x20;

In text based activities, like this [Q\&A](/lams/tools/q-and-a.md), you can create your own conditions:

![Creating conditions to later use in branching in Q\&A](/files/j4Ad840HUpv3G4MiVDXb)


---

# 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.lamsfoundation.org/lams/tools/branching/activity-output-branching.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.
