Skip to content

Webhook Integration

CRF Connect Leads sent via a webhook data is available in your partner settings. Our webhook system will PUSH (as opposed to PULL or polling) a single lead at a time which looks like the below sample.

Currently webhook configuration is not self-serve, so to set up a webhook you will need to provide Connect with the following:

  • An https endpoint which can receive POST requests with a JSON body
  • Any headers you need attached to the request (name and value). This can be used to attach a secure API key
  • Whether you want to receive lead updates, or just the initial lead submission

Some HTTPS endpoint is required (i.e. https://my-service.com/leads) to receive leads from Connect. The address should be designed to be called by a machine, not a human being, and should be unique or secured with a secret transmitted in the header.

There are great tools that can jump-start your lead intake process to your own CRM system. The following services support both Microsoft Dynamics CRM and Salesforce.

Connect includes support for queueing leads for future processing as an alternative to directly POSTing the leads to an API or integration. This works by pushing your leads into a managed service such as Azure Storage.

To use Azure Storage, you must provide Connect with a pre-authenticated URL to an Azure Storage Queue or an Azure Blob Storage Container. You can then create a scheduled job to pull leads from the queue/container into your CRM system. You will need to provide Connect with a URL formatted like the following example, which can be generated for you via the Azure Portal by right-clicking on the queue and generating a Shared Access Signature with a long-lived Expiry time and the Add or Create permission.

The advantage of using an Azure storage account is that leads can be stored for an indefinite period of time on a service with a 99.99% uptime SLA guarantee, without a direct connection to your internal systems.

https://mystorageaccount.queue.core.windows.net/my-leads-queue/messages?sp=a&st=2021-03-30T17:46:08Z&se=2030-01-01T17:46:00Z&sv=2020-02-10&sig={secret}

Read more here: Azure Queue storage documentation

https://storageaccounttestl8569.blob.core.windows.net/my-leads-container?sp=c&st=2021-09-17T14:20:57Z&se=2030-01-01T22:20:57Z&spr=https&sv=2020-08-04&sr=c&sig={secret}

Read more here: Azure Blob storage documentation

The following defines the shape of the webhook payload, where types are contained in < > brackets, and types followed by ‘option’ can be null.

{
"id": <guid>, // Unique identifier for the lead
"submissionId": <guid>, // The id of the form's submission which may produce in multiple leads
"duplicateId": <string>, // A hash of some of the leads data which may be used to identify duplicates
"dateCreated": <datetimeoffset>,
"status": <leadstatus>,
"state": <"Removed" | "Submitted">,
"requestedAmount": <decimal>,
"useOfProceeds": <string option>,
"financeNeededBy": <string option>,
"hasBusinessPlan": <boolean option>,
"collateralTypes": <string option [] option>,
"ownershipDemographicTypes": <string option [] option>,
"nameOfBusiness": <string option>,
"businessAddress": <{
"line1": <string option>,
"line2": <string option option>,
"city": <string option>,
"state": <string option>,
"zip": <string option>,
"county": <string option>
} option>,
"yearsInBusiness": <string option>,
"numEmployees": <integer option>,
"industry": <string option>,
"businessType": <string option>,
"revenueLastYear": <string option>,
"revenueProjected": <string option>,
"netProfit": <decimal option>,
"firstName": <string option>,
"lastName": <string option>,
"email": <string option>,
"phone": <string option>,
"ficoScore": <string option>,
"priorBankruptcies": <string option>,
"statistics": <{
"censusTract": <string option>,
"latitude": <decimal option>,
"longitude": <decimal option>,
"craEligibleTract": <boolean>,
"isCDFIInvestmentArea": <boolean option>
} option>,
"preferredContactTime": <string option>,
"preferredContactMethod": <string option>,
"funded": <{
"fundedAmount": <decimal option>,
"fundedInterestRate": <decimal option>,
"fundedAPR": <decimal option>,
"fundedTermMonths": <decimal option>,
"fundedAmortizationMonths": <decimal option>,
"fundedDate": <datetimeoffset option>
} option>,
"willReceiveTechnicalAssistance": <boolean option>,
"technicalAssistanceOptions": <string option [] option>,
"disqualifiedReason": <string option>,
"withdrawnReason": <string option>,
"otherReasonText": <string option>,
"leadSource": {
"id": <guid option>,
"name": <string option>,
"route": <string option>
},
"servicePartner": {
"id": <guid option>,
"name": <string option>,
"route": <string option>
},
"leadOwner": <string option>,
"matchedProduct": <{
"id": <guid option>,
"name": <string option>,
"tags": <string option [] option>,
"kind": <string option>,
"termRange": <{
"min": <int>,
"max": <int option>,
"type": <string>
} option>,
"aprRange": <{
"min": <decimal>,
"max": <decimal option>,
"type": <string>
} option>,
"loanType": <string option>,
"collateralType": <string option>,
"paymentFrequency": <string option>,
} option>,
"productSet": <{
"id": <guid>,
"name": <string>
} option>,
"otherAnswers": <map<string, unknown> option>, // Any custom questions added to the form, which are not part of the standard schema, would appear here
"fraudScore": <decimal option>,
"ipAddress": <string option>
}

This is an example of what a single lead payload looks like; it contains all the answered questions provided by the applicant along with some information about what product they chose.

{
"id": "4626a582-afb9-48bf-8d86-87e6fe91a842",
"submissionId": "3295f494-0607-43ce-afff-28b5b71838e2",
"duplicateId": "Ks645Ke3aO0TOfUcdHKvQpPOd9QhOu9/RklhkHxHz2Q=",
"dateCreated": "2020-05-08T23:09:15.4796701+00:00",
"status": "Matched",
"state": "Submitted",
"requestedAmount": 25000.00,
"useOfProceeds": "Working Capital",
"financeNeededBy": "Today",
"hasBusinessPlan": true,
"collateralTypes": [ "Inventory" ],
"ownershipDemographicTypes": [ "Veteran" ],
"nameOfBusiness": "Some Company LLC.",
"businessAddress": {
"line1": "1234 Options Ave.",
"line2": null,
"city": "Minneapolis",
"state": "Minnesota",
"zip": "55234",
"county": "Hennepin"
},
"yearsInBusiness": "LessThanOne",
"numEmployees": 3,
"industry": "Retail",
"businessType": "Corporation",
"revenueLastYear": "LessThan100000",
"revenueProjected": "_100000To250000",
"netProfit": 50000.00,
"firstName": "Bob",
"lastName": "Lastnameson",
"email": "bob@somecompany.com",
"phone": "123-456-7890",
"ficoScore": "_660To699",
"priorBankruptcies": "None",
"statistics": {
"censusTract": "55124442411",
"latitude": 44.9642757,
"longitude": -93.2639915,
"craEligibleTract": false,
"isCDFIInvestmentArea": true
},
"howDidYouHear": null,
"preferredContactTime": "Afternoon",
"preferredContactMethod": "Phone",
"funded": {
"fundedAmount": 10000,
"fundedInterestRate": 1.5,
"fundedAPR": 1.2,
"fundedTermMonths": 12,
"fundedAmortizationMonths": 12,
"fundedDate": "2020-05-08T23:09:15.4796701+00:00"
},
"willReceiveTechnicalAssistance": true,
"technicalAssistanceOptions": [
"BusinessPlan"
],
"disqualifiedReason": null,
"withdrawnReason": "BorrowerStoppedResponding",
"otherReasonText": "",
"leadSource": {
"id": "94883922-a338-4f3b-bffb-a7d3c80c7ee1",
"name": "Some Referral Partner",
"route": "some-referral-partner"
},
"servicePartner": {
"id": "4fbcdfeb-68b5-4e0c-8387-a5c5a0930350",
"name": "Some Service Partner",
"route": "some-service-partner"
},
"leadOwner": "Bob Productownerson",
"matchedProduct": {
"id": "a9e40b23-0867-4cc7-b9eb-bb01d8f45db6",
"name": "Some Product",
"tags": ["Minneapolis Metro Team"],
"kind": "Loan",
"termRange": {
"min": 12,
"max": 24,
"type": "Months"
},
"aprRange": {
"min": 6.75,
"max": 9,
"type": "Fixed"
},
"loanType": "TermLoan",
"collateralType": "Secured",
"paymentFrequency": "Monthly"
},
"productSet": {
"id": "668c6030-8b80-4c49-ab37-3689469ae31f",
"name": "Some Active Fund"
},
"otherAnswers": {
"MyCustomQuestion": "Custom Value",
"FavoriteNumber": 42
},
"fraudScore": 0.15,
"ipAddress": "127.0.0.1"
}

The fraud score is a weighted composite of scores calculated based on device finger printing, the users’ IP address, and a machine learning algorithm’s determination based on several factors which will evolve over time. Any score above an internal threshold will be withheld from C2C’s partner matchmaking.

All leads have the potential for fraudulence, but scores above 0 should be accorded a higher amount of suspicion. The score can be anywhere between 0 and 1, but in practice any lead at or above 0.85 will not be matched.

Below you will find a listing of all available entries for each parameter defined in the Lead Schema above.

  • Matched: The initial state, the applicant has chosen your product
  • Reviewed: Service partner has viewed submitted applicant form
  • Contacted: Prospective applicant has been contacted by the product owner, but has not submitted an application to the service partner
  • Qualified: Lead is marked qualified
  • Funded: Lead has been completed
  • Disqualified: Lead was disqualified
  • Withdrawn: Lead stopped responding
  • Working Capital
  • Start a Business
  • Acquire a Business
  • Purchase Inventory
  • Purchase Machinery or Equipment
  • Make Building Improvements
  • Building Acquisition
  • Refinance Existing Debt
  • Other
  • Today
  • InNextTwoWeeks
  • InNextTwoMonths
  • MultipleOptions
  • Commercial Real Estate
  • Residential Real Estate
  • Inventory
  • Accounts Receivable
  • Cash
  • Investment Accounts
  • New Equipment/Machinery
  • Furniture & Fixtures
  • Vehicles
  • Used Equipment/Machinery
  • Vacant Land
  • Leasehold Improvements
  • Other
  • Women
  • Veteran
  • LGBTQ
  • Black/African-American
  • Asian
  • Hispanic/Latino/Latinx
  • Native American
  • Alaskan Native
  • Native Hawaiian
  • Pacific Islander
  • Mixed-race
  • Other
  • Startup
  • LessThanOne
  • OneToTwo
  • TwoToThree
  • ThreeOrMore
  • Accomodation & Food Service
  • Agriculture
  • Business Services
  • Construction
  • Dentists/Physicians
  • Educational Services
  • Finance & Insurance
  • Gas Stations & Convenience Stores
  • Healthcare and Social Assistance
  • Hotels
  • Information Technology
  • Landlord
  • Manufacturing
  • Mining
  • Professional Services
  • Real Estate
  • Restaurant
  • Retail
  • Transportation & Warehousing
  • Utilities
  • Waste Management
  • Wholesale Trade
  • Other
  • SoleProprietorship
  • LLC
  • Corporation
  • NonProfit
  • Other
  • LessThan100000
  • _100000To250000
  • _250000To500000
  • _500000To1000000
  • _1000000To5000000
  • MoreThan5000000
  • _700Plus
  • _660To699
  • _640To659
  • _620To639
  • _580To619
  • Below580
  • None
  • _1Prior
  • _2OrMore
  • Google
  • Facebook
  • Ad
  • Email
  • Event
  • WordOfMouth
  • LenderReferral
  • Other
  • Morning
  • Afternoon
  • Evening
  • Email
  • Phone
  • BorrowerStoppedResponding
  • Duplicate
  • LostBidToCompetitor
  • FraudOrSpam
  • Other
  • EligibilityIssue
  • CreditIssue
  • CashFlowIssue
  • CollateralIssue
  • LoanUseIssue
  • PersonalGuaranteeIssue
  • Other
  • Accounting
  • BusinessPlan
  • BuyOrSellABusiness
  • CashFlowManagement
  • CompanyFormation
  • CustomerRelations
  • CreditCounseling
  • FinancingOrCapital
  • Franchising
  • GovernmentContracting
  • HumanResourcesAndManagement
  • InternationalTrade
  • LegalIssues
  • MarketingOrSales
  • PrivateSectorProcurement
  • TaxPlanning
  • TechnologyAndECommerce

In order to test both the API and webhooks we recommend creating a test product on our QA environment and submitting leads to that product. Our QA environment is here:

Once you have created a test lead, the lead can be re-sent from the ‘Lead Webhooks’ tab in the ‘Integrations’ section of the partner portal.

Click the ‘Send Lead’ button, then paste in your test lead’s id to re-send the lead to your webhook endpoint. The status will display the response code from your API.