You are on page 1of 50

Module 1

Intermediate Recipe Concepts


Workato University
Intermediate Course
After completing this session, you’ll be able to

● Know the different types of Triggers and Actions

● Explore recipe jobs and versions

● Know recipe fundamentals

Integrate. Automate. Innovate Proprietary and Confidential 2


Agenda for Module 1 (Intermediate Recipe Concepts)
1. Recap (Basic Course)

2. Connection

3. Triggers

4. Actions

5. Jobs

6. Versioning

7. Settings (Concurrency)

Integrate. Automate. Innovate Proprietary and Confidential 3


Recipes Recap

● Automate workflows or business processes built by users that can span multiple
applications.
● Comprises of one trigger and one or more actions.
● It will run automatically in background to look for trigger events and carry out
recipe actions.

Integrate. Automate. Innovate Proprietary and Confidential 4


Connections
Workato Recipe Connection Authentication

when user provides


credentials
Authorize Workato to
Connector Connection
access the application
basic, token, oauth, etc.

when active uses


connections
Recipe Connection

Authentication Options:
○ Basic auth (username/password), OAuth2, JWT, HeaderAuth
○ Security keys and API tokens
Recommend: OAuth, when supported by app

Integrate. Automate. Innovate © Copyright 2019 Workato Inc. All rights reserved
Triggers : Types

Trigger
Dispatch Type
mechanism

Polled Single Created

Real-time Batch/bulk Updated

Scheduled Deleted

Integrate. Automate. Innovate Proprietary and Confidential 6


Triggers : Types

Trigger
Dispatch
mechanism

Polled Single

Real-time Batch/bulk

Scheduled

Integrate. Automate. Innovate Proprietary and Confidential 7


Triggers: How it works
In sequence Delivered in same order as events were
delivery created or modified (in app).
Trigger events
No duplicates Workato maintains a record of trigger
events, each trigger event is processed
only once.

Flow control Multiple jobs are processed concurrently, Result row 9


Wait before
while trigger events are processed dispatching
Result row 8
synchronously.
Result row 7
Guaranteed No data is lost, even during server
Result row 6
delivery downtime and unstable network.
Result row 5 Cursor position
Durable cursor Keeps track of what has been processed,
position will resume from where it stopped.

Ascending Chronological order, oldest records Create jobs


order processed first.

Integrate. Automate. Innovate Proprietary and Confidential 8


Polling Triggers
● Periodically querying the app to check
for new events, implemented by
Workato automatically

● Frequency dependent on the type of


Workato plan, as low as 5 minutes, up
to 30 mins

● When first started, polling trigger will


fetch all events after From date - list
or custom value; can only be set once

● If require reset of the parameter, a


copy of the recipe has to be made

Integrate. Automate. Innovate Proprietary and Confidential 9


Real-time Triggers

● Usually built on top of an asynchronous


notification mechanism
● Typically requires registration in connected app
(via API or manually through app interface)
● When event triggers, app will send notification to
Workato and generate trigger event
● Most real-time triggers are built on webhooks:
○ No delay
○ More efficient

Integrate. Automate. Innovate Proprietary and Confidential 10


Application Scheduled Triggers - Fields

● Hourly and daily schedule


can set ‘Yes’ or ‘No’ for all
the days
● Monthly:
○ User able to set the
Hour, Minute, Day of
month
○ Set batch size to
process the data

Integrate. Automate. Innovate Proprietary and Confidential 11


Application Scheduled Triggers

● Trigger will fetch all events matching the specified criteria


● Return events that have already been picked up previously
● Return events in batches, where user able to specify the maximum batch size
○ Example, if batch size is set to 100 and there are 420 new events
○ 5 jobs will be created

Example of applications that support scheduled triggers:


● Salesforce
● Workday
● ServiceNow
● SQL Server

Integrate. Automate. Innovate Proprietary and Confidential 12


Scheduler by Workato

Two Types:

● New Scheduled Event: Specify time to start


and time intervals

