## Extension targets The Discounts Allocator API exposes the following [targets](/docs/apps/build/app-extensions/configure-app-extensions#targets): | Target | Output type | Description | | ------ | ----------- | ----------- | | `purchase.discounts-allocator.run` | [FunctionRunResult](#functionrunresult) | Outputs a list of discounts allocations that should be applied to the cart | ## Input The `RunInput` object is the complete schema that your function can receive as [input](/docs/apps/build/functions/input-output#input). For a list of fields that the Shipping Discount API's `Input` object accepts, refer to [Input](/docs/api/functions/reference/discounts-allocator/graphql/input). ### Input Example The following example shows an input query:

The following example shows the resulting input to the query:

## FunctionRunResult The [`FunctionRunResult`][FunctionRunResult] object is the expected [output](/docs/apps/build/functions/input-output#output) for the `purchase.discounts-allocator.run` target. [FunctionRunResult]: /docs/api/functions/reference/discounts-allocator/graphql/functionrunresult ### Result Example The following function result includes two line discounts: