syndesisio / syndesis-project

Placeholder repository for project management
https://syndesis.io/
Apache License 2.0
6 stars 12 forks source link

Twitter to Salesforce Scenario #27

Closed rhuss closed 7 years ago

rhuss commented 7 years ago

Mary creates a new Twitter connection and initiates OAuth login flow. As part of this flow, she provides Twitter login credentials and grants access for iPaaS to operate on her account. With OAuth configured, she validates the connection prior to saving. She then creates a Salesforce connection, following a similar OAuth flow specific to Salesforce. With the required connections in place, Mary then creates a new integration. She selects Twitter as the start connection and "Twitter mention" as the action - no additional configuration is required for the connection action. She then selects Salesforce for the finish connection and the "Create or Update Contact" action. The iPaaS queries Salesforce for the data model for Contact in the Mary's organization's Salesforce instance; a subsequent action configuration page prompts Mary to select a unique ID field for Contacts to determine if a Contact should be updated or inserted based on data already in Salesforce. The input for the unique ID field is a drop-down list containing fields (potentially customized) in the Contact object pulled from Salesforce. Mary would like to only create contacts for users that mention her account and use a specific keyword, so she adds a filter step to the integration to only accept messages that include the keyword "brilliant". Next, she adds a data mapping step to transform a Tweet into a Salesforce Contact. Once the data mappings are created, the integration is complete and Mary publishes the integration to connect Twitter and Salesforce.

sjcox-rh commented 7 years ago

iPaaS_OAuthFlow.pdf

@rhuss @kahboom @kcbabo @dongniwang

Wanted to go ahead and add the designs for the OAuth flow to this epic. This flow shows the Twitter flow but from the iPaaS UI perspective, it should be the same for Salesforce.

Let me know if you have any feedback!

Also, Roland, Im going to try and upload this to the design repo you created sometime tomorrow as well.

Thanks!

rhuss commented 7 years ago

@sjcox-rh thanks a lot, looks good to me 👍

One open point is how it looks like when editing an existing connection. There should probably some indication that an oauth authentication is active and there might be also a button de-authenticate (i.e. to remove the authentication item) or to re-initiate an openauth authentication. Use cases might be to quickly stop all Twitter integration to work (as some kind of emergency button) or to connect with another Twitter user.

rhuss commented 7 years ago

wrt. the PDF: I have created a new repo https://github.com/syndesisio/syndesis-ux for storing all UX designs. I can help to shape it a bit, but you are completely free to adapt e.g the directory structure to your needs.

kcbabo commented 7 years ago

Great work! +1 to Roland's comments on changing authentication for an existing connection.

jimmidyson commented 7 years ago

Starting to look at the UI implementation for this now.

@sjcox-rh One thing that is missing in the design is if a connection has both an OAuth connection (authorization) plus extra configuration fields. Can we do that on the same page? Perhaps keeping the 2nd step of the flow named Configure Connector as it is now, but with the Connect (perhaps this should be called Authorize btw?) button at the top, with any further configuration fields below, like the existing form? Perhaps we can punt on that for now, as both Twitter and Salesforce connectors don't have further configuration fields, but it's something to bear in mind for future, when this may become more configurable.

dongniwang commented 7 years ago

@jimmidyson: Do you have any concrete examples of what the configuration fields may look like? I'm assuming those fields would become available after users authorized (connected) the apps/services, so the fields would appear on the screen which displays the validation message. Or, are you talking about users need to complete the configuration fields as part of the authorization?

rhuss commented 7 years ago

@dongniwang Connection can take additional parameters which are required for them to connect. An example could be the HttpConnector which requires the URL to connect, too (though not sure whether it will be possible to provide an OAuth flow around an arbitrary HTTP connector).

Also, I'm just wondering how we can detect whether an OAuth flow is required for a specific connector. It might happen even, that we might offer two different ways of authentication like user/password or OAuth. But we should confine ourselves to the simple case for now (so we just need to know whether we want to run the connector with OAuth or not).

@zregvart any thoughts here ?

zregvart commented 7 years ago

Also, I'm just wondering how we can detect whether an OAuth flow is required for a specific connector.

We do know this by looking if there is support for it, the /api/{version}/connectors/{connector}/credentials endpoint returns a value if a connector supports OAuth.

sjcox-rh commented 7 years ago

@rhuss @kcbabo @jimmidyson, Just wanted to confirm that the only updates to the OAuth flow design is to add a way for users to change authentication for an existing connection (de-authenticate, re-initiate). Is that correct? I know other suggestions were discussed but it sounds like we are punting them for now?

If that is all, I can go ahead and update the designs and create a PR for them in the UX repo.

rhuss commented 7 years ago

@sjcox-rh confirmed, that should be everything needed for now (deauthenticate and re-initiate)

sjcox-rh commented 7 years ago

@rhuss @kcbabo Created a PR in the UX repo for the latest design mocks for the OAuth flow. This includes the addition of the feature to de-authenticate and re-initiate connections.

https://github.com/syndesisio/syndesis-ux/pull/16

rhuss commented 7 years ago

@sjcox-rh thanks ! will have a look later, but maybe @zregvart and @jimmidyson are interested, too ?