● New Scheduled Event (advanced): Specify


days of the week and time

Integrate. Automate. Innovate Proprietary and Confidential 13


Trigger Dispatches

Single triggers Batch triggers

● Useful for continuous real-time ● Used for increasing throughput, trigger


synchronization of data events are retrieved in lists instead of
● E.g. Moving opportunities from single events
Salesforce into NetSuite as sales ● E.g. moving high volume of user
orders the moment these activity data from Marketo into data
opportunities close warehouse like Redshift
● Most Workato triggers are single
triggers

Integrate. Automate. Innovate Proprietary and Confidential 14


Batch trigger

● Similar to polling
triggers
● Group size can be
specified by the user as
part of trigger
configuration

Integrate. Automate. Innovate Proprietary and Confidential 15


Batch trigger

● 1 job processes multiple rows of data or multiple records


● Larger batch size means fewer jobs and fewer API calls
● Some triggers and actions in certain connectors supports batch trigger
○ Database connectors (SQL server, MySQL, etc)
○ Cloud storage connectors that work with CSV files (Box, Amazon S3)
○ Salesforce connector
● To achieve best results, always match a batch trigger with batch actions

Integrate. Automate. Innovate Proprietary and Confidential 16


Batch trigger

Integrate. Automate. Innovate Proprietary and Confidential 17


Batch actions

● Create
● Update
● Upsert - create a record if doesn’t exist, update if record exists

Integrate. Automate. Innovate Proprietary and Confidential 18


Since/From

● Not all triggers have Since/From parameters


○ Date and time is predetermined by default
○ Offset from the time the recipe is started
● Common values:
○ Recipe is first started
○ An hour before recipe is first started
○ A day before recipe is first started, usually communicated in trigger hint for
the connector

Integrate. Automate. Innovate Proprietary and Confidential 19


Trigger Conditions

● Filtering what jobs are to be processed


○ E.g. Salesforce Opportunities that are
Closed Won
● If trigger condition is not met, job will not be
processed & no information will be logged.
● It is to filter the result/output to show to the
user
● Uses conditions such as “AND”, “OR”

Integrate. Automate. Innovate Proprietary and Confidential 20


Actions

Workato University
Actions: What does your recipe do?

Control Action types Data Data mapping

Conditions CRUD Single Mapping

Loops Search Batch/List Formulas

Error Approve Lookups


monitor

Call
recipe

Integrate. Automate. Innovate Proprietary and Confidential 22


Actions

● Every connector have an available set of actions


● Can be grouped in to following types:
○ Create
○ Update
○ Upsert
○ Search
○ Get
○ Delete

Integrate. Automate. Innovate Proprietary and Confidential 23


Actions

Integrate. Automate. Innovate Proprietary and Confidential 24


Create

● Create standard or custom object


● Example, creating Account object in Salesforce

Integrate. Automate. Innovate Proprietary and Confidential 25


Update

● Make changes to existing objects


● Input will be data to uniquely identify the object to be updated
● Return the ID or entire object of updated object

Integrate. Automate. Innovate Proprietary and Confidential 26


Search

● Search for an object


○ A list of data to help to identify an object
● Return all objects matching the criteria
● If no objects found, return an empty list instead of an error
● List Sizes can be 0, 1, > 1

Integrate. Automate. Innovate Proprietary and Confidential 27


Get

● Similar to search, but more


pinpointed
○ Require an unique ID
● It will return one unique result
○ If duplicates found, return
first record found
● Throw error if no result found

Integrate. Automate. Innovate Proprietary and Confidential 28


Upsert

● Combination of search, create or update.


● Search if object exists, if it does, update record otherwise create a new
object/object ID

Integrate. Automate. Innovate Proprietary and Confidential 29


Delete

● Allows user to delete any object


● Needs an ID to identify the object to be deleted permanently
● Only some applications support delete function

Integrate. Automate. Innovate Proprietary and Confidential 30


Actions Vary by Connector

Integrate. Automate. Innovate Proprietary and Confidential 31


