Automatic contact data processing through OpenImmo Feedback XML
As of WP-ImmoMakler PLUS, the contact form in the real estate detail views automatically sends an XML file together with the e-mail to the contact person. This XML file contains all the data entered in the form (name, contact details, message, etc.).
The contact details and the message can thus be automatically read by the estate agent software, a contact is automatically created and the inquiry is linked to the requested property.
If you use WP-ImmoMakler BASIC, you can upgrade to WP-ImmoMakler PLUS to use this function if required.
Emails from the contact form do not arrive
If you do not receive the contact requests, please read our detailed help article.
Set dispatch to a specific e-mail address
Contact requests via the contact form in the real estate detail views are sent to the contact address specified by the real estate agent software (email_feedback) by default.
If the recipient email address is not as desired and cannot be changed in your estate agent software for some reason, or if you would like to test the contact forms, you can enter a fixed email address.
The contact requests will then only be sent to this e-mail address, not to the address stored by the broker software.
add_filter('immomakler_contactform_mail_to_email', function () {
return 'mein.name@maklerunternehmen.de';
});
Additional dispatch to further e-mail addresses
Contact requests via the contact form in the real estate detail views are sent by default to the contact address specified by the real estate software (email_feedback). For some software (e.g. Propstack, Justimmo), this is an internal, technical address (e.g. 62342-928514-453de12c@oi-feedback.justimmo.at).
If you would also like to have the mails sent to a different address, please use one of the following filters:
Additional dispatch to a fixed e-mail address (copy/CC):
add_filter('immomakler_contactform_cc', function() {
return 'mein.name@maklerunternehmen.de';
});
Additional dispatch (copy/CC) to the e-mail address specified by the broker software in "E-mail direct" (individual contact person per property):
add_filter('immomakler_contactform_cc', 'immomakler_contactform_cc', 10, 4);
function immomakler_contactform_cc($cc, $recipients, $items, $values) {
return get_post_meta($items[0], 'kontaktperson_email_direkt', true);
}
Customize XML that goes to the recipient when sending a request
Exemplary customization: insert homepage in the "namen":
add_filter('immomakler_openimmofeedback_sender_name', function() {
return 'Homepage';
});
Customize e-mail subject
If you would like to set your own subject for the contact requests, please use the following filter.
Please note that the estateOffice and estatePro broker software only accept a maximum of 50 characters.
add_filter('immomakler_contactform_mail_with_posts_subject', function() {
return 'Objektanfrage von der Website';
});
Include object numbers in the subject line
If you would like to set your own subject with the requested property numbers for the contact requests, please use the following filter:
add_filter('immomakler_contactform_mail_with_posts_subject', 'custom_immomakler_contactform_subject_with_property_id', 10, 2);
function custom_immomakler_contactform_subject_with_property_id( $subject, $requested_items ) {
$subject = 'Objektanfrage:';
foreach ( $requested_items as $post_id ) {
$subject .= ' ' . get_post_meta( $post_id, 'objektnr_extern', true);
}
return $subject;
}
Redirection to a thank you page after submitting the contact form
Normally, a confirmation "Thank you, your request has been sent!" appears after submitting the form.
However, if you would like to redirect to a thank you page, you can do this with the following filter, for example:
add_filter('immomakler_contactform_mailsent', 'immomakler_mailsent', 12, 3);
function immomakler_mailsent($text, $requested_items, $values) {
$objektid = $requested_items[0];
return $text . '<script>location.href="/anfrage-gesendet/?id=' . get_post_meta($objektid, 'objektnr_extern', true ). '";</script>';
};
Execution of JavaScript (e.g. Google Analytics event) after submitting the contact form
If you want to trigger a conversion tracking event after successfully sending the contact form, you can do this with the following filter, for example:
add_filter( 'immomakler_contactform_mailsent', 'immomakler_contactform_mailsent_analytics_event', 10, 2 );
function immomakler_contactform_mailsent_analytics_event( $response, $requested_items ) {
return $response . '<script>ga("send", "event", "Direktanfrage", "versendet", "' . get_post_meta( $requested_items[0], 'objektnr_extern', true) . '");</script>';
}