Answered

Intercom::ResourceNotFound Exception: Resource Not Found


lead
 #<Intercom::Contact:0x0000561eb31f1788 @changed_fields=#<Set: {"name", "custom_attributes"}>, @email="genuitytest+56565@work4humanity.com", @last_seen_ip=nil, @custom_attributes={"Company Name"=>"", "Company Website"=>""}, @client=#<Intercom::Client:0x0000561eb6dae938 @token="dG9rOmJkYzViNmQxXzBiZjFfNDhkNF85MDg0X2EzNjBiNDcwNmI0MDoxOjA=", @api_version=nil, @base_url="https://api.intercom.io", @rate_limit_details={}, @handle_rate_limit=false, @timeouts={:open_timeout=>30, :read_timeout=>90}>, @type="contact", @id="663b8c8ae671dfde9a0b02a0", @user_id="57858049-29f2-40b9-93d7-f9ad46352826", @anonymous=true, @phone=nil, @name="folka  devop", @pseudonym="Lime Anchor", @avatar=#<Intercom::Avatar:0x0000561eb7af9a20 @changed_fields=#<Set: {}>, @type="avatar", @image_url=nil, @client=#<Intercom::Client:0x0000561eb6dae938 @token="dG9rOmJkYzViNmQxXzBiZjFfNDhkNF85MDg0X2EzNjBiNDcwNmI0MDoxOjA=", @api_version=nil, @base_url="https://api.intercom.io", @rate_limit_details={}, @handle_rate_limit=false, @timeouts={:open_timeout=>30, :read_timeout=>90}>>, @app_id="by9ylplb", @companies=[], @location_data={}, @last_request_at=nil, @created_at=1715178634, @remote_created_at=nil, @signed_up_at=nil, @updated_at=1715178634, @session_count=0, @social_profiles=[], @owner_id=nil, @unsubscribed_from_emails=false, @marked_email_as_spam=false, @has_hard_bounced=false, @tags=[], @segments=[], @referrer=nil, @utm_campaign=nil, @utm_content=nil, @utm_medium=nil, @utm_source=nil, @utm_term=nil, @do_not_track=nil, @user_agent_data=nil>


As lead is present then why it should raised the error 
@intercom.contacts.save(lead)
| *** Intercom::ResourceNotFound Exception: Resource Not Found
 

icon

Best answer by Ebenezer.Laleye 23 May 2024, 15:52

View original

3 replies

Userlevel 3
Badge +4

Hi @jahanzaib ! Ebenezer here from Engineering Support👋.

Could you provide a bit more context as to how you got this error?

Did you get this error when you were performing a specific task, like updating attributes?

@Ebenezer.Laleye yes first of all I created the lead on the intercom just like that:
lead = @intercom.contacts.create(args)
it successfully created the lead on the intercom and after that I want to update the lead on the intercom just like 
lead = find_lead(my_args[:lead_id])

company_name = registration_info.company_name || ""

company_website = registration_info.company_url || ""

 lead.name = registration_info.full_name.to_s

lead.custom_attributes = {

"Company Name": company_name,

 "Company Website": company_website

 }

@intercom.contacts.save(lead)
and I got the lead id but when I am going to execute this line 
@intercom.contacts.save(lead)
it gives me this error:
@intercom.contacts.save(lead)
| *** Intercom::ResourceNotFound Exception: Resource Not Found
although I get the lead through postman using the lead id and I got the lead but this shows Resource not found.please help me to fixed it.Regards

Userlevel 3
Badge +4

Hi @jahanzaib,

Thank you for the extra context.

Quick question, are you able retrieve the lead after creating?

Does this error only occur when you need to update a lead?

Reply