When a meeting form is submitted by your customer to schedule a meeting with you or your team, the system emits an event called 'SM_MEETING_SUBMITTED'. You can add a listener in your code for this specific event and execute any additional code that is required.
SM_MEETING_SUBMITTED
Add Listener:
For example,
window.addEventListener("SM_MEETING_SUBMITTED", function(event) {
console.log('meetingName:' , event.detail.meetingName);
console.log('meetingDate:' , event.detail.meetingDate);
});
- If you add a code like displayed above on your website, then you will get a similar output as shown below.
<script>
! function() {
var MEETING_DATA = {
backgroundColor: "#FFFFFF",
textColor: "#505F79",
buttonAndLinkColor: "#1F62FF",
meetingURL: 'https://meetings.salesmate.io/meetings/#/salesmateio/scheduler/call-for-presentation',
initData: {},
divId: '_sm_meetings_'
};
if ("undefined" == typeof SM_Meetings) {
let e = document.createElement("script"); e.setAttribute("src", "https://meetings.salesmate.io/meetings.js"),
e.onload = function() {
SM_Meetings.loadMeeting(MEETING_DATA)
},
document.head.appendChild(e)
} else SM_Meetings.loadMeeting(MEETING_DATA)
window.addEventListener("SM_MEETING_SUBMITTED", function(event) {
console.log('meetingName:' , event.detail.meetingName);
console.log('meetingDate:' , event.detail.meetingDate);
});
}();
</script>
<div id="_sm_meetings_">
<br>
</div>
Result:
{
"meetingName": "Demo for New Feature",
"meetingDate": "2021-12-18T10:30:00.000Z
", //ISO format
"meetingData": {
"Contact.name": "Damon",
"Contact.email": "damon@example.com",
"Contact.mobile": "98765XXXXX" }
}
- As shown in the above example, you can easily get the data that has been submitted by your customer, now you can manipulate this data and use it as per your requirement or perform any operations on it. Refer events emitted when a webform is submitted.
Comments
0 comments
Article is closed for comments.