Prospect Activity Create and Update Webhooks

Overview 

The purpose of this document is to define the JSON payload for the Prospect Activity Create and Prospect Activitity Update webhook from Aimbase. The Prospect Activity Create and Prospect Activity Update webhooks are separate webhooks, but they share a payload. Prospect Activity Create will be triggered on creation of a prospect activity. Prospect Activity Update will be triggered when there are changes to the activity, such as a click or open on an email.

These webhooks can be subscribed to from the Webhook API. Please see the Aimbase Webhook Subscribe Web Service Specification document for information about how to subscribe to the webhook. When subscribing to the webhook, a Data key/value pair collection can be given. This collection will be sent with each outgoing webhook payload. 

ProspectActivityCreate and ProspectActivityUpdate payload is sent to the PostUrl via HTTP POST. The Content-Type HTTP header will be “application/json”. It is recommended that you verify that the source of the webhook post is Aimbase. This can be done by looking at the Authenticate header in the post. See the Aimbase Webhook Subscribe Web Service Specification document “Authenticating Webhooks” section for information about how to verify the Authenticate header in a webhook post.  

It is expected that the PostUrl endpoint will respond to the request with a 200 (Ok) HTTP status code. If any other response is given, it is assumed that the request failed and then it will attempt retries. The request will be retried up to 3 times, after 20 seconds, 20 minutes, and 20 hours. If all retries fail, it will not attempt to send the request again. 

The POST body differs slightly on what will be filled out based on the prospect activity type. Below is the list of properties that are in the POST body for the most types of prospect activities.

Prospect Custom Activity Create and Update Data Schema

This schema is used across all of the prospect custom activities, but what will return filled out or expanded is different per prospect activities types. 

Field Name
Required
Format
Description
Id
X Number The custom activity record's identifier.
ProspectActivityTypeCode X String (max 20) The code that defines the type of the prospect custom activity.
ProspectActivityTypeName X String (max 50) The name that describes the name of the prospect custom activity
ProspectId X Number The prospect identifier of the prospect that completed the activity.
LeadId
Number The lead identifier of the lead that the activity is connected to, if applicable. 
OwnerId
Number The owner identifier of the owner that the activity is connected to, if applicable.
DealerId
Number The dealer identifier of the dealer that the activity is connected to, if applicable.
EmailSentId
Number The email sent id of the email that the activity is connected to, if applicable.
Message X String The message that shows on the prospect timeline. This explains the event in more detail.
EventDate X YYYY-MM-dd ±hh:mm The date and time the activity occurred.
CreateDate X YYYY-MM-dd ±hh:mm The date and time the activity was created.
UpdateDate
YYYY-MM-dd ±hh:mm The data and time the activity was updated.
RegistrationHistoryId
Number If the activity links to a registration, it will do so using this ID.
WebSessionId
UID If the activity links to a web session, it will do so using this ID
WebTrackedUrlClickId
UID If the activity links to a tracked URL being clicked, this ID identifies the tracked URL.
WebPageActionId
UID If the activity links to a tracked URL being clicked
ViewMoreUrl
String (max 1028) If the activity can be expanded on the prospect timeline, it will have this view more URL.
SendSubscriberId
Number If the activity relates to a send subscriber (used to send emails), then the send subscriber ID will appear here.
AuthenticatedDealerId
Number If the activity belongs to a dealership (like a status update or quote that a dealership completed) it will show the dealer ID here.
ObfuscatedMessage
String If the activity should be obfuscated to where the authenticated dealer can see it, but no other dealer can, the obfuscated message will show here. 
RecordId
Number If the prospect custom activity is linked to any other record in Aimbase, this ID will be filled out
RecordType
String (max 200) This will identify which type of record the record ID will match.
Prospect
Prospect An object that contains information about the prospect. See below schema.
Lead
Lead An object that contains information about the lead. See below schema. 
Dealer
Dealer An object that contains information about the dealer. See below schema.
AuthenticatedDealer
AuthenticatedDealer An object that contains information about the authenticated dealer. See below schema.
SendSubscriber
SendSubscriber An object that contains information about the send subscriber. See below schema
WebTrackedUrlClick
WebTrackedUrlClick An object that contains information about the web tracked URL. See below schema. 

