Workflow Example



Introduction



This is a How To Step by Step on how to create a basic workflow (IVR) with 4 options,each perform different actions:

  1. The call will be directed to an Agent of the Campaign Sales will be attended by any operator available.

  2. In the audio of welcome option given the customer if already árt of our data to indicate what their indentity to route the call to the appropia campaingn.

  3. Dial an specific number (cell phone for support).

  4. As a last ooption the customer can dial 4 dor directly talk to our operator.

Steps for an IVR



  1. StartActivity :All workflows start this way,context and pattern to match l(in this case,calling number 10800).

  2. Answer: Answer the call.

  3. SetLanguage: The SetLenguage (pt, es, en), this sets in which language play the sounds.

  4. Set  AUDIOHOOK_INHERIT(MixMonitor)   value = yes :The final recording will be on one file even if there is a transfer.

  5. Set__Ani   value = ${CALLERID(num) : Make possible to trace the calls in system logs.

  6. Guid: Unique identifier for a call.

  7. SetCDRGuid: Sets GUID on CDR.

  8. SetCDRType type= record : Mark the call to be recorded.

  9. SetRecordName ${guid} : Sets recording file name.

  10. Read : Menu for the customer.


 



 







The Read activity asks for an input, save the number on a variable and plays an audio file, could be a welcome audio and menu, we can ask for a pin, number, phone. You can limit the retries and max digits to allow as the timeout to get the numbers. 

After getting the number we use a conditional activity where we will evaluate a condition.

We start building the IVR tree for this use the Gotoif activity, is based in a codintion and has two possible outcomes, the TRUE path (Green) the first arrow we connect and the FALSE path (Red) the second arrow we connect from the activity.

In our case the variable is opcion and we will evaulate for the 4 different options we want. For the First GotoIf we evaluate opcion with 1,with the condition : $[${opcion}=1].



11. Gotoif $[${opcion}=1] : If true will go to a campaign else will evaluate for the other possibilities of the variable opcion.



Suppose our customer digit one, it will be directed to sales sector according the audio to route the call to the queue of the campaign Sales we will use the Queue activity, the same is  indicated with the name that figures in the uContact portal.





12.SetCDRCampaign : Sets the name of the campaing on the CDR to be able searchable.





13. Queue :Direct the call to the Sales ACD of Ventas← in our example.





Now we have the next option 2 of our IVR, in this case will assume that the customer is already registered in your database, will enter another Read with an audio asking for identity number, delimited with a maximum of 8 digits and giving maximum 3 trials, keeping in a variable called cedula.



14. Gotoif $[${opcion}=2]

15. Read : Get the identity number.





Then we have the Database Query, Func_ODBC has 3 properties, first is the datas source for the query, then the name of the result variable to store the data (can be a simple name or HASH if a HASH(client) then all the columns of the result query are stored in the hash and you can access to them  ${HASH(client,columname)} if the query has a simple result we can store it on a simple variable that can be accessed like this: ${doc}), the third property is the SQL query itself.

16. Func_ODBC : Database query.





After having the result we validate it, using Gotoif we check for the variable distinct to 0 (we are using a count statement to check existence), if it exist that number will return 1 or more.



17. GotoIf $[${doc}!=0]





We used again conditional paths, for the case a condition is not met, the document number return 0 because does not exist in our database, we connect again our Gotoif with the Read asking the document number again until the condition is met.
When it is fulfilled the call is transferred to the tail of the respective campaign to attend the customer.



18. SetCDRCampaign  : Sets the name of the campaign on the CDR to be able searchable.





19. Queue:  You will campaign for registred customers.





When dialed 3 we will Dial an outside number of out Service Desk with Dial activity.

20. Dial : Dial number by the SIP trunk or digital line  so we can connect the client with the outside world.

As a last option, we will have the operator, where it's directed automatically by the App

GOTO to an intern number of our organization.





21. Goto:  Sends the call to a internal context to a number of internal particularly in priority 1.





We use Hang Up activity to finish all the paths of the IVR. It is something necessary of realize each time that your call be transferred to redirected to an intern, a number o a tail outside our flow.





The last step is to Deploy the Workflow.