Comment to 'Welcome Message'
Comment to Welcome Message
  • until somebody develops a solution an easy way to have a messenger welcome message:

    • Assign a support profile, this profile will be sending the welcome message and will continue to provide support to the users.
    • Add a field to sys_accounts table like "welcomemessagesent" default to 0.
    • create a php (or your prefered language) code to scan the UNA database for new accounts with email/phone confirmed and welcomemessagesent=0
      with your code for each new user:
    • add a new record to messenger lots table
      id: leave empty
      title:leave empty
      url: leave empty
      type:2
      created: unix time stamp
      author: your support profile id
      participants: the new accounts profile id","support profile id
      class:custom
    • For your message to the user add a new record to messenger jots table
      lot_id: from the previous table
      message: your nice message
      created: unix time stamp
      user_id: your support profile id
      new_for: new users profile id
      edit_by:0
      last_edit:0
      from the systemaccounts table make welcomemessagesent :1
    • put your code to a cron job.
      This algorithm will welcome new users and provide them a support account that they could contact for future needs.
      For a crowded UNA site it is better to trigger the welcome message as soon as the phone/email is confirmed instead of a cron job.

      Ps: if you don't want your current users to get this message set them to welcomemessagesent 1 before the first cron job.

    • Hello Cem,

      You description about how to add new patirictipant to the talk is very precise. This solution may be good when new member opens the main messnger page and have no talks yet, then the latest exsited and updated talk with this member will be loaded automatically. 

      We had plans to add bots to the messnger, it maybe more interesting for support issues.

      • Hi Alexey.

        Even if they open and started a chat in between before the Cron works, isnt it enough to use new for field to show the welcome message as a new message?

        And to send further automated support messages to that user, yes it will be needed to find the lot id that previous talk has started and use it for the new messages, that way the new message will be seen after the old messages in the same talk ;)