...
This way, the API caller never needs to get setup as a channel on OneChapp (or learn full details of OneChapp API), and we can feel free to create proper jobs-to-be-done as intents first and OnePipe apps can leverage this flow first while we figure out how to turn these into standard OnePipe services a bit more measuredly.
Other advantages:
We can iterate (as we currently do) on CX and flows freely in GRB as more facts come to light based on usage
We no longer need to overly constraint CX within GRB (because we want to match standard OnePipe API flow at execution time)
We can now roll out new service bundles faster to any partner that wants reuse some of our logic. e.g. WeKurnect trying to enable pay4me in their platform (current pay4me logic is deep with non-OnePipe API elements)
...
App calls
/transact
with the right NO auth detailsIn the
details
object, app inserts the user’s message as text + a callback urlProvider responds with
PendingValidation
and a details object corresponding to the message from the underlying intent (text, menu, buttons, attachments)Where the response is delayed: Provider responds via the callback url
App calls
/transact/validate
to supply the user’s choice/textProvider responds with any of the completion codes
Successful
orFailed
if it has all it needs to finish off the intent. Otherwise go back to #3To query the status of a transaction, the app can call
/transact/query
Where the provider supports it, the app can call
/transact/reverse
to request a reversal (if supported)
...
Code Block | ||
---|---|---|
| ||
{ "status": "Successful | Failed | PendingValidation", "message": "{{The same value in provider_response.action.message}}", "data": { "provider_response_code": "00", "provider": "Benefits", "errors": null, "error": null, "provider_response": { "reference":"263636363633777", "action": { "recipientId": "2347083108908", "message": { "type": "attachments", "text": "Hi user, here are some sample attachments.", "attachments": [ { "type": "pdf", "url": "http://164.100.133.129:81/econtent/Uploads/Session3%20Classification%20of%20Car%20by%20Body%20Style.pdf" }, { "type": "image", "url": "https://www.summerhilllandscapes.com/wp-content/uploads/2016/10/SFrances_160726_3934_A.jpg" } ] }, } "meta":{} } } } |
Request (/validate
...
)
Code Block | ||
---|---|---|
| ||
{ "request_ref":"{{request_ref}}", "request_type":"benefits_intent", "auth": { "secure": "{{the message or selection from the user}}", "auth_provider": "Benefits" }, "transaction": { "transaction_ref": "70713093460718" } } |
...