# `Sp_Ai_AiUserAgentQuestionThread` (procedure)

> AI_调用下单 插入订单


- **Type:** PROCEDURE
- **Deterministic:** NO
- **SQL data access:** CONTAINS SQL

## Parameters

| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | `sBrId` | `varchar(100)` |
| 2 | IN | `sSuId` | `varchar(100)` |
| 3 | IN | `sLoginId` | `varchar(100)` |
| 4 | IN | `sSqlContent` | `longtext` |
| 5 | IN | `userInput` | `longtext` |
| 6 | IN | `sQuestion` | `longtext` |
| 7 | IN | `sQuestionGroupNo` | `longtext` |
| 8 | IN | `sSceneId` | `varchar(100)` |
| 9 | IN | `sMethodId` | `varchar(100)` |
| 10 | IN | `bRedis` | `int` |
| 11 | OUT | `sReturn` | `longtext` |
| 12 | OUT | `sCode` | `int` |

## Body

_Body is not pre-cached. To inspect: `mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE PROCEDURE `Sp_Ai_AiUserAgentQuestionThread`'`._

## Narrative

**Business context:** Operates on `ai_user_agent_question` — part of the AI-features subsystem, which the wiki excludes from its core ERP scope (see [the index](../../index.md#whats-out-of-scope)).

**What it does:** Writes/updates `ai_user_agent_question` with per-user agent question history.

**Invocation:** Not surveyed; out of scope for this catalog.
