function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ethan MartinEthan Martin 

Recieve JSON file -> Send information to Lead Object

Hello Salesforce Friends!

Can you help guide me in my research?

TLDR:I need to receive a JSON Post from Lead providers and then send that information to the Leads Object. Generally, How should I solve this problem?

Context:
I work for an insurance agency as an operations specialist. We are switching to Salesforce for our new CRM. It is a needed switch but Salesforce is much more complicated than our current CRM (Velocify)
Our mission is to reach out to interested leads and try to sell them insurance.
To make money in this industry, you have to buy internet leads
Our old CRM handled the Posting specs that allowed our lead providers to send their packaged information to Velocify. The only thing I had to do was tell Velocify, "Please link this field from the lead provider to this field in Velocify"

Now with salesforce, it seems like you have to build this from scratch.
I don't have experience with APEX (I have C++ and Python experience) but I am incredibly motivated to solve this problem and learn as much as possible. I just need a little guidance. I want to make sure I am heading in the right direction.
From my initial research, it seems like I have to 1) build a force.com page to receive the post. This give the provider an "End Point" to send the data.
From there, 2) you have to write code that can parse that information and send it to the leads object.
I am not looking for code or anything too specific. But Generally, What does this code look like? How many steps should I expect? What are the steps? What am I missing? What should I be researching to solve this problem?

Is there a better way to receive this information and send it to the fields in the leads object?

Thank you for your help!

Ethan
Hemant_SoniHemant_Soni
Hi Ethan,
First of all your reaserch is in right direction and you did a great job. I am adding step to achive this functionality.
  1. Create a public site in salesforce.(Setup > Quickfind > Sites) .
  2. Create a Rest Resource Apex Class. (Rest Resource Detail (https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation_rest_resource.htm)) (Example (https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_rest_code_sample_basic.htm))
  3. Then add this class in site.(Setup > Quick Find > Sites > Your Site > Public Access Setting Button >
    Apex Class Access).
  4. Then Provide a URL to your provide which should be in this format (https://instance.salesforce.com/services/apexrest/Your Apex Class Name).
  5. Now you should able to recive JSON in your apex class and you can process this json in your apex class.
If you need more information or need any other assistance then you direct contact me on my email.

Thanks
Hemant
Email : sonihemant.jaipur@gmail.com

 
Ethan MartinEthan Martin
@Hemant_Soni 

Thank you for taking the time to guide me in the right direction! Huge Help!

Ethan
Hemant_SoniHemant_Soni
If it helps you, can you close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.