VAD Time of day with hours and minutes

Discussion in 'CRM / Helpdesk / App Integration' started by jmtelecom, Mar 21, 2016.

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

    Joined:
    Apr 15, 2009
    Messages:
    12
    Likes Received:
    0
    Hi

    does anyone has a template that gives different welcome prompt message depending on the time of day.
    but not only on the hours but also in minutes?

    like 8:30 tile 12:00 and 13:00 till 18:00

    I only found this one 3cx.com/blog/docs/javascript-3cx-vad/

    thanks ;)
     
  2. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,073
    Likes Received:
    75
    Hi there,

    That article shows how to use a javascript expression to get the current hour. You can do the same to get the current minutes, calling:
    new Date().getMinutes()

    That will return a value from 0 to 59.

    You can combine both calls, to decide the flow.

    Kind regards.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Phatanasak

    Joined:
    May 18, 2016
    Messages:
    2
    Likes Received:
    0
    I feel that this is beneficial to the reader too much.
     
  4. jmtelecom

    Joined:
    Apr 15, 2009
    Messages:
    12
    Likes Received:
    0
    Hi Edossantos

    I did it like this but this does not work?
     

    Attached Files:

    • VAD.JPG
      VAD.JPG
      File size:
      44.1 KB
      Views:
      1,844
  5. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    1,073
    Likes Received:
    75
    And what error are you getting?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Thread Status:
Not open for further replies.