Best answer

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


Userlevel 1

Hey, 

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

 

icon

Best answer by Troy Tessalone 26 May 2022, 20:26

View original

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

Userlevel 7
Badge +12

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!

Userlevel 1

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 

Userlevel 7
Badge +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.

Userlevel 1

I attached the screenshoot 

 

Userlevel 7
Badge +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)
Userlevel 1

The trigger is from Paypal 

Userlevel 7
Badge +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)
Userlevel 1

Thanks I’ll try that 

Userlevel 1

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

Userlevel 1

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.

Userlevel 7
Badge +14

@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.

Userlevel 1

Thanks I’ll try it