Zapier - Send Web Submission To Zapier

Created by C B, Modified on Tue, 30 Jan at 10:31 AM by C B

API Documentation for SendWebSubmissionToZapier Listener and LeadResource

Overview

This documentation details the SendWebSubmissionToZapier event listener in the MarketVue application, designed to automatically send lead data to configured Zapier webhook URLs when a WebSubmissionCreated event is triggered.

Event: WebSubmissionCreated

Triggered when a new web submission is created, this event passes the lead data to the SendWebSubmissionToZapier listener.

Listener: SendWebSubmissionToZapier

Description

Upon receiving the WebSubmissionCreated event, the listener retrieves all Zapier webhook URLs associated with the lead's lander and sends the lead data to these URLs.

Process Flow

  1. URL Retrieval:

    • Retrieves Zapier webhook URLs associated with the lead's lander.
    • Input: Lander ID from the event's lead data.
    • Output: Array of webhook URLs.
  2. Data Formatting:

    • Formats the lead data using the LeadResource.
    • Input: Lead data from the event.
    • Output: JSON formatted lead data.
  3. Data Transmission:

    • Sends the formatted data to each retrieved webhook URL via HTTP POST request.
    • Output: HTTP POST requests to each webhook URL.
    • Payload: Formatted lead data in JSON.

LeadResource

Description

Transforms the lead data into a structured JSON format suitable for consumption by the Zapier webhook.

Input

  • Type: Lead object from WebSubmissionCreated event.
  • Fields: Includes various attributes such as IDs, names, address, contact info, and custom form fields.

Output

  • Type: JSON object.
  • Content: Structured data including lead details and custom form fields.

Fields

  • id: Unique identifier of the lead.
  • campaign_id: Associated campaign's identifier.
  • campaign_name: Name of the associated campaign.
  • company_id: Identifier of the linked company.
  • company_name: Name of the linked company.
  • client_id: Identifier of the client (nullable).
  • client_name: Name of the client (nullable).
  • mail_piece_id: Identifier for the mail piece.
  • lead: Object containing the lead's details (e.g., first name, last name, address, etc.) and any additional custom fields.
  • created_at: Timestamp of lead creation.

JSON Structure

{
    "id": "int",
    "campaign_id": "int",
    "campaign_name": "string",
    "company_id": "int",
    "company_name": "string",
    "client_id": "int|null",
    "client_name": "string|null",
    "mail_piece_id": "int",
    "lead": {
        "first_name": "string",
        "last_name": "string",
        "address": "string",
        "city": "string",
        "state": "string",
        "zip_code": "string",
        "phone": "string",
        "email": "string",
    },
    "created_at": "datetime"
}

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article