---
title: "userEngaged(_:visibleSuggestions:interaction:)"
framework: corespotlight
role: symbol
role_heading: Instance Method
path: "corespotlight/csuserquery/userengaged(_:visiblesuggestions:interaction:)"
---

# userEngaged(_:visibleSuggestions:interaction:)

Notifies the system that someone engaged with a specific text completion in your app’s interface.

## Declaration

```swift
func userEngaged(_ suggestion: CSUserQuery.Suggestion, visibleSuggestions: [CSUserQuery.Suggestion], interaction: CSUserQuery.UserInteractionKind)
```

## Parameters

- `suggestion`: The suggestion that someone chose.
- `visibleSuggestions`: The set of suggestions your app was displaying.
- `interaction`: The type of interaction with the item. Use this parameter to indicate whether the person selected the item or interacted with it in another way.

## Discussion

Discussion When someone selects or interacts with a specific text completion suggestion in your app’s UI, call this method to tell Spotlight about the interaction. Reporting this type of engagement helps Spotlight deliver better suggestions more quickly in future queries. It also improves the ranked results Spotlight delivers to your app. The system keeps all information about these interactions on the current device.

## See Also

### Improving the quality of ranked results

- [userEngaged(_:visibleItems:interaction:)](corespotlight/csuserquery/userengaged(_:visibleitems:interaction:).md)
- [CSUserQuery.UserInteractionKind](corespotlight/csuserquery/userinteractionkind.md)
