Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

{toucan url}/Api/createlead/{guid}

Where:

  • Toucan url is the the customers toucan web site url

  • Guid is the customers Toucan Unique Company Guid

  • A JSON format should also be passed with in the body of the API call

Simple Test Version

                            {
                              "Leads": [
                                {
                                  "Lead": {
                                    "Name": "Test New Lead Via API"
                                  },
                                  "Address":
                                   [{
                                      "Address": {},
                                      "Contacts": [{}]
                                    }]
                                }
                              ]
                            }

JSON Format to create one or more new Leads

The JSON contains 4 Levels:

  • Leads where you can pass one or multiple new leads.

    • Lead containing the actual Lead information like Company Name, etc.

      • Address containing one or more Lead Addresses

        • Contacts containing one or more Lead Contacts (Linked to the Address)

All sections are compulsory even if they as not all populated.

The API will return a 200/OK if the Lead was created otherwise return a string of the reasons it failed.

Lead Section

  • Name - Lead Company Name (Compulsory)

  • Sales_Rep_ID - a Rep Code knows to TSA , usually from the back-=end ERP software. (Optional, if left blank or omitted then the TSA API default setting is used)

  • Lead_Status - (Optional, if left blank or omitted then the TSA API default setting is used, usually being Waiting Approval)

  • Lead_Status - (Optional, if left blank or omitted then the TSA API default setting is used, usually being Website)

  • Analysis_1- (Optional, in Caliq ERP terms this is usually Category)

  • Analysis_2- (Optional, in Caliq ERP terms this is usually Segment)

  • Analysis_3- (Optional, in Caliq ERP terms this is usually Region)

Example

{
  "Leads": [
    {
      "Lead": {
        "Name": "API Example Lead A",
        "Sales_Rep_ID": "REP0004",
        "Lead_Status": "Waiting Approval",
        "Lead_Source": "Website",
        "Analysis_1": "Garden Centre",
        "Analysis_2": "Tracked",
        "Analysis_3": "Cambridge"
      },
      "Address": [
        {
          "Address": {
            "Address_Line_1": "123 Example St",
            "Address_Line_2": "Address Line 2",
            "Address_Line_3": "Address Line 3",
            "Town": "Example Town",
            "Postcode": "PE28 3BQ",
            "County": "Herts",
            "Country": "England"
          },
          "Contacts": [
            {
              "Name": "John Doe",
              "Email": "john.doe@example.com",
              "Tel": "123-456-7890",
              "Mobile": "077-456-7890",
              "Website": "www.example.com"
            },
            {
              "Name": "Jane",
              "Email": "jane.doe@example.com",
              "Tel": "098-765-4321"
            }
          ]
        }
      ]
    }
  ]
}

TSA API Default Setting

In the Toucan Sales Analytics Configuration the following default settings should be populated:

image-20240807-090330.png

The Company GUID can also be found in Configurations.

image-20240807-091607.png

  • No labels