5. Get forms for the user's Organization

GET {{baseUrl}}/leadForms?owner=(organization:urn%3Ali%3Aorganization%3A{{organization_id}})&q=owner&count=10&start=0

At this point, the user has picked the organization (compnay page) they are trying to collect leads for and you've validated they have the proper company page role. This step will retrieve the form(s) associated with the selected organization.


5. Map Lead Gen Form fields to destination fields

Using the API response data from the previous step, your application should ask the user to map questions, consents, and hidden fields to the appropriate fields in the destination system (e.g. a CRM). All questions, consents, and hidden fields from the form should be mappable. predefinedField fields may be mapped automatically for the user, but all others will require the user to map them manually. Optionally, allow the user to map the organization id, organization name, event id, event name, product page id, product page name, form id, and form name (this additional metadata can be pulled back via the leadFormResponses endpoint in the next step). This additional metadata helps your customers with lead attribution.

Quick tip: When it comes to mapping the predefinedField fields that are auto populated from the member’s profile, it's important to understand that the localized language of the form could be a language other than English. Due to this, you should use the predefinedField field so the user doesn't have to map the same field in different form languages separately. For custom questions you will need to use the question field as there is no predefinedField for custom questions.

FieldLanguage Information
nameThis value will be translated to the localized language of the user who created the form (which could be different than the localized language of the form)
predefinedFieldENUM for the pre-populated field (e.g EMAIL)
questionThis value will be translated to the localized form language

Step 6: Ask the user what lead types they would like to sync (allow multiple)

  • Events (EVENT)

  • Company/showcase pages (COMPANY)

  • Product pages (ORGANIZATION_PRODUCT)

Request Params

KeyDatatypeRequiredDescription
ownerstring
qstring
countnumber
startnumber

HEADERS

KeyDatatypeRequiredDescription
LinkedIn-Versionstring
X-Restli-Protocol-Versionstring

RESPONSES

status: OK

