Messaggio Data¶
<type>chat_date</type>
Utilizza questo formato di messaggio per inviare dates, times o datetimes, ad esempio in risposta a un messaggio dinamico con un’interazione di tipo input_date.
Formato del Payload¶
Key |
Value |
Description |
|---|---|---|
value |
String |
Rappresentazione testuale dei dati temporali, secondo lo standard ISO8601 |
dateType |
String |
Tipi di valori inviati, quelli permessi sono: : |
Value encoding¶
ISO8601 definisce diversi formati accettabili per ciascun profilo, attualmente utilizziamo questo sottoinsieme:
Profile ( |
Format |
Example |
|---|---|---|
date |
YYYY-MM-DD |
2019-01-09 |
time |
hh:mm:ss |
18:59:36 |
datetime |
YYYY-MM-DDThh:mm:ss.sssZ |
2019-01-01T18:59:36.000Z |
date_range |
YYYY-MM-DD/YYYY-MM-DD |
2019-01-01/2019-01-31 |
time_range |
hh:mm:ss/hh:mm:ss |
08:00:00/18:00:00 |
datetime_range |
YYYY-MM-DDThh:mm:ssZ/YYYY-MM-DDThh:mm:ss |
2019-01-01T08:00:00Z/2019-01-31T18:00:00Z |
I millisecondi (.sss) nei componenti temporali sono facoltativi.
Nota che spetta al mittente convertire il valore fornito dall’utente,
che può essere in qualsiasi fuso orario, nel valore UTC equivalente
Esempio¶
<message to="bob@wfp" id="51c9b72c-f2f1-4e8d-927b-33401065cf0f-211610484933107" type="chat">
<thread>9e036646-48a9-477d-a165-6feaea487c76</thread>
<body>{
"arguments": {
"value": "2019-10-04T12:55:15.426Z",
"dateType": "datetime"
},
"chat_type": "chat",
"creation_date": "2024-10-14T17:54:40.8070000Z",
"domain": "chat",
"identifier": "0b6685ba-7118-4a1d-84ba-138f328ec54e-211610540337024",
"language": "eng",
"type": "chat_date",
"version": "1.0"
}</body>
</message>