Zapier trigger on update - zapier

I want to write an update trigger for my Zapier app as Trello has
"Card Updated" - "Triggers when a Card is updated in Trello.". However, I can't find any good examples, any idea how to do that?
Thanks

David here, from the Zapier Platform team.
To understand updates, you must first understand the way Zapier does deduplication. Namely, we keep a list of all the ids we've seen over the lifetime of the zap and only trigger once for each. This makes it easy to trigger on a new card via polling.
The easiest way to do updates is via REST hooks. When there's a change on your end, you POST to us and let us know. The best version of this enumerates which field(s) changes and their old and new values.
While it's technically possible to do this via polling as well, the UX is really tough. Instead of using the id, you'd need to make a new id out of the id and whatever you're interested in tracking updates for. If that was the "assignee" field, you could edit each card in your poll result to have the id id:assignee. That way, when a card was reassigned from Alice to Bob, the dedup system would see a new id (5:alice and 5:bob, respectively). It's hard to extrapolate that out to all fields though, and it's next to impossible to tell what fields changed via a poll. There are some other creative ways to handle it building the id, but the UX to the end user is limited to knowing that a card probably updated (but not knowing in what way).
Hope this helps. ​Let me know if you've got any other questions!

Related

Anonymous contact form iOS app

I currently work at a school and have an idea to create an app that allows students to contact a grown up (for example, the principle) anonymously through an app. The app would quite simply consist of a contact form. I am trying to find out the best, and easiest way to achieve this without setting up servers with a separate API. Does anyone have a suggestion on how to achieve it? Is there any way to set up an e-mail form with a pre set recipient and a built in sender-account? Please guide me in the right direction.
You would need to implement an SMTP client. You can use open source code like skpsmtpmessage
It's likely that their example app could be your solution.
Your biggest problem will be the deployment. You definitely need to pay an $99/y developer account and add all the students device ID's to your account (with a maximum of 100 devices/y) or register all of them as beta tester (I don't know the limitations).
Probably this isn't doable so easily, as it seems you don't have iOS developing experience so far. Maybe you can find something on the app store that works with self hosted databases. But you definitely need to host some kind of webApp/API.
You may want to give Appygram a try to handle the back-end if you are able to set up the contact form itself. While it's a separate hosted API, at least you don't have to build/manage it.
Appygram is a free web service that would allow you to configure all the details such as which adults could be contacted, their point(s) of contact (i.e. email address), and it would process and send all the submissions for you. All your app needs to do is send a form post request.
A nice thing about having this information outside of the iOS app itself is that you can change the contact details on the fly without requiring an update to the iOS app itself. Whether you use Appygram (which, since I contribute to it, I am slightly biased toward!) or something similar, I would say that since this is for students, I would recommend a solution that would allow you to update your configuration without requiring app updates.
Finally, I'd second what Julian said. The challenge here could be with deployment. One possible alternative would be to make this a mobile-friendly web page accessible only via student login or on the school network (or both). Would probably be easier development-wise and wouldn't require installs nor the hurdles that Julian described with device registration, etc. And, Appygram would still work with this setup as well.
Good luck!

Can TFS 2013 have email notications to multiple users that watch a work item

I'm looking to reproduce the Jira watch functionality in TFS 2013. In Jira, you can click a link to watch an item and thereafter you will be notified when anything on that item changes.
I know on TFS you can:
be emailed if anyone changes a bug you are assigned to
manually email a bug to anyone at any time
Create a custom report and pin it to your home page to notify yourself of things (like this maybe?)
I can imagine creating a new field that will accept multiple users and creating a custom email notification to notify everyone in that list if the work item changes. But that seem like a whole lot of work and I'm not sure were to start if that is the way do do this.
What's the easiest way to get functionality like watching a work item? If it's easy and similar to the Jira functionality that is better for me than exactly the same and hard to do.
Sure, you can setup email alerts based on many different criteria, including what you asked for.
You need to go to the Alerts section, and create a new custom alert, and you can put in the ID of whatever work item you want to "watch". By default it includes the clause AuthorizedAs <> [Me] which will make sure it doesn't email you for changes that you make, but you can remove that clause if you'd like.

Eventbrite API: What does event_list_attendees modified_after compare to?

I looked through the questions and found a question somewhat related but it wasn't the same.
If you use the event_list_attendees api call you get back a list of attendees. Those attendees have a modified field. One of the possible parameters in the api call is modified_after.
My question is regarding what triggers the modified field to update? Is this a user profile related field or is it related to this particular event ticket purchase? The api describes these two as the following:
modified_after Return only attendees whose “modified” value is equal
to or after this date/time (e.g., “2013-01-28 00:00:00″)
modified The date and time the event was last modified, in ISO 8601
format (e.g., “2007-12-31 23:59:59″).
Perhaps to explain why I am wondering what triggers modified to update. The goal is to create a small, one day use, mobile website that will allow users to see who has shown up so far for a local event I am working with. I know the api does not directly support this functionality. In my case however "close enough" is "good enough". If someone's ticket being scanned at the door triggers the modified field that would be sufficient.
So, does it?
Great question!
The modified attribute relates only to the individual attendee in the order. So, it won't be triggered by the account wide profile changes for that respective user. However, if a user logs in to Eventbrite and changes the information that specifically relates to this event (example: they change the spelling on their last name for this specific order).
Alternatively, you can actually use /event_list_attendees and set "display_full_barcodes" to "true" to see the status of the barcodes. When the barcode is used, you'll know that someone has been scanned in.
If you come up with a cool hack, then we'd love to check it out!
Hope that helps!