Built-in Utility Actions
Many built-in utility actions - search apps for Workato

Integrate. Automate. Innovate Proprietary and Confidential 32


Running Recipes

Workato University
Instant Deployment

Test recipe

Picks up a single trigger event to run the recipe on, and stops recipe.

Start recipe

Picks up all available trigger events to run the recipe on. Recipe becomes
active and continues to listen for trigger events unless explicitly stopped.

Stop recipe

Stops an active recipe. Recipe ceases to listen for new trigger events unless
explicitly started.

Integrate. Automate. Innovate Proprietary and Confidential 34


Recipes Stopped by Workato

● Common causes:
○ Monthly transaction limit is hit, contact customer success team
○ Recipe experienced 60 consecutive errors when trying to fetch trigger
events. Can be due to password change or API server of application is down

Integrate. Automate. Innovate Proprietary and Confidential 35


Test your trigger (Tips)

● Use sandboxes accounts


● Add stop steps
● Test all possible scenarios and different trigger events

Integrate. Automate. Innovate Proprietary and Confidential 36


Test your trigger (Tips)
● Test all mapped data fields
and pills
○ Test all data being
moved
○ E.g. in order to move
data from Salesforce
into Zendesk, make sure
the necessary data has
information.
■ Name
■ Details
■ Phone

Integrate. Automate. Innovate Proprietary and Confidential 37


Jobs

Workato University
Jobs Report and Jobs

● When an active recipe


processes a trigger event, i.e.
actions in the recipe are
executed, it results in a job.

● The jobs report is a record of all


processed jobs. It can be
customized to display data
values relevant to the job.

Integrate. Automate. Innovate Proprietary and Confidential 39


Repeat Jobs to resolve errors

● Does not pick up a new trigger event


● Repeated jobs use the cached trigger event data and run on the latest recipe version
○ Use the latest data by adding a GET action and use its data output for field mapping

Integrate. Automate. Innovate Proprietary and Confidential 40


Customizing the job report

Integrate. Automate. Innovate Proprietary and Confidential 41


Timeouts

● If a job or single step is taking too long to execute, it will time out
● Current limit is 25 seconds for single step and 90 minutes for a single job
○ An error message for job that times out will explicitly mention the reason

Integrate. Automate. Innovate Proprietary and Confidential 42


Recipe Versions

● Every time a recipe is saved, it is saved as a version.


● Previous versions of a recipe can be restored at any time.
Save, Clone or Delete
Driven by Workato when
schema of objects change

Driven by user actively


Integrate. Automate. Innovate changing the recipe Proprietary and Confidential 43
Recipe Concurrency

● Increase data throughput in Workato via concurrency


● Can be up to 5

Integrate. Automate. Innovate Proprietary and Confidential 44


RecipeOps

Job rerun
Error
store

Recipe
event
Notifications

Recipe start, stop,


error, job failure, etc. Build policies using
Recipes recipes or API to
User defined restart, rerun jobs, start
recovery recipe/dependant
recipe, pagerduty,
API create JIRA ticket, etc.

Integrate. Automate. Innovate Proprietary and Confidential 45


https://docs.workato.com/recipe-ops.html#new-failed-job-trigger
Integrate. Automate. Innovate © Copyright 2019 Workato Inc. All rights reserved 46
Summary

Workato University
Summary

● Triggers
○ Determine what event to listen to and execute the action
○ Polling
○ Real-time
○ Scheduled
○ Single vs Batch
○ Since/From
● Actions
○ A set of actions to perform the logic of recipe
○ Create, Update, Search, Get, Upsert and Delete

Integrate. Automate. Innovate Proprietary and Confidential 48


Summary

● Test, Start, Stop recipe


● Jobs report
○ Customs jobs report
○ Job status
○ Jobs details screen
○ Rerun jobs
● Recipe Version
● Recipe Concurrency
● RecipeOps

Integrate. Automate. Innovate Proprietary and Confidential 49


End of Intermediate Recipe Concepts

Workato University

You might also like