how to make a notification code in php?
when user make a booking request
how to notify admin that there were incoming booking request?
There are several possibilities, including:
Send an email notification to a known address
Use a database trigger to populate a view that the admin user will see on their app's page
Write a message to a queue (such as AMQP) that will be read by another application.
Related
I would like to to have a notification system to alert the user via Google SMS system and register user with their phone number. I would like to send the alert when certain condition is reached in a PHP web application. Would it be possible? Could you please give some suggestion?
Yes it is possible. There are apis available for this functionality. You could implement this yourself and you can send text messages via email if you use an api to figure out the phone carrier of the user.
I need to create task in bitrix from my website form. When a user submit form from my website Client needs to create it as a task in bitrix and automatically assigned to user.
You can use incoming webhook.
To create a webhook, go to Applications > Webhooks.
Click the Add webhook button in the upper right corner and select Inbound webhook.
In the form that opens, fill in the fields:
Title and Description - arbitrary data.
Access rights - indicate
which modules the webhook should have access to.
After saving, a code for webhook authorization will appear.
Together with the code, a sample URL will be presented, which must be used when sending data from a third-party system to Bitrix24: https://********.bitrix24.ru/rest/1/83te1pjdphsa9u15/task/
Where:
******** - the name of your portal;
/rest/ - indication to the system that this address belongs to webhooks;
/1/ - identifier of the user who created the webhook. This webhook will work under the rights of this user.
/83te1pjdphsa9u15/ - secret code;
/tasks.task.add is the REST method that you want to execute when accessing a web hook. The developer must choose the method from the REST API himself, depending on the goals of creating a webhook. Documentation with REST API task methods
Use curl(for example) into code of your website.
Use special solution "task from email".
https://marketplace.1c-bitrix.ru/solutions/mcart.taskfromemailce/
So I am trying to build a system that works like the facebook email notifications where a user receives an email based on some actions performed by another user.
Then, the first user may reply to that email and the second user will also get their reply.
Now I understand how to send basic emails. But the thing about this is that there is no direct communication between the 2 users.
Every email is sent through me and I then relay the mail to the appropriate recipient.
I am trying to do this using Laravel 5.7.
I don't actually understand what you want to do, but basically you can use events and listeners to send email to specific user after some action , so if your email contains a link that redirect users to some point in the application you can trigger the event when the user enter the redirecting point.
here is Laravel doc about events
https://laravel.com/docs/5.7/events
I am using openfire for chat application in iOs and php website. and everything is working fine.
I have also implemented push notifications when opponent user is offline and you are sending a message to that user (in short push notification for offline message). I have implemented above stuff which is available here : Openfire offline notification through PHP
Now, client asks me to implement one more feature which includes :
Send mail to admin when any user goes offline.
But now there is no any hook available to track user status. So how to implement the same ?
What I tried
I also tried one trick in which I am sending broadcast message to all users and if any user is offile then my CallbackOnOffline plugin will invoke, but here its not sending broadcast message to offline users.
You can give a try to "intercept" Presence packet with Presence.Type.unavailable
Openfire has a ConnectionCloseListener (in SessionManager class) that fires a Presence unavailable.
If you read the class comments, it says
// Send an unavailable presence to the user's subscribers
// Note: This gives us a chance to send an unavailable presence to the
// entities that the user sent directed presences
so probably it's possible to have an administrative user who can auto-subscribe to all users, recive the presence-unavailable and so you'll be able to just intercept the packet direct to this user to send your e-mail.
With opposite logic you'll be able to force a direct presence to something you control and intercept presence-unavailable to this entity
Once I have a client contact information saved in Support Module, I could get the following things done..
Client sends e-mail to suport#company.com
Mail Scanner scans, creates a ticket.
A notification is sent that email is received by support team to client.
Admin assigns the ticket to someone, client recieves an email that the ticket is being assigned.
Client replies to the email, the ticket gets updated in the comment.
How ever if I dont have the client information saved, only the ticket is getting created.
How do I auto save the person contact information as soon as someone sends an email to support#company.com?
This sounds like you need to build a vTiger custom workflow.
https://wiki.vtiger.com/index.php/Workflows
https://www.youtube.com/watch?v=CN-zll3wAeI
All I can offer is the links above. You would then have to either code this yourself with custom code or see if you can set up a workflow and a CRON job in vTiger.
Good Luck