In order for our users to see such rapid results, we had to create concise and streamlined APIs. The Toovio core APIs consists of just two services, event and disposition. Every Toovio decision has its’ own workflow states or dispositions.
Event Service API
The Event service API initiates a campaign or decision, and will either return the results to be processed by the caller or deliver the results to the customer through designated channel (mobile push, email, etc).
It comes in two variants, a synchronous version and asynchronous version. Determining which API to call is use cased based.
For example if you are targeting a configured channel integration (i.e. email) then you should leverage the asynchronous API.
However, if you are integrating directly into an external system or internal channel, that would only require the decision results then you would be best suited towards the synchronous API.
Sample GET /api/event call
Sample GET /api/eventsync call
The disposition service API job is to advance this state of a specific customer decision (which is triggered by the event service).
Typical customer decision workflow would consist of the following dispositions:
OFFERED – a campaign offer has been designated
PRESENTED – the offer has been delivered to the output channel (mobile, email, etc).
ACCEPTED - offer has been accepted (approved) by the receiving customer.
FULFILLED - offer has resulted in the desired action (i.e. product / incentive purchase).
Sample GET /api/dispositionOffer
/api/dispositionOffer?client=ae2ee54ab233e4e1e8a24774c577a7e3d&customerId=customer1&channel=MOBILE&channelCode=DEFAULT &transactionId=1541705110055-customer1 &offerCode=Email2&response=ACCEPTED&batch=false