Propose a customer change with AI
Extracts customer details from a free-text description and returns a proposed create or update for a person to review. Nothing is saved until the proposal is confirmed; it expires after 5 minutes.
How to use it
- Send entityType CUSTOMER with a description such as a name, email and city, or UPDATE_CUSTOMER with the customerNumber (from List customers) and the change.
- Show the returned proposal and message to a person for review; nothing is saved yet.
- Within 5 minutes, call Confirm an AI customer proposal with the proposalId, or let it expire.
BearerAuthAuthorizationBearer <JWT>application/json- body
entityType*stringWhat to propose: CUSTOMER to create a new customer or UPDATE_CUSTOMER to change one. ITEM is rejected here; items are drafted from the assistant chat.
"CUSTOMER""UPDATE_CUSTOMER""ITEM"description*stringFree-text description of the customer or the change, e.g. a name, email and city. Required, at most 500 characters. Text containing a web link or instruction-like phrases is rejected; characters such as < > quotes, ; and backticks are removed before the AI reads it.
customerNumber?|Customer number of the customer to change. Required when entityType is UPDATE_CUSTOMER; it cannot be changed later at confirm time.
OK
*/*- response
status*stringOutcome of the call: SUCCESS when the request was handled, ERROR otherwise.
message*stringShort human-readable message describing the outcome, e.g. which record was fetched or saved.
data?The proposal the AI extracted, waiting for a person to review and confirm.
curl -X POST 'https://beta.iotoms.com/api/v1/ai/agent/propose' \ -H 'Content-Type: application/json' \ -d '{ "entityType": "CUSTOMER", "description": "string"}'{ "status": "string", "message": "string", "data": { "proposalId": "string", "entityType": "CUSTOMER", "status": "PENDING", "proposal": {}, "expiresAt": "2019-08-24T14:15:22Z", "message": "string", "warnings": [ "string" ] }}