Setup a eLead REST Service
eLeads can pushed into improveit! 360 by using our simple REST service. The service currently only supports pushing new eLeads to the system. eLeads cannot be retrieved, updated, or deleted.
See also: eLead Standard Field Mapping
- Login as the Administrator
- Go to Setup | Develop | Sites
- If there are no Sites listed, you will have to choose a domain. If there is already a site set up, skip to Step 4.
- As a best practice, use your full company name as a run on word. For example, 'Image Landscaping' becomes 'imagelandscaping'.
- Double check the spelling because you can't undo this once you click 'Register'!
- Accept the terms and click 'Register My Force.com Domain'.
- Now that the domain is set up, click 'New' in the 'Sites' area. If a domain was already set up then you will start here.
- Leave the 'Type of new Site' as 'Guest' and click Continue.
- Fill in the form with the following values:
- Site Label: PublicSite (This can be anything really.)
- Site Name: PublicSite
- Active Site Home Page : InMaintenance (This can be anything really.)
- Leave all other fields blank
- Click Save
- Activate the site, if not active.
- Click the link under the Site Label column
- On the Site Details screen, click Public Access Settings
- Scroll down to 'Enabled Apex Class Access' and click Edit
- Under 'Available Apex Classes' select i360.eLeadREST and click Add
- Click Save
- Also on the Site Details screen, click edit to add Object Permissions.
- Under Custom Object Permissions, give the ability to Read, Create, Edit, Delete, View All and Modify All for the following Objects: Appointment, eLead, Interests, Interest Selections, Lead Source, Marketing Opportunity, Prospect, and Sources.
Your endpoint URI will be https://*domainname*.secure.force.com/services/apexrest/i360/eLead. Replace *domainname* with the domain you picked in step 3. It can also be found in the Site's detail page.
You may use the following endpont for testing purposes:
Do a POST or GET to the /services/apexrest/i360/eLead endpoint using the eLead fields to populate as query parameters. See above list of supported mapping fields.
IMPORTANT: Since the change to Salesforce Guest Users, ensure that ALL New (and pre-existing) Sites are set up with the Sharing Rules on the Source, Prospect, User, and Account (if applicable), outlined in this article: SFDC Winter '21 Guest User Access Changes and Resolutions