Advanced Cfd - Creation of an automatic appointment management service

Status
Not open for further replies.

_aMiCiCi_

Bronze Partner
Joined
Apr 16, 2022
Messages
41
Reaction score
6
Good morning, last night, checking the forum, I was looking for how to create a cfd that, based on a database, performs the search, control and eventual insertion of an appointment with keyboard choices.

As I had thought it, the customer calls, we record the entry session.ani, upon selecting the IVR who intends to book an appointment with us, the system queries the dates and times actually available closest to him and via google text to speech proposes them in the quick selection, first the date and confirmed the date the available times.

The customer can choose between the three proposals advanced by the system or with the 4th choice if you want to change the date.

If he confirms among the first three choices through 1,2,3 from the keyboard, he goes on.

If he presses key 4, he is instead offered 5 dates among those available (perhaps those that have more times available).

Once the date between the first three choices or the fourth choice is confirmed, the mechanism for choosing the times is replicated, always checking the database from time to time.

Collected the information and registered in the sql database, we send an email to us and an email to the end customer confirming the appointment.

What do you think of logical reasoning?
How do you think I should set up the database itself?

Are we all able to help each other, solving and creating this CFD with a high complexity of management and variables?

What do you think of the reasoning made in the logical creation of the cfd?

If you ever have alternative solutions or additions, he will be happy to read and compare them.


Thanking you in advance for your help, I await your valuable suggestions.

Joseph
 
  • Like
Reactions: leonardorebelo
Seems to be an issue with the connection string that you're using:
2022/04/28 14:27:05.699|3385|0065|Err|CallPair._80001_12.Demo_BookCall.34.[C:17.2]-From script: Test_database - CallID 0000018070238F7F_17 - _80001_12.Demo_BookCall+Prenotazione 'Prenotazione1' - Error executing last component: System.ArgumentException: Keyword not supported: postgresql://doadmin:avns_axuvtkgbkyinmne@bookcall-do-user-11363618-0.b.db.ondigitalocean.com:25060/defaultdb?sslmode (Parameter 'keyword')
at Npgsql.NpgsqlConnectionStringBuilder.GetProperty(String keyword)
at Npgsql.NpgsqlConnectionStringBuilder.set_Item(String keyword, Object value)
at System.Data.Common.DbConnectionStringBuilder.set_ConnectionString(String value)

How are you configuring the connection string? Please check for valid formats here:
https://www.connectionstrings.com/npgsql/
 
  • Like
Reactions: _aMiCiCi_
Problems solved, I also added other variables, such as reading the name, surname via GET_TABLE_CELL_VALUE.

I have a question, in the sql table I added the appointment date with a specific cell, always as a textual value.

Now I have to check if the date or time is future (even a few hours before), a message must be triggered rightly with a conditional.

If, on the other hand, the date has passed with the conditional, you will not have to repeat it.

How can I create this kind of check if the date is smaller or if the date is greater?
 
Problems solved, I also added other variables, such as reading the name, surname via GET_TABLE_CELL_VALUE.

I have a question, in the sql table I added the appointment date with a specific cell, always as a textual value.

Now I have to check if the date or time is future (even a few hours before), a message must be triggered rightly with a conditional.

If, on the other hand, the date has passed with the conditional, you will not have to repeat it.

How can I create this kind of check if the date is smaller or if the date is greater?
You will need to create a piece of C# code to do that validation. The C# code can convert the string into a DateTime object, and then you can compare it against the current Date and Time, and decide what to do....
 
  • Like
Reactions: _aMiCiCi_
Thanks always Ernesto for your valuable suggestions.

According to what you write, I should if I'm not mistaken create the following c # string: return DateToString ("dd / MM / yyyy h: mm: ss tt");

Correct?

To then compare it like this:

return DateAppointment.String("dd/MM/yyyy h:mm:ss tt");

return DateNow.UtcNow;

DateTime date1 =DateToString;
DateTime date2 =DateNow.UtcNow;
int result = DateTime.Compare(date1, date2);
string relationship;

if (result < 0)
relationship = "is earlier than";
else if (result == 0)
relationship = "is the same time as";
else
relationship = "is later than";

Console.WriteLine("{0} {1} {2}", date1, relationship, date2);



But it does not work
 

Attachments

  • Schermata 2022-04-29 alle 17.47.46.png
    Schermata 2022-04-29 alle 17.47.46.png
    27.2 KB · Views: 6
  • Schermata 2022-04-29 alle 17.51.24.png
    Schermata 2022-04-29 alle 17.51.24.png
    48 KB · Views: 6
While I was trying to understand for the verification of the date, I added another piece, the SEX in the database, so as to customize for us in Italy, the welcome message between male and female (since it changes).

I read the sex value from the database with a single character:
F = Female
M = Male

I have configured, the following condition: EQUAL (Search_Sex.QueryResult, "F")

or

EQUAL (Search_Sex.QueryResult, "M")

Assuming that beyond the numeric value it compares the string value, but it doesn't work.

Where am I wrong?
 

Attachments

  • Schermata 2022-04-29 alle 17.56.06.png
    Schermata 2022-04-29 alle 17.56.06.png
    25 KB · Views: 5
  • Schermata 2022-04-29 alle 17.56.10.png
    Schermata 2022-04-29 alle 17.56.10.png
    29.3 KB · Views: 5
  • Schermata 2022-04-29 alle 17.56.15.png
    Schermata 2022-04-29 alle 17.56.15.png
    27.4 KB · Views: 5
While I was trying to understand for the verification of the date, I added another piece, the SEX in the database, so as to customize for us in Italy, the welcome message between male and female (since it changes).

I read the sex value from the database with a single character:
F = Female
M = Male

I have configured, the following condition: EQUAL (Search_Sex.QueryResult, "F")

or

EQUAL (Search_Sex.QueryResult, "M")

Assuming that beyond the numeric value it compares the string value, but it doesn't work.

Where am I wrong?

This step I solved it by assigning the GET TABLE CELL VALUE (Thanks to some old edosantos posts that I found in the forum I applied and treasured this function that I did not know.)

By insert 2 control variables

Man value 4 (Italian language Uomo) given by the sum of the characters.
Woman value 5 (Italian language Donna) given by the sum of the characters.
 
Status
Not open for further replies.

Latest Posts

Forum statistics

Threads
112,280
Messages
591,670
Members
165,400
Latest member
georgi