{"paging":{"start":0,"count":10,"links":[],"total":3},"elements":[{"owner":{"organization":"urn:li:organization:11223344"},"hiddenFields":[{"name":"Entity name","value":"Product Page Name"}],"versionId":1,"created":1683076873761,"creationLocale":{"country":"US","language":"en"},"name":"LeadGen form for Product Page Name","id":7059336063927910400,"lastModified":1683076873761,"state":"PUBLISHED","content":{"questions":[{"questionId":2933156,"question":{"localized":{"en_US":"First Name"}},"responseEditable":true,"name":"firstName","questionDetails":{"textQuestionDetails":{"maxResponseLength":300}},"predefinedField":"FIRST_NAME","responseRequired":true},{"questionId":2935052,"question":{"localized":{"en_US":"Last Name"}},"responseEditable":true,"name":"lastName","questionDetails":{"textQuestionDetails":{"maxResponseLength":300}},"predefinedField":"LAST_NAME","responseRequired":true},{"questionId":2933148,"question":{"localized":{"en_US":"Email Address"}},"responseEditable":true,"name":"email","questionDetails":{"textQuestionDetails":{"maxResponseLength":300}},"predefinedField":"EMAIL","responseRequired":true},{"questionId":2933644,"question":{"localized":{"en_US":"Job title"}},"responseEditable":true,"name":"jobTitle","questionDetails":{"textQuestionDetails":{"maxResponseLength":300}},"predefinedField":"JOB_TITLE","responseRequired":true},{"questionId":2928380,"question":{"localized":{"en_US":"Company name"}},"responseEditable":true,"name":"company","questionDetails":{"textQuestionDetails":{"maxResponseLength":300}},"predefinedField":"COMPANY_NAME","responseRequired":true}],"description":{"localized":{"en_US":"Share your information below with Highlander Cranberries LLC to be contacted with more information about Product Page Name"}},"legalInfo":{"consents":[{"consent":{"localized":{"en_US":"Highlander Cranberries LLC may contact me via email"}},"checkRequired":true,"id":1}],"legalInfoId":1447492,"privacyPolicyUrl":"http://www.example.com/privacy-policy","legalDisclaimer":{"localized":{"en_US":"Highlander Cranberries LLC may use your name and email address to send you communications about the company's products."}}},"headline":{"localized":{"en_US":"Contact Highlander Cranberries LLC about Product Page Name"}}}},{"owner":{"organization":"urn:li:organization:11223344"},"hiddenFields":[{"name":"Event name","value":"test event July 17 2023"}],"versionId":1,"created":1689635415948,"creationLocale":{"country":"US","language":"en"},"name":"Registration form for test event July 17 2023","id":7086844583656980481,"lastModified":1689635415948,"state":"PUBLISHED","content":{"questions":[{"questionId":415148,"question":{"localized":{"en_US":"First Name"}},"responseEditable":true,"name":"firstName","questionDetails":{"textQuestionDetails":{"maxResponseLength":300}},"predefinedField":"FIRST_NAME","responseRequired":true},{"questionId":413300,"question":{"localized":{"en_US":"Last Name"}},"responseEditable":true,"name":"lastName","questionDetails":{"textQuestionDetails":{"maxResponseLength":300}},"predefinedField":"LAST_NAME","responseRequired":true},{"questionId":413956,"question":{"localized":{"en_US":"Email Address"}},"responseEditable":true,"name":"email","questionDetails":{"textQuestionDetails":{"maxResponseLength":300}},"predefinedField":"EMAIL","responseRequired":true},{"questionId":412068,"question":{"localized":{"en_US":"Company name"}},"responseEditable":true,"name":"company","questionDetails":{"textQuestionDetails":{"maxResponseLength":300}},"predefinedField":"COMPANY_NAME","responseRequired":true},{"questionId":411540,"question":{"localized":{"en_US":"Job title"}},"responseEditable":true,"name":"jobTitle","questionDetails":{"textQuestionDetails":{"maxResponseLength":300}},"predefinedField":"JOB_TITLE","responseRequired":true},{"questionId":414060,"question":{"localized":{"en_US":"Country/Region"}},"responseEditable":true,"name":"country","questionDetails":{"textQuestionDetails":{"maxResponseLength":300}},"predefinedField":"COUNTRY","responseRequired":true}],"description":{"localized":{"en_US":"Register for this event with your profile information"}},"legalInfo":{"consents":[{"consent":{"localized":{"en_US":"The event organizer may use the above information to send communications about their offerings."}},"checkRequired":false,"id":1}],"privacyPolicyUrl":"https://www.company.com/privacy","legalInfoId":509724},"headline":{"localized":{"en_US":"Registration Form"}}}},{"owner":{"organization":"urn:li:organization:11223344"},"hiddenFields":[{"name":"Entity name","value":"testing product on a company page"}],"versionId":1,"created":1683076718033,"creationLocale":{"country":"US","language":"en"},"name":"LeadGen form for testing product on a company page","id":7059335410761564160,"lastModified":1683076718033,"state":"PUBLISHED","content":{"questions":[{"questionId":415148,"question":{"localized":{"en_US":"First Name"}},"responseEditable":true,"name":"firstName","questionDetails":{"textQuestionDetails":{"maxResponseLength":300}},"predefinedField":"FIRST_NAME","responseRequired":true},{"questionId":413300,"question":{"localized":{"en_US":"Last Name"}},"responseEditable":true,"name":"lastName","questionDetails":{"textQuestionDetails":{"maxResponseLength":300}},"predefinedField":"LAST_NAME","responseRequired":true},{"questionId":413956,"question":{"localized":{"en_US":"Email Address"}},"responseEditable":true,"name":"email","questionDetails":{"textQuestionDetails":{"maxResponseLength":300}},"predefinedField":"EMAIL","responseRequired":true},{"questionId":411540,"question":{"localized":{"en_US":"Job title"}},"responseEditable":true,"name":"jobTitle","questionDetails":{"textQuestionDetails":{"maxResponseLength":300}},"predefinedField":"JOB_TITLE","responseRequired":true},{"questionId":412068,"question":{"localized":{"en_US":"Company name"}},"responseEditable":true,"name":"company","questionDetails":{"textQuestionDetails":{"maxResponseLength":300}},"predefinedField":"COMPANY_NAME","responseRequired":true}],"description":{"localized":{"en_US":"Share your information below with Highlander Cranberries LLC to be contacted with more information about testing product on a company page"}},"legalInfo":{"consents":[{"consent":{"localized":{"en_US":"Highlander Cranberries LLC may contact me via email"}},"checkRequired":true,"id":1}],"legalInfoId":1121644,"privacyPolicyUrl":"http://www.example.com/privacy-policy","legalDisclaimer":{"localized":{"en_US":"Highlander Cranberries LLC may use your name and email address to send you communications about the company's products."}}},"headline":{"localized":{"en_US":"Contact Highlander Cranberries LLC about testing product on a company page"}}}}]}