⬆️ ⬇️

Sending an e-mail message in the 3CX Call Flow Designer development environment

Introduction



In this article we will explain how to send an e-mail message from 3CX Call Flow Designer using the Email Sender component. The application records the caller's voice in a WAV file and sends it as an e-mail attachment.



You can use this component, for example, to notify about the order of goods through the voice menu 3CX, and in other situations when the voice interaction of the user with the system must be accompanied by sending e-mail.



Recall that in previous articles we considered the creation of a CFD application for outgoing dialing (after the call is completed, you can send a report using the Email Sender component), CFD operation with databases (which can also be used to get a subscriber number) and incoming call routing depending on time of day (which can be combined with outgoing calls)

')

Please note - the 3CX CFD development environment is free. But voice applications will be run only on 3CX Pro and Enterprise editions . Download CFD from here .



The demo project of this voice application comes with the 3CX CFD distribution and is located in the Documents \ 3CX Call Flow Designer Demos folder. To get started, it is enough to specify the parameters of your SMTP server in the demo application.



Project creation



To create a CFD project, go to File → New → Project , specify the project folder and its name, for example, EMailDemo .







Write user message to file



To begin, write the subscriber's message to a file. This file will then be sent to the e-mail. For this, the Record component is used.







  1. Drag the Record component into the main development environment window (into the Main voice application). Go to the properties window and rename the component to recordYourMessage .

  2. Double click on the component and in the opened window set the following parameters:



CONCATENATE("CallFrom_",session.ani,".wav") 






Sending a recorded message to e-mail



Now we will send the recorded audio file as an e-mail attachment. To do this, add the E-Mail Sender component to the Audio Recorded branch of the Record component and configure it as shown below:







Note that in those parameters where expressions are specified (the fields have the Fx button on the right), any specified constant must be quoted, since these fields may also contain variables or expression results.



For the Subject parameter, we use an expression that adds the caller's number.



The Attachments Attachments list contains file descriptions consisting of two columns:





 CONCATENATE(session.audioFolder,"/CallFrom_",session.ani,".wav") 


Now the voice application correctly finds and inserts the audio file.



Compiling and installing the application on the 3CX server



Voice application is ready! Now it should be compiled and uploaded to the 3CX server. For this:





Source: https://habr.com/ru/post/337096/



All Articles