SalesForce Integration To Create A Lead


when user send message to bot “Yo”…i want his name and Number to be created in salesforce…
My Bot is Working On whatsapp…user message on whatssapp “Yo”…and i need user Number And name.

i have created an endpoint in salesforce and hitting the Api in yellow ai as shown in Flow … how can i pass Phone And Number into Body so the lead is created automatically when user message to Bot “Yo”

You would need to collect these values using a Phone node and a Name node and store them in variables.
There is no way to collect an end user’s name without asking them for it on Whatsapp.

On the other hand, you wouldn’t need to ask for the phone number. You can use the Variables node and assign a variable called {[sender}} to the Phone variable. Then pass that in the API node.

one more question…how should i pass this value in Body → Json see my image…
what shouuld i Write in between { i want flow data here} json

thats my salesforce endpoint…which is creating a lead

Alternatively, have you considered using the Salesforce integration

Thanks a lot Gautham… :). . . . . . . . … . . … . . . … . . . … . . . . . . … . . . . . . … . . . . . . . . . . . … . .
. . . . . . . . . … . … . …

my access token is expired… where should i write code for regenate token again and again…so i dont have to come back and regenarte the token by myself.

and can you provide me the code…

@Deepak_Kumar
You can use an API to create and SF token and append a Bearer to the token before passing it into the next API call.

https://apim.docs.wso2.com/en/latest/includes/reference/connectors/salesforce-connectors/sf-access-token-generation/

ohh thanks there is option in salesforce so the access token dont get expire…