How to design a good QuickBooks integration solution

I have now played with the QBO and QBD APIs and feel I have a fair understanding of how it thinks and how to interact with it. So now it is time to design the actual integration solution.
Inside my application you can create new customers, quote services, perform services, and soon, pass invoices to QuickBooks, sounds easy.
But what if the customer is not in QB yet? No problem - for each invoice I will look up the customer (need the id anyway) and if it doesn’t exist, add it. But if I have to look up the customer for each invoice it seems like it might be slow. I will likely have 30,000 customers and have 500-3000 invoices per day.
So my question is this; what are others doing?
a) Are you storing the QB id for each customer in your data?
b) How do you detect address changes (changed in your app and changed in QB)?
c) Is the batch submission interface so much faster I should use that?
Thanks for your help!
We often times do store the QB id in our database for use. If we post an invoice into QB, we'll then store the QB id for future use if we need to modify it.
As far as detecting changes on the customer record and other info, there's a couple ways to handle the conflict resolution. One is to keep a timestamp on your side as to when changes are made. You can then compare this with the timestamp of the last change on the QB record and then make your decision as to which one gets updated.
FreddyMac,
To detect changes on the Intuit side you can construct a query with a CDCasOf Filter, which will return only the data that has changed since a date you provide. (ChangeDataCapture as of)
https://ipp.developer.intuit.com/0010_Intuit_Partner_Platform/0050_Data_Services/0500_QuickBooks_Windows/0100_Calling_Data_Services/0015_Retrieving_Objects
You need to keep track of data changes on your side.
The batch submission is not faster, its just easier for you to write the code.
The IPP SDK can queue the API calls for your and aggregate the responses.
regards,
Jarred

Rails - Create separate table or bypass all model validation?

I am currently using wepay with rails. Don't worry this post is nothing about wepay.
So when a customer wants to buy something from my site, he/she will be redirected to wepay.
Then after paying on wepay, wepay will redirect the user to /purchases/received
After X amount of time, Wepay will also do a post call to /purchases/callback to tell me that the payment has been captured (credit card processing is slow)
So my original plan is as follows:
For the Purchase model, have a field, wepay_id and wepay_confirmed.
When the user place an order on wepay, the redirection to /puchases/received will create a purchase instance and save in my db
When the callback is called look up by wepay_id and then set wepay_confirmed to true.
However, as I discovered that the X amount of time could be so fast that /purchases/callback is called before /purchases/received could create the object.
So now I have two options:
Allow /purchases/callback to create an empty Purchase instance with just the id and confirmed = true. As I was doing this, I realized that I no longer can validate my model in the traditional manner. This really bugs me.
Create a separate table called Wepay_Confirmed. Whenever callback is called, create an entry in wepay_confirmed. Map the presence of an (checkout_id) in this table to Purchase.confirmed attribute.
I am thinking of doing 2. How can I do this? Do I have to generate a scaffold for a specific model to map to Wepay_Confirmed?
If you have any other suggestions, please reply
I would try to keep your application the way it is because it does make sense however you should look into returning an error code to wepay and have them submit the request later after the record is created.
Just emailed the developers over at WePay and got this response:
Hi Devin,
We do have automatic IPN retries. Retries happen 5 minutes after the
initial try, if the retry doesn't work, we try 15 minutes later, and
then an hour later. However, right now they are only on empty 404
responses.
The best solution is to actually just ignore the IPN if he does not
have the record in his database. Our IPNs only tell an application to
look up the checkout details with the /checkout call. They do not have
any details of the checkout. Since he should be looking up the
/checkout status anyway when he creates the checkout object on his
end, he doesn't need the IPN to tell him to look up the status in this
case.
If that doesn't work for him he can also email me at api#wepay.com and
we may be able to work out a solution.
Andrew
So it looks like you can modify the flow of you application to ignore the IPN's without a record and check manually or you can respond with a 404 and they will retry at the above intervals.
As I mentioned in my comment, I would personally prefer to create the purchase record upon purchase, then send the user to the WePay site, then handle the return trip and callback as actions to be completed against that original purchase site.
For one, that matches the reality of the transaction more accurately. When a user makes a purchase from your site, it makes sense to me that it's something you should persist at that point.
The two elements of the WePay transaction (the return trip to your site and the charge confirmation callback) would all act on that original purchase record. This will also allow you to see how many people abandon the purchase process when they hit WePay, which could reveal issues in your user experience that might help to maximize conversions.
I created a gem called wepay-rails which handles all of this for you. Under the hood it creates the entry (WepayCheckoutRecord) before sending the payer off to wepay. It has an IPN listener built in that handles the updating of that record. In my personal rails app, I am using state machine on the WepayCheckoutRecord model to track the changes to the state and doing 'things' as the state changes on that record.
I hope that helps.
Adam -
If you take the 2nd approach, you dont need to scaffold it. You can just create a migration and use it inside one of your other 'scaffolds'. Scaffolds are really just a way to get started with a resource. I dont think your intent here is to have a fully-fledged resource. Unless it is then you can use it as a scaffold.

Resources