You need to sign in to do that
Don't have an account?
How to send leads from our SFO to an API - How would I go about doing this?
My question is in two parts:
In the ideal world - I would also like to send leads to the API based on a filter, i.e. Record Type.
The URL to push the data to is http://api.WebsiteAddress.co.uk/public/APITP
One thing to note is that the id's of the API are different from our SFO id's for the equivalent field.
The API field ids are:
name (The name of person enquiring)
postcode (The postcode of the person enquiring)
phone (The phone number of the person enquiring)
adCode (The advert code assigned to you, usually something like TPWST)
productRef (The product reference – will be Stairlifts)
email (The email of the person enquiring)
How would I map our field data across to the new fields?
All of the above would be automated, when a lead comes into our SFO via a webform, based on Record Type criteria, it would fire....
This is a very new area for me, any additional reading or assistance would greatly be appreciated recommendations
Thanks in advance!!
In the ideal world - I would also like to send leads to the API based on a filter, i.e. Record Type.
The URL to push the data to is http://api.WebsiteAddress.co.uk/public/APITP
One thing to note is that the id's of the API are different from our SFO id's for the equivalent field.
The API field ids are:
name (The name of person enquiring)
postcode (The postcode of the person enquiring)
phone (The phone number of the person enquiring)
adCode (The advert code assigned to you, usually something like TPWST)
productRef (The product reference – will be Stairlifts)
email (The email of the person enquiring)
How would I map our field data across to the new fields?
All of the above would be automated, when a lead comes into our SFO via a webform, based on Record Type criteria, it would fire....
This is a very new area for me, any additional reading or assistance would greatly be appreciated recommendations
Thanks in advance!!
- Ensure that your API endpoint can handle bulk data
- Write a trigger on insert of a Lead object
- Iterate over all Leads and find the ones that match your criteria
- Build up a list of Leads to send
- Pass the data to you @future method (since we're in a trigger)
- Make your callout in the @future method
This is not a "simple" thing, but it shouldn't be too difficult, assuming your API endpoint is written well.[1] https://developer.salesforce.com/page/Apex_Web_Services_and_Callouts (You care about the HTTP (RESTful) Services section)
Is there a way within this Apex class to map my field ids with that of the destination field ids?