Compare xml file and return variable

Discussion in 'Call Flow Designer' started by fidoka, Mar 19, 2018.

Thread Status:
Not open for further replies.
  1. fidoka

    Joined:
    Mar 17, 2016
    Messages:
    3
    Likes Received:
    0
    Hello everyone,
    I'm new with CFD and with C# too.
    My goal is to take a PIN from the user, read a xml file and compare the inserted PIN to the file and return the "Extension".
    This is the xml file:
    <customerPIN>
    <customer PIN="8578" Extension="871"/>
    <customer PIN="8583" Extension="872"/>
    <customer PIN="8669" Extension="857"/>
    <customer PIN="9087" Extension="859"/>
    </customerPIN>
    Can you help me with the C# script i need to use?

    Thank you very much
     
  2. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,146
    Likes Received:
    85
    Hello @fidoka,

    Please take a look at this guide:
    https://www.3cx.com/docs/cfd-creating-phone-support-portal-3/

    It shows how to validate the ID and PIN entered by the caller. In your case, you just need to validate the PIN, and then return the Extension. You need to make minimal changes to the script provided in the sample.

    Kind regards.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Thread Status:
Not open for further replies.