DeskDirector Forms - Field value format for automation

Jason He Updated by Jason He

One of the core value for DeskDirector forms is to help customer to collect accurate data that can be used for automation. Thus, data format is essential for the form system.

Field's JSON data model is represented as following.

{
"name": "question title",
"description": "Description markdown",
"identifier": "id_of_field",
"type": "field_type",
"choices": [
{
"name": "Name of first choice",
"identifier": "choice_1",
"selected": false,
},
{
"name": "Name of second choice",
"identifier": "choice_2",
"selected": true,
}
],
"value": "Value for text, phone, email, number, date, time, address fields. Or used for additional info of other choice field."
}

For choice field and dynamic select field, the field result is easy to understand. Where for field such as phone, date, time and email it requires deep understanding how system format the result value. Which is the topic we will go through in this article.

Phone Field

In phone field, we record use E164 format. Google provided an easy to use library that you can parse it or verify it. Google phone library is available in many different programming languages.

E164 format is also supported by telephone link and all phone related application.

tel:+14155552671 equal to +1 (415) 555-2671

Date Field

For date field, the format is according to ISO 8601 spec. Which include format for date or date time. Both of them has been recorded without timezone involved.

  • Date: 2022-01-24
  • Date Time: 2022-01-24T13:34

Time Field

For time field, the format is also according to ISO 8601 spec. It record the time through 24 hours format. Hour will be displayed between 00 to 23. Where minutes will be displayed through 01 to 59.

  • Example 1: 01:23
  • Example 2: 12:59
  • Example 3: 23:59

Multiple Entries

Multiple entries is currently supported by phone, date, time or email fields. System split each entry by ;

  • Date Time example: 2022-01-24T13:34; 2021-11-02T00:23; 2022-05-21T23:03
  • Date example: 2022-01-24; 2021-11-02; 2022-05-21
  • Phone example: +14155552671; +12015550123
  • Email example: sample_1@test.com; test@deskdirector.com

Q&A

Q: Can form result contain corrupted or invalid data?

A: If form is submitted through client portal, then all value should be validated and correctly formatted.. But, if the result is submitted through other automation, then our server does not perform validation against form result. Which means, it is best for automation to have fallback logic.

Q: For multi-entries, can one of entry be empty or invalid format?

A: No if form has been submitted through client portal. It is still best for automation to apply defensive programming approach. Always assume data could be corrupted.

Q: Form value can be displayed inside dialog since release in early 2022. Does form result dialog aware of corrupted data?

A: Yes. Our interface always assume data is corrupted. If any format is invalid, we will display original corrupted value.

Q: Can we update form result through API?

A: Not at moment, in the future when we introduce update ticket note that's been created by form, you will be able to modify result through our UI and through internal API (It is not recommended to do so).

How did we do?

DeskDirector Forms - Dynamic content

Contact