Custom Lead API Integration

Introduction

preezie integrates with external systems by directly sending email capture or leads information through a Rest API after the user submits their information.

Set up your API integration

In order to integrate preezie with a third party system, follow the steps below:

  • After signing-in to your preezie portal navigate to Settings Tenant settings Rest Lead API:

 

  • In this tab complete the relevant fields:

    • Data type (mandatory): Lead
      The integration will be executed after the email capture form is submitted.

    • End Point type (mandatory): Custom API
      This informs preezie that the lead integration will be passed using a customized endpoint.

    • Authentication type (mandatory): Choose your system’s authentication type
      If your system uses authentication on their Rest API, it is necessary to add these on this form.

    • End Point Url (mandatory): Your API end point Url
      This is where the lead will be sent to after the lead submit.

    • Api Key Name: The parameter name attached to the Header of the API post request.
      This name can be changed according to your API.

    • Api Key Value: Your API key value
      It will be attached together in the Header of the API post request.

If your Authentication type is set to Query String Api Key then the name and key values will be passed in the Url

Check Active Save API integration

From this point, all leads configured on preezie workflow the information will be sent to the API configured above.

Lead integration json format

After the integration is Active, the preezie application will send the lead in a JSON format as shown below:

{ "TenantId":77, "DataType":"Lead", "EndpointConfig":{ "EndpointType":0, "EndpointUrl":"https://....", "EndpointAuth":1, "ApiKeyName":"x-api-key", "ApiKeyValue":"...." }, "Data":{ "Id":"400d1e3b-389c-49a1-aeea-9791cc51d768", "Source":{ "GuideSession":{ "AnsweredQuestions":[ { "Title":"State", "QuestionId":"5830", "Questions":[ ] }, { "Title":"Do you know where you want to build?", "QuestionId":"5831", "Questions":[ { "Title":"Do you know where you want to build?", "FieldName":"Name", "Answers":[ { "Id":"42884", "Title":"No specific area yet", "Value":null, "Higher":null, "Lower":null } ] } ] }, { "Title":"Do you have a Home & Land budget?", "QuestionId":"5832", "Questions":[ { "Title":"Do you have a Home & Land budget?", "FieldName":"price", "Answers":[ { "Id":"42883", "Title":"$350 - $450k", "Value":null, "Higher":45000000, "Lower":35000000 } ] } ] }, { "Title":"Are you pre-approved?", "QuestionId":"5833", "Questions":[ { "Title":"Are you pre-approved?", "FieldName":"Name", "Answers":[ { "Id":"42879", "Title":"Yes", "Value":null, "Higher":null, "Lower":null } ] } ] }, { "Title":"How many bedrooms do you need?", "QuestionId":"5834", "Questions":[ { "Title":"How many bedrooms do you need?", "FieldName":"bedrooms", "Answers":[ { "Id":"42876", "Title":"3 bedrooms", "Value":null, "Higher":null, "Lower":null } ] } ] }, { "Title":"Home size?", "QuestionId":"5835", "Questions":[ ] }, { "Title":"Land size?", "QuestionId":"5836", "Questions":[ ] }, { "Title":"What is most important to you?", "QuestionId":"5837", "Questions":[ ] }, { "Title":"When are you looking to build?", "QuestionId":"5838", "Questions":[ ] } ] }, "RecommendedProducts":[ { "ProductUniqueID":"26778", "ProductLink":"...", "ProductName":"...", "ProductImage":"...", "ProductPrice":"1000", "ScorePercentage":"100", "Rank":1 }, { "ProductUniqueID":"26778", "ProductLink":"...", "ProductName":"...", "ProductImage":"...", "ProductPrice":"1000", "ScorePercentage":"100", "Rank":2 }, { "ProductUniqueID":"26778", "ProductLink":"...", "ProductName":"...", "ProductImage":"...", "ProductPrice":"1000", "ScorePercentage":"100", "Rank":3 } ], "LeadData":{ "Name":"userName", "LastName":"userLastName", "Email":"user@icloud.com", "Phone":"123456", "DialCode":"61", "ResultsEmailRequested":true, "Comment":"test" }, "DateTime":"2021-12-06T02:50:00.109621Z", "WorkflowId":"cb3d3a22-752e-4642-3e31-08d90de2de1a", "SourceName":"Home & Land Packages", "IsResultsEmailSent":true, "IsMobile":false } } }