I was trying to create a salesforce integration using zapier. able to trigger action when a new lead is created. I want to know if there is a way to trigger when an existing lead is updated. In Zapier documentation in the supported triggers update lead is not specified, I would like to know if there is any workaround for this.
David here, from the Zapier Platform team.
There is a workaround! You can find details about it here: https://zapier.com/help/salesforce/#can-i-trigger-from-updated-objects-on-salesforce
The gist is that you set up a New Outbound Message trigger, which instructs Salesforce to call out when update events happen.
Let me know if you've got any other questions!
Related
I am creating an AdminUI for my users where I set all the permission. As part of the requirements, every time that a user logins on my IdentityServer I need to set some default permissions, but those are handle on my Admin application. Which is the best way to raise an event to let that application that a user was created on the IdentityServer?
The simplest is i think to create a simple WebApi in IdentityServer that returns the latest users and then let the other application poll this API every X seconds. In that way the system is cleanly decoupled. Perhaps expose the data as a a RSS XML document or a JSON list of items.
There is a built in eventing model in IdentityServer that you could use and push notifications to the Admin application. But push is a bit more complicated to get right, especially how to deal with all the failre/error cases.
I's suggest to add a custom event sink to process UserLoginSuccessEvent or any other event you need, here is list of all builtin events. Find their code here.
In the custom sink as suggested in the other answer you can call an API on admin app to inform it about changes.
Here is a sample for custom sink.
I think to keep two applications decoupled you better to setup a service-bus for simple implementation a sub/pub mechanism. when any user complete registration(or any other actions),then as mentioned in another answer handle the events and add message. admin UI should subscribed before to receive these messages with some information to create a user related data.
I'm rebuilding the CoinbaseCommerceButton component from scratch, and in order to improve the end-user experience I want to allow the user to continue on using my app after a payment has been detected. Is there a way to do this?
There are currently two ways to do this.
1. CoinbaseCommerceButton
There is an onPaymentDetected callback as documented here. After the callback is triggered, you can safely remove the button from the DOM and allow the user to continue using your application.
2. Webhook Subscriptions
Detected payments can also be registered for via webhooks with the charge:pending event type. See here for a more detailed explanation of how this can be achieved.
When multiples users are updating the same record at that time how to notify other users that someone has updated the record recently.
So is there any provision that other user will get the updated copy of the record or will get the instant notification?
How would you come to know that record is already updated. You should use optimistic locking for this. When you have implemented optimistic locking. When you will try to update the record which is already updated. It will throw concurrency error. That you can display on UI with proper message. This record is already updated Please refresh the page and try again.
You can use web application where instant notification will show. SignalR Javascript library handle it with asp.net using SQL Dependency.
Maybe this just isn't possible with the available Salesforce actions in Zapier, but I thought I'd ask.
You can monitor for a new opportunity, but I only want to create cards for opportunities which are closed won. So if a new opportunity is created on Monday and on Friday it is Closed Won, Zapier will never get notified when it is updated.
Seems like a very common use case, I figure someone has figured this out.
Thanks!
I took this to Zapier Support and they said....
So the tricky thing here is the "New Opportunity" trigger will only
happen when the Zap sees the record for the first time. Even if it's
updated later, the Zap will not re-trigger on it.
We do have a way to trigger on updated Salesforce records, but it
would require using their Workflow Rules and Outbound Messaging
option. Then on the Zapier side, you'd use the Salesforce "New
Outbound Message" trigger.
You basically set a workflow rule + outbound message in Salesforce.
And so all your triggering conditions (like which object/field) are on
the Salesforce side.
First you'd set up the Outbound Message, specifying the object and
fields you want to send, and the Zap url:
https://help.salesforce.com/HTViewHelpDoc?id=workflow_managing_outbound_messages.htm
Then you'd set up the Workflow Rule, specifying the conditions where
the rule should trigger, and which actions to trigger (the outbound
message action that you just made):
https://help.salesforce.com/htviewhelpdoc?id=customize_wf.htm
The one caveat here is that workflow rules are only available on some
editions of Salesforce. So you may have to check and see if your
edition supports it.
Please let me know if you have any questions about that -- happy to
help!
And that worked so yay Zapier for helping me with Salesforce!
Can any one please explain post-commit logic in salesforce apex Trigger life-cycle?
How i can write post-commit logic?
What is System validation and Custom validation in salesforce?
After Insert/Update/etc. trigger log is still pre-commit. The most effective way to do this would be to use a time based workflow based of a time field you set (though this will incur a significant delay), or to use the #future annotation to fire off an asynchronous method elsewhere to do this processing.
This link from Salesforce docs is helpful in understanding the full process.
Trigger and order of execution
After salesforce has committed changes to the database following post-commit logics can be -:
1) If in the trigger you have written a code to send email then after the complete trigger finishes and the updates are committed to database then salesforce sends the email. This action of sending email can be called a post-commit logic