tag presents: netsuite suiteflow 101

24
NetSuite SuiteFlow 101 By Adam Baruh Director of Professional Services TAG

Upload: tag

Post on 16-Jul-2015

298 views

Category:

Software


3 download

TRANSCRIPT

NetSuite SuiteFlow 101By Adam Baruh

Director of Professional ServicesTAG

TAG is Southern California’s Premier NetSuite Solution Provider

TAG has a team of NetSuite experts to partner with organizations from the initial project planning phase through go-live and beyond. TAG helps you manage your entire business better with NetSuite, a web-based solution and the industry’s only SaaS cloud business software that supports your entire company from ERP to CRM in a single integrated software solution.

Adam BaruhTAGDirector of NetSuite Professional [email protected]

http://www.linkedin.com/pub/adam-baruh/1/853/a/en

Baruh is a Senior Consultant and NetSuite Certified SuiteCloudDeveloper, specializing in NetSuite customization, data migration,integration and technical support. He has over seven years ofNetSuite experience, working with clients to configure NetSuite tomeet their requirements and writing technical specifications for thecreation of customized SuiteScript integration.

Baruh has experience with various NetSuite applications, includingNetSuite SuiteScript, NetSuite SuiteTalk, NetSuite WebStore, NetSuiteSuiteCommerce, SuiteBundler and other software solutions using C#,Microsoft SQL Server, ASP.Net, LINQ and JavaScript.

Today’s Agenda

1. What is a Workflow?2. What can I do with Workflows?3. Workflow Basics?4. Case Study 1: Approve Customer Workflow5. Case Study 2: Sales Order Approval Workflow6. Questions…

What is a Workflow?

• A Workflow in NetSuite is a visual tool for building complex customizations without having to know Javascript/Suitescript.

• Almost all record types in NS can have a Workflow defined

• Workflows are used to integrate business rules into NetSuite forms and records.

• Workflows can sometimes do more than scripts.

When to Workflow?

• It’s a best practice to try and achieve a result using standard functionality. Otherwise, Workflows can be used to customize the user experience for controlling business rules, behaviors and data relationships.

• Workflows by themselves cannot deal with line item fields so in this case you will have to write a script that is standalone or can be called by a workflow via a Workflow Action script.

Workflow Basics

• Initiation: Event Based versus Scheduled

• Event Definition: On Create, On Update

• Actions, Transitions, States

• Conditions: Formulas and Saved Searches

• Context: CSV Import, User Interface, etc.

• Trigger Types: Server Side versus Client

Create a Workflow

Customization Scripting Workflows New

Create a Workflow

Workflow Initiation

• Event Based• Field is Edited• Record is Saved• Etc. (will touch more on this later)

• Scheduled• Non-event based• If you want to perform an action on a

routine basis

States, Actions, and Transitions

• State - a state corresponds to a stage or status of a record within a specific business process. States contain actions and transitions.

• Action – are specific tasks performed by a workflow. Perform the specific task desired, such as Set Field Value, Add Button, Lock Record

• Transition – move from one State to another State via some defined transition condition, such as a certain field value or a button click.

Conditions

• A condition is a set of criteria that must be met in order to process the workflow action or transition. Can refer to any field on the current record or any fields in related records, as well as run-time information such as the logged on user, logged on user role, etc.

• Conditions can also be defined by specified saved searches

• Best practice = do not define conditions on workflow level, do so on action level.

Trigger Types

• Server Side• Logic within workflow is processed on the

NetSuite Server

• Client Side• Logic for workflow is processed within the

user’s browser on their computer

Server Side Triggers

• Before Record Load – Workflow action is triggered between the time the user requests a page/form and the server renders the html to the client. Use when setting default values on fields for the record form, hiding fields on the form, or locking a record. When editing behavior on “View Record” this trigger is necessary.

• Before Record Submit – Workflow action is triggered between the time when the user has pressed the submit button and the record is committed to the NetSuite database. Good if you are setting field values via some calculation when saving the record.

• After Record Submit – Workflow action is triggered after the record is committed to the database. Good to use when you want to create a record that is associated to the current record. You need to have the parent record save to the database so the child can reference it.

Client Side Triggers

• Entry – on entry into a workflow state (can also be server)• Exit – on exit from a workflow state (can also be server)• Before User Edit – Executes when the record form loads into

the browser when viewing record in Edit mode.• Before Field Edit – before committing a field edit, triggers

when user tabs or clicks away from a field after changing value

• After Field Edit – after a field has been changed• After Field Sourcing – occurs after a field has been edited,

and after all dependent fields have sourced via the change to the parent field. Example is Customer field on a sales order.

• Before User Submit – occurs every time a user clicks Save. The actions execute in the browser before any data is sent to the NetSuite database.

Server Trigger or Client Trigger?

• Some actions can only be run server-side or on the client. For example, the “Show Message” action can only be associated to a Client trigger. Because the message is to be presented in the user’s browser after some event occurred, you could not use a server trigger since that trigger only runs 1) before the html is rendered to the client or 2) after the user presses Save where the logic is processed on NetSuite’s server (not within the client’s browser)

• Add Button – which trigger will be associated to this event? Server or Client?

• See an example: Add Button action. What options are available as Triggers?

Approve Customer Workflowhttps://system.na1.netsuite.com/app/common/workflow/setup/nextgen/workflowdesktop.nl?id=24&whence=#

State 1: Add Buttons StateAction 1: Add Approve button when customer is not already approvedTransition 1: From “Approve” button click to “Approve Customer” stateAction 2: Add Reject button to reject customer approval (Admins Only)Transition 2: From “Reject” button click to “Reject Customer” state.

Workflow Configuration

• Record Type and Sub Types• Release Status• Execute as Admin• Enable Logging• Event Types: Copy, Create, Edit, View, etc.• Context: CSV Import, User Interface, etc.• Fields• Condition versus Saved Search versus Formulas

State Configuration

• Trigger On (already discussed)• Event Type (related to selected Trigger)• Context (like in Workflow Configuration)• Conditions• Parameters, etc: Save Record First, Check Condition

before Execution• Translation

Transition Configuration

• To - the state to transition to• Transition On – Choose trigger• Condition – Define specific criteria for transition

condition• Saved Search – Specify saved search that yields

transition logic• Workflow – Transition when specified workflow finishes• State – Transition based on the termination state of a

child workflow• Button – Transition on click of a button• Delay – The number of hours or days before the action

should initially be performed. Based on the time the record enters the state.

Actions• Add Button• Confirm• Create Record• Go To Page• Initiate Workflow• Lock Record• Remove Button (standard buttons)• Return User Error (server side)• Send Campaign Email• Send Email• …

Sales Order Approval Workflowhttps://system.na1.netsuite.com/app/common/workflow/setup/nextgen/workflowdesktop.nl?id=25&whence=

• Goal: A sales order should not be released to the warehouse (Pending Fulfillment) until the following approvals are obtained:

• If total > $5000, the Sales Rep’s manager needs to give approval

• Finance Department approval• Contracts Department approval

Download Workflows

If you would like to play around with the workflows demonstrated today, I have made a public bundle that is available to install:

Name: Tag SuiteFlow 101 WorkflowsAccount: TSTDRV1207757Visibility: Public

Thank you!

For questions, feel free to contact me at [email protected] or 858-210-4731