Vielen Dank!
Ihr Feedback ist bei uns eingegangen
Wir werden uns persönlich bei Ihnen melden!
<script>
window.addEventListener(‚load‘, function() {
var urlParams = new URLSearchParams(window.location.search);
var opportunityId = urlParams.get(‚opportunity_id‘);
var leadId = urlParams.get(‚lead_id‘);
var contactName = urlParams.get(‚contact_name‘);
var contactEmail = urlParams.get(‚contact_email‘);
var quoteDate = urlParams.get(‚quote_date‘);
var reason = urlParams.get(‚reason‘);
if (opportunityId) {
var webhookUrl = ‚https://hooks.zapier.com/hooks/catch/21960859/2jo9xdf/‘;
var data = {
opportunity_id: opportunityId,
lead_id: leadId,
contact_name: contactName,
contact_email: contactEmail,
quote_date: quoteDate,
rejection_reason: reason,
timestamp: new Date().toISOString(),
page_url: window.location.href
};
fetch(webhookUrl, {
method: ‚POST‘,
headers: {‚Content-Type‘: ‚application/json‘},
body: JSON.stringify(data)
}).then(function(response) {
console.log(‚Erfolgreich an Close CRM gesendet‘);
return response;
}).catch(function(error) {
console.error(‚Fehler:‘, error);
});
}
});
</script>