Prospect Data Schema

The prospect data schema will be filled out on all prospect custom activities. All prospect custom activities are related to prospects, so this schema identifies information about the prospect who completed the activity. 

Field Name
Required
Format
Description
Id
X Number The prospect's identifier.
ProspectUid X UID The prospect's UID.
ProspectAggregationId X Number The prospect aggregation identifier.
ExternalId
String (max 20) If an external ID is assigned to the prospect from another system, it will show here.
FirstName
String (max 50) The first name of the prospect.
LastName X String (max 50) The last name of the prospect.
Email
String (max 90) The email address of the prospect.

Lead Data Schema

The lead data schema will be filled out on prospect custom activities that are directly tied to a lead. Examples include Autoresponders, Lead Status changes, and more. 

Field Name
Required
Format
Description
Id
X Number The lead's identifier.
LeadUid X UID The lead's UID.
ExternalId
String (max 20) If an external ID is assigned to the lead from another system, it will show here.
LeadDate X YYYY-MM-dd ±hh:mm The date of the lead.
LeadTypeCode X String (max 50) The code of the lead type on the lead.
LeadTypeName X String (max 50)  The name of the lead type on the lead.
LeadCategoryCode X String (max 50)  The code of the lead category on the lead.
LeadCategoryName X String (max 50)  The name of the lead category on the lead.
LeadSourceCode X String (max 50)  The code of the lead source on the lead.
LeadSourceName X String (max 50)  The name of the lead source on the lead.
DealerId X Number The ID of the dealer that is assigned to the lead. 
Dealer X Dealer An object that contains more information about the dealer.

Authenticated Dealer and Dealer Data Schema

There are multiple properties on the main Prospect Activity model for the dealer data schema. This data schema identifies more information about the dealer. This will appear in these areas:

  • Authenticated Dealer: This is a property that displays who is authenticated to see the entire details of the prospect custom activity. 
  • Dealer: This is a property that shows the dealer that is assigned to the prospect custom activity 
  • Dealer (under lead's Dealer object): This is a property on the lead that shows the assigned dealer to the lead that relates to the prospect custom activity. 
Field Name
Required
Format
Description
Id
X Number The dealer's identifier.
Name X String (max 80) The name of the dealer.
DealerNbr X String (max 20) The dealer number assigned to the dealer in Aimbase.
ManufacturerId X Number The ID of the manufacturer that the dealer is assigned to in Aimbase.
ManufacturerCode X String (max 6) The code of the assigned manufacturer.

Send Subscriber Data Schema

The send subscriber data schema will be filled out on all prospect custom activities that relate directly to a send of an email, such as campaign, autoresponder, and nurture.  

Field Name
Required
Format
Description
Id
X Number The identifier of the send subscriber.
Email Address X String (max 60) The email address of the send subscriber.
SendSubscriberUid X UID The unique identifier for the send subscriber.
SendId X Number The identifier of the send that was triggered with this send subscriber and email in it. 
OpenCount X Number The number of times the send subscriber opened the email.
ClickCount X Number The number of times the send subscriber clicked the email.
UnsubscribeCount X Number If the send subscriber unsubscribed from this email, this count will display 1. 
SpamComplaintCount X Number If the send subscriber complained the email was spam, this count will display 1. 
BounceCount X Number If the email bounced, this count will increase.
FailureCount X Number If the email failed, this count will increase.
DeliveryCount X Number When successfully delivered, this count will show 1. 
CreateDate X YYYY-MM-dd ±hh:mm The date the send subscriber was created for the send.
SenderProfileName X String (max 80) The name of the sender profile that was used.
SenderProfileLocal X String (max 80) The part of the sender profile email that is before the @ sign.
SenderProfileDomain X String (max 80) The part of the sender profile that is after the @ sign. 
Send X Send An object that contains more information about the send the send subscriber was included in.

Send Data Schema

The send data schema is with the Send Subscriber data schema. It will also show when the Send Subscriber shows. It gives more information about the email that was sent and what send the send subscriber was a part of. 

Field Name
Required
Format
Description
Id
X Number The send's identifier.
SendUid X UID The send's unique identifier.
EmailCode X String The code of the email that was sent.
EmailName X String The name of the email that was sent. 
EmailVersion X Number The version of the email that was sent.
EmailTypeCode X String The type of the email that was sent, such as Lead Autoresponder, Lead Nurture, or Lead Campaign.
EmailTypeName X String The name of the type of the email that was sent.
SendStatusCode X String The code of the send's status. This will tell you if the send successfully sent or not.
SendStatusName X String The name of the send's status.
SendDate X YYYY-MM-dd ±hh:mm The date the send was initiated.
SentDate X YYYY-MM-dd ±hh:mm The date the send completed successfully.
SubscriberCount X Number The total number of subscribers in the send.
ProcessedDate
String The date the send was processed.
Medium
String If defined on a campaign send, the medium of the send.
LeadSource
String If defined on a campaign send, this will indicate the lead source of the send.
Referrer
String If defined on the campaign send, this will identify the referrer the user set on the send. 
Event
String If defined on the campaign send, this will identify the event set on the send.
Campaign
String If defined on the campaign send, this will identify the campaign that was set.
ReplyTo
String If defined on the sender profile, this will indicate what the reply to email address is. This will only apply if the sender profile is overriding normal routing rules. 

Web Tracked URL Click Data Schema

The web tracked URL click data schema will be filled out on all prospect custom activities that relate to a click of a tracked URL. This will show on activities such as clicks.

Field Name
Required
Format
Description
Id
X UID The web tracked url click's identifier.
TrackedUrlUid X UID The unique identifier of the tracked URL click.
TrackedUrlName X String The name of the tracked URL that was clicked.
ClickDate X YYYY-MM-dd ±hh:mm The date and time the URL was clicked on.
WebTrackedUrlId X UID The unique identifier of the web tracked url.

Web Tracked URL Data Schema

The web tracked URL data schema will be filled out on all prospect custom activities that relate to a click of a tracked URL. This expands on the URL that was clicked and gives more information on that click.

Field Name
Required
Format
Description
Id
X UID The identifier of the web tracked url. 
WebTrackedUrlUid X UID The web tracked url.
Score X Number The number of the score assigned to the tracked URL
UrlFormat X String The actual URL that was clicked on.
UrlTitle X String The title of the URL
IsCta X Boolean If the URL is defined as a CTA in the Aimbase Link Tracker UI, this will return true.

Email Prospect Custom Activity Sample Content (JSON)

{
    "Id": 6504819,
    "ProspectActivityTypeCode": "Autoresponder",
    "ProspectActivityTypeName": "Autoresponder",
    "ProspectId": 255437,
    "LeadId": 77265,
    "OwnerId": null,
    "DealerId": null,
    "EmailSentId": null,
    "Message": "An autoresponder email of type: Welcome was sent to the lead.",
    "EventDate": "2020-09-17T19:29:53.173",
    "CreateDate": "2020-09-17T19:29:53.173",
    "UpdateDate": null,
    "RegistrationHistoryId": null,
    "WebSessionId": null,
    "WebTrackedUrlClickId": null,
    "WebPageActionId": null,
    "ViewMoreUrl": null,
    "SendSubscriberId": 14734252,
    "AuthenticatedDealerId": 455,
    "ObfuscatedMessage": "An autoresponder email of type: Welcome was sent to the lead.",
    "RecordId": null,
    "RecordType": null,
    "Prospect": {
        "Id": 255437,
        "ProspectUid": "9b6cef38-7717-4b20-b1c0-73a69e2cf8c9",
        "ProspectAggregationId": 214176,
        "ExternalId": null,
        "FirstName": "John",
        "LastName": "Doe",
        "Email": "John.Doe@rollick.io"
    },
    "Lead": {
        "Id": 77265,
        "LeadUid": "e0232197-5054-4e01-940c-05d89f918c5c",
        "ExternalId": null,
        "LeadDate": "2020-09-17T19:27:45.917",
        "LeadTypeCode": "Contact Dealer",
        "LeadTypeName": "Contact Dealer",
        "LeadCategoryCode": "manufacturersite.com",
        "LeadCategoryName": "manufacturersite.com",
        "LeadSourceCode": "Email",
        "LeadSourceName": "Email",
        "LeadCampaignCode": "CampaignA",
        "LeadCampaignName": "Campaign A",
        "LeadStatusCode": "Pending",
        "LeadStatusName": "Pending",
        "DealerId": 455,
        "Dealer": {
            "Id": 455,
            "Name": "Dealer A",
            "DealerNbr": "1001",
            "ManufacturerId": 2,
            "ManufacturerCode": "MFG"
        }
    },
    "Dealer": null,
    "AuthenticatedDealer": {
        "Id": 455,
        "Name": "Dealer A",
        "DealerNbr": "1001",
        "ManufacturerId": 2,
        "ManufacturerCode": "MFG"
    },
    "SendSubscriber": {
        "Id": 14734252,
        "EmailAddress": "John.Doe@rollick.io",
        "SendSubscriberUid": "a9510f1e-5e49-451d-8541-6e19e60f558a",
        "SendId": 228164,
        "OpenCount": 0,
        "ClickCount": 0,
        "UnsubscribeCount": 0,
        "SpamComplaintCount": 0,
        "BounceCount": 0,
        "FailureCount": 0,
        "DeliveryCount": 1,
        "CreateDate": "2020-09-17T19:29:32.44",
        "SenderProfileName": "Sender A",
        "SenderProfileLocal": "Sender A",
        "SenderProfileDomainUrl": "mail.manufacturer.com",
        "Send": {
            "Id": 228164,
            "SendUid": "732979e1-76f8-46a4-b2fc-3ad7a9e75912",
            "EmailCode": "Welcome",
            "EmailName": "Welcome",
            "EmailVersion": "6",
            "EmailTypeCode": "Lead Autoresponder",
            "EmailTypeName": "Lead Autoresponder",
            "SendStatusCode": "Sent",
            "SendStatusName": "Sent",
            "SendDate": "2020-09-17T19:29:31.393",
            "SentDate": "2020-09-17T19:29:52.737",
            "SubscriberCount": 1,
            "ProcessedDate": null,
            "Medium": null,
            "LeadSource": null,
            "Referrer": null,
            "Event": null,
            "Campaign": null,
            "ReplyTo": null
        }
    },
    "WebTrackedUrlClick": null
}

Click Prospect Custom Activity Sample Content (JSON)

{
    "Id": 6504556,
    "ProspectActivityTypeCode": "Email Link",
    "ProspectActivityTypeName": "Email Link",
    "ProspectId": 255408,
    "LeadId": null,
    "OwnerId": null,
    "DealerId": null,
    "EmailSentId": null,
    "Message": "An email link (Videos) was clicked.",
    "EventDate": "2020-09-16T02:20:30",
    "CreateDate": "2020-09-16T02:20:32.4",
    "UpdateDate": null,
    "RegistrationHistoryId": null,
    "WebSessionId": null,
    "WebTrackedUrlClickId": "8aa575bb-4fba-424d-91b3-010f7e017b31",
    "WebPageActionId": null,
    "ViewMoreUrl": null,
    "SendSubscriberId": null,
    "AuthenticatedDealerId": null,
    "ObfuscatedMessage": null,
    "RecordId": null,
    "RecordType": null,
    "Prospect": {
        "Id": 255408,
        "ProspectUid": "168bef27-d447-4efe-bb8f-c08053bb619b",
        "ProspectAggregationId": 214193,
        "ExternalId": null,
        "FirstName": "John",
        "LastName": "Doe",
        "Email": "John.Doe@rollick.io"
    },
    "Lead": null,
    "Dealer": null,
    "AuthenticatedDealer": null,
    "SendSubscriber": null,
    "WebTrackedUrlClick": {
        "Id": "8aa575bb-4fba-424d-91b3-010f7e017b31",
        "TrackedUrlUid": "589f07c1-7919-4403-923d-97856c00952b",
        "TrackedUrlName": "Videos",
        "ClickDate": "2020-09-16T02:20:30",
        "WebTrackedUrlId": "32bf4636-4edd-4902-aacd-2151482bdc27",
        "WebTrackedUrl": {
            "Id": "32bf4636-4edd-4902-aacd-2151482bdc27",
            "WebTrackedUrlUid": "589f07c1-7919-4403-923d-97856c00952b",
            "Score": 5,
            "UrlFormat": "http://www.manufacturer.com/videos/",
            "UrlTitle": "Videos",
            "IsCta": false
        }
    }
}