# Read Query Param by Key

## Goal

Extract a specific query parameter value from the incoming link using `queryKeys` + `queryValues`.

## Actions Used

* `DeepLinkServicesOnUniversalLinkOpen` **or** `DeepLinkServicesOnCustomSchemeUrlOpen` (listener, persistent)
* `DeepLinkServicesGetUniversalLinkResult` **or** `DeepLinkServicesGetCustomSchemeResult` (extractor)

## Variables Needed

* queryKeys (Array: String)
* queryValues (Array: String)
* value (String) (example: campaignId / token)

## Implementation Steps

1. On listener `receivedEvent`, call the matching `Get*Result` action to populate `queryKeys` and `queryValues`.
2. Find the parameter:
   * Use PlayMaker Array actions to loop `i = 0..queryKeys.Length-1`
   * If `queryKeys[i] == "campaign"` then set `value = queryValues[i]`

## Example URLs

* Universal: `https://game.com/promo?campaign=summer2024`
* Custom scheme: `myapp://oauth-callback?token=xyz`

## Notes

`queryKeys` and `queryValues` are parallel arrays; use the same index for both.


---

# 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://assetstore.essentialkit.voxelbusters.com/features/deep-link-services/playmaker/use-cases/use-case-4-query-param-by-key.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.
