Skip to content

Instantly share code, notes, and snippets.

@spiritbear
Created November 13, 2012 00:21
Show Gist options
  • Select an option

  • Save spiritbear/4063000 to your computer and use it in GitHub Desktop.

Select an option

Save spiritbear/4063000 to your computer and use it in GitHub Desktop.
Parameters for LeadCapture
default_post_params = {
lead_source: "Web Site",
lead_source_description: "Free Report: Why Reviews Matter",
assigned_user_id: "c7ae9971-e133-51a3-c054-4ea0aecc9bf3",
campaign_id: "8c4d8a24-fd3d-e06a-bf56-4f8deb288f9f",
team_id: 1,
team_set_id: "Global",
cl_type_c: "Member",
cl_industry_c: "-Other-",
status: "New"
}
post_params = default_post_params.merge({
first_name: params[:first_name],
last_name: params[:last_name],
email1: params[:email],
phone_work: params[:phone_number],
account_name: params[:company_name],
website: params[:website]
})
RestClient.post "#{SETTINGS['sugarcrm_url']}/index.php?entryPoint=WebToLeadCapture", post_params
@TedPaff
Copy link

TedPaff commented Nov 13, 2012

default_post_params = {
lead_source: "Web Site",
lead_source_description: "Demo Request from web site",
assigned_user_id: "c7ae9971-e133-51a3-c054-4ea0aecc9bf3",
campaign_id: "c5368221-9833-f718-12ec-50a1967a8562",
team_id: 1,
team_set_id: "Global",
cl_type_c: "Member",
cl_industry_c: "-Other-",
status: "New"
}

  post_params = default_post_params.merge({
    first_name: params[:first_name],
    last_name:  params[:last_name],
    email1:     params[:email],
    phone_work: params[:phone_number],
    account_name: params[:company_name],
    website: params[:website]  
  })

  RestClient.post "#{SETTINGS['sugarcrm_url']}/index.php?entryPoint=WebToLeadCapture", post_params

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment