# Setup In-App Surveys

In-App Surveys let you show surveys (including app rating) to users. You can show surveys automatically or manually, get the list of available surveys, check if the user has responded, and customize behavior.

* [Targeting Surveys](https://docs.luciq.ai/kmp/setup-luciq-for-kmp/setup-in-app-surveys/targeting-surveys) – How surveys are targeted (dashboard) and `getAvailableSurveys`
* [Customizing Survey Behavior](https://docs.luciq.ai/kmp/setup-luciq-for-kmp/setup-in-app-surveys/customizing-survey-behavior) – Welcome screen, auto-show
* [In-App Surveys Callbacks](https://docs.luciq.ai/kmp/setup-luciq-for-kmp/setup-in-app-surveys/in-app-surveys-callbacks) – `onShow`, `onDismiss`, and handlers
* [Disabling/Enabling In-App Surveys](https://docs.luciq.ai/kmp/setup-luciq-for-kmp/setup-in-app-surveys/disabling-enabling-in-app-surveys) – Turn surveys on or off

### Show survey if available

Shows a survey when one is available for the user based on targeting rules:

{% code title="Kotlin" %}

```kotlin
SurveysKmp.showSurveyIfAvailable()
```

{% endcode %}

### Show a specific survey

{% code title="Kotlin" %}

```kotlin
SurveysKmp.showSurvey(token = "SURVEY_TOKEN")
```

{% endcode %}

### Check if user has responded

{% code title="Kotlin" %}

```kotlin
scope.launch {
    SurveysKmp.hasRespondedToSurvey("SURVEY_TOKEN").collect { hasResponded ->
        if (!hasResponded) SurveysKmp.showSurvey("SURVEY_TOKEN")
    }
}
```

{% endcode %}

### Get available surveys

{% code title="Kotlin" %}

```kotlin
scope.launch {
    SurveysKmp.getAvailableSurveys().collect { list ->
        // list: List<Survey>
    }
}
```

{% endcode %}
