Skip to main content
Best answer

Trying to update a record if it exists and create one if it doesn't


Hey, 

I am trying to recreate these steps with Paypal and Salesforce. But the update record step is not working…

 

Best answer by Troy Tessalone

@ChabadAU 

If you want to update an existing amount, then you first need to find the existing Salesforce record (or create if it does not exists), then use a Formatter > Numbers > Perform Math Operation to add to the existing value, and lastly update the Salesforce Record.

View original
Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

12 replies

Danvers
Forum|alt.badge.img+12
  • Zapier Staff
  • 3731 replies
  • May 26, 2022

Hi @ChabadAU!

Could you share some more details of what’s not working? Is the step not recognizing when it needs to update something? Are you getting an error? If you can share some more details and a screenshot of how your update step is set up, that would be super helpful, thanks!

P.S. Don’t forget to obscure any personal/private information if you share a screenshot!


  • Author
  • New
  • 7 replies
  • May 26, 2022

This is what I am trying to achieve - when Paypal gets a donation it looks at Salesforce to see if that client exists:  1) if he doesn't then create him 2) if he does exist only update/add another amount to his already existing name.

 

My problem is that when I run my zap if my record already exist when it updates it it also removes the previous donation I would like it to add a new donation to the same name that already exist 


Troy Tessalone
Forum|alt.badge.img+14

Hi @ChabadAU 

Best to provide screenshots with how each of your Zap steps is configured in order for us to have proper context, thanks.


  • Author
  • New
  • 7 replies
  • May 26, 2022

I attached the screenshoot 

 


Troy Tessalone
Forum|alt.badge.img+14

@ChabadAU 

Still a bit difficult to understand your Zap steps.

Zap Steps

  1. Trigger: ???
  2. Action: Salesforce - Find Record (Opportunity)
  3. Action: Filter
  4. Action: Salesforce - Update Record (Opportunity)

This Zap step logic would always update an existing found record.

 

Seems like you may want to try this Zap step logic…

Zap Steps

  1. Trigger: ???
  2. Action: Salesforce - Find/Create Record (Account or Contact)
  3. Action: Salesforce - Create Record (Opportunity - Donation)

  • Author
  • New
  • 7 replies
  • May 26, 2022

The trigger is from Paypal 


Troy Tessalone
Forum|alt.badge.img+14

@ChabadAU 

Seems like you may want to try this Zap step logic…

Zap Steps

  1. Trigger: PayPal - Successful Sale
  2. Action: Salesforce - Find/Create Record (Account or Contact)
  3. Action: Salesforce - Create Record (Opportunity - Donation)

  • Author
  • New
  • 7 replies
  • May 26, 2022

Thanks I’ll try that 


  • Author
  • New
  • 7 replies
  • May 26, 2022

Still not doing what I want it to do I need it do not its just keeps on creating duplicate opportunities. 


  • Author
  • New
  • 7 replies
  • May 26, 2022

This is what I am trying to achieve - when Paypal gets a donation it looks at Salesforce to see if that client exists:  1) if he doesn't then create him 2) if he does exist only update/add another amount to his already existing name.


Troy Tessalone
Forum|alt.badge.img+14
  • Zapier Expert
  • 30942 replies
  • Answer
  • May 26, 2022

@ChabadAU 

If you want to update an existing amount, then you first need to find the existing Salesforce record (or create if it does not exists), then use a Formatter > Numbers > Perform Math Operation to add to the existing value, and lastly update the Salesforce Record.


  • Author
  • New
  • 7 replies
  • May 26, 2022

Thanks I’ll try it