Robust Business Logic: How to Leverage Workflow Rules and Formulas
Charlie LiangDemand Gen Manager, Tintri
Replace area with partner/customer logo(Remove if not needed)
Delinda TinkeySales and Marketing Automation Manager, Evolve IP
Page 2 © 2014 Marketo, Inc. #mktgnation14
What are workflows?
• In the marketing automation world, they are ways to automate standard business procedures:• Messaging• Alerts• Field Updates• Calculations• Scheduling
Page 3 © 2014 Marketo, Inc. #mktgnation14
Where can I set up workflows?
• Marketo• CRM
Workflows: An Example
Page 4 © 2014 Marketo, Inc. #mktgnation14
Workflow Use Cases and Best Bets
Marketo CRM
Email Nurturing Calculations
Scoring Advanced Logical Functions
Lists/Segmentation Custom Objects
Multi-Step Flows Text Manipulations
Time-Based Flows Date/Time
Logical Functions
Page 5 © 2014 Marketo, Inc. #mktgnation14
Examples of Workflows Best for CRM• Write to the Campaign Member or other objects for
reporting• Track your lead source history• Calculate project timeframe• Parse area codes
Page 6 © 2014 Marketo, Inc. #mktgnation14
Writing to the Campaign Member Object
CampaignCampaign Member
Lead
Contact
Page 7 © 2014 Marketo, Inc. #mktgnation14
Benefits
• Reportable in SFDC• Visible to anyone with a SFDC license• Just say “no” to new fields
Page 8 © 2014 Marketo, Inc. #mktgnation14
Example
Set up a server-side post: https://community.marketo.com/MarketoResource?id=kA650000000GsXXCA0
Page 9 © 2014 Marketo, Inc. #mktgnation14
Case Study
Page 10 © 2014 Marketo, Inc. #mktgnation14
Step 1 – Lead/Contact Field
Page 11 © 2014 Marketo, Inc. #mktgnation14
Step 2 – Campaign Member Field
Page 12 © 2014 Marketo, Inc. #mktgnation14
Step 3 – Create Workflow Rule #1
LeadCampaign Member
Page 13 © 2014 Marketo, Inc. #mktgnation14
Step 3 – Create Workflow Rule #1 - Details• Object: Campaign Member• Description: Transfer campaign notes from a lead to
the campaign member object when a lead is added to a campaign
• Evaluate rule when record is created• Run the rule if the following formula evaluates to true: ISBLANK(ContactId ) && ISBLANK( Campaign_Notes__c )• Add a field update to the Campaign Member Notes
field (on the campaign member) using this formula:Lead.Web_Lead_Comments__c
Page 14 © 2014 Marketo, Inc. #mktgnation14
Step 4 – Create Workflow Rule #2
ContactCampaign Member
Page 15 © 2014 Marketo, Inc. #mktgnation14
Step 4 – Create Workflow Rule #2 - Details• Object: Campaign Member• Description: Transfer campaign notes from a contact
to the campaign member object• When the following formula is true:NOT(ISBLANK(ContactId )) && ISBLANK( Campaign_Notes__c ) && NOT(ISBLANK( Contact.Web_Lead_Comments__c ))
• Update Campaign Notes field using this formulaContact.Web_Lead_Comments__c
Page 16 © 2014 Marketo, Inc. #mktgnation14
Step 5 – In Marketo
Page 17 © 2014 Marketo, Inc. #mktgnation14
Things to remember…
• Is your program synced with a campaign?
• Is your form nested within your program?
Page 18 © 2014 Marketo, Inc. #mktgnation14
Example
Page 19 © 2014 Marketo, Inc. #mktgnation14
Example
REFERRAL SUBMITTED BY Name: {{lead.Referral First Name}} {{lead.Referral Last Name}} Company: {{lead.Referral Company}} Email: {{lead.Referral Email}} Phone: {{lead.Referral Phone}}
Page 20 © 2014 Marketo, Inc. #mktgnation14
Bonus: Conquer Concatenation
Page 21 © 2014 Marketo, Inc. #mktgnation14
Bonus: Conquer Concatenation
• Use Excel Macro to concatenate a range of data into one cell• Press ALT+F11 to open the visual basic editor• Copy and paste the code on the next slide in the box that
appears
Page 22 © 2014 Marketo, Inc. #mktgnation14
Bonus: Conquer Concatenation
Function ConCat(Delimiter As Variant, ParamArray CellRanges() As Variant) As StringDim Cell As Range, Area As VariantIf IsMissing(Delimiter) Then Delimiter = ""For Each Area In CellRangesIf TypeName(Area) = "Range" ThenFor Each Cell In AreaIf Len(Cell.Value) Then ConCat = ConCat & Delimiter & Cell.ValueNextElseConCat = ConCat & Delimiter & AreaEnd IfNextConCat = Mid(ConCat, Len(Delimiter) + 1)End Function
Page 23 © 2014 Marketo, Inc. #mktgnation14
Bonus: Conquer Concatenation
• Use your new function!• Example: =ConCat (“-”, A1:C1, “MUS14”, D1:F1)
• “-” in the first argument is the delimiter and is required. You may choose to leave it blank, but keep the comma there as a placeholder
Page 24 © 2014 Marketo, Inc. #mktgnation14
Bonus: Conquer Concatenation
Page 25 © 2014 Marketo, Inc. #mktgnation14
Intro - Tintri
Enterprise storage optimized for virtualization
Founded in 2008 HQ in Mountain View, CA
200 employees
Page 26 © 2014 Marketo, Inc. #mktgnation14
Intro – Tintri
Appsdrive business
1
Infrastructure exists to support apps
2
IT infrastructure must learn and adapt
3
IT staff should manage apps
4
What we believe
Page 27 © 2014 Marketo, Inc. #mktgnation14
Keep Track of Your Lead Source(s)
• Use Case: Lead Source attribution• Types:
• First touch• Last touch• Multi-touch• Weighted Multi-touch
Replace area with partner/customer logo
(Remove if not needed)
Page 28 © 2014 Marketo, Inc. #mktgnation14
Keep Track of Your Lead Source(s)
• What you’ll need:• Lead Source History fields• 2 Sets of Workflows & Field Updates
Replace area with partner/customer logo
(Remove if not needed)
if(ischanged( Source )=true, PRIORVALUE(Source _history__c ) & " " & "|" & " " & Source, Source_history__c )
Page 29 © 2014 Marketo, Inc. #mktgnation14
Keep Track of Your Lead Source(s)
Replace area with partner/customer logo
(Remove if not needed)
Page 30 © 2014 Marketo, Inc. #mktgnation14
Calculate Prospect Timeframe
Page 31 © 2014 Marketo, Inc. #mktgnation14
Calculate Prospect Timeframe
• These were relevant in 2005!• How do you avoid being stuck in 2005?
Replace area with partner/customer logo
(Remove if not needed)
What? Who are you??
I’m ready to buy in 2 months!
2014Hi there, I see you’re ready to buy in 2 months!
2005??
??
Page 32 © 2014 Marketo, Inc. #mktgnation14
Calculate Prospect Timeframe
• Solution: There’s a workflow for that• You’ll need 3 fields:
• Timeframe Date Submitted (date)• Project Timeframe Days (number)• Project Timeframe (formula)
Replace area with partner/customer logo
(Remove if not needed)
Page 33 © 2014 Marketo, Inc. #mktgnation14
Calculate Prospect Timeframe
• Form Submission Replace area with partner/customer logo
(Remove if not needed)
Project Timeframe (days) = 75
Page 34 © 2014 Marketo, Inc. #mktgnation14
Calculate Prospect Timeframe
• Use a Marketo Workflow to set timeframe submitted = today
Replace area with partner/customer logo
(Remove if not needed)
Page 35 © 2014 Marketo, Inc. #mktgnation14
Calculate Prospect Timeframe
• Project Timeframe formula: Replace area with partner/customer logo
(Remove if not needed)
if(or( ISBLANK( Timeframe_date_submitted__c ) , ISBLANK( Timeframe_days__c )),"", case(month(Timeframe_date_submitted__c + Timeframe_days__c), 1,"Jan", 2,"Feb", 3,"Mar", 4,"Apr", 5,"May", 6,"Jun", 7,"Jul", 8,"Aug", 9,"Sep", 10,"Oct", 11,"Nov", 12,"Dec","")&" "&text(year(Timeframe_date_submitted__c + Timeframe_days__c)) )
Page 36 © 2014 Marketo, Inc. #mktgnation14
Calculate Prospect Timeframe
• Output: Replace area with partner/customer logo
(Remove if not needed)
Page 37 © 2014 Marketo, Inc. #mktgnation14
Parse Area Codes
Replace area with partner/customer logo
(Remove if not needed)
+1 408-555-55551408-555-5555(408) 555-5555408-555-55554085555555408.555.55551.408.555.5555
011 1 408-555-55551 408 555 55551 (408) 555-5555408/555-55551/408/555-55551-408-555-5555+1408/555.5555
Page 38 © 2014 Marketo, Inc. #mktgnation14
Parse Area Codes
Replace area with partner/customer logo
(Remove if not needed)
Page 39 © 2014 Marketo, Inc. #mktgnation14
Parse Area Codes
Replace area with partner/customer logo
(Remove if not needed)
if(and(not(len(State)=2),not(or(upper(Country)="US",Country="CA",contains(Country,"Canada"),upper(Country)="U.S.",upper(Country)="UNITED STATES OF AMERICA",upper(Country)="USA",upper(Country)="U.S.A.",upper(Country)="US OF A",upper(Country)="AMERICA"))),"", if(or(Phone="unknown",isblank(Phone)),"", if(and(isnumber(left(Phone,1)),left(Phone,1)<>"0"),left(Phone,3), if(and(isnumber(mid(Phone,2,1)),mid(Phone,2,1)<>"0"),mid(Phone,2,3), if(and(isnumber(mid(Phone,3,1)),mid(Phone,3,1)<>"0"),mid(Phone,3,3), "ERR")))))
• Area Code Formula Field
Page 40 © 2014 Marketo, Inc. #mktgnation14
Parse Area Codes
Replace area with partner/customer logo
(Remove if not needed)• Baseball, not dumpsters
Page 41 © 2014 Marketo, Inc. #mktgnation14
Q&A
• Charlie Liang, Tintri• [email protected]
• Delinda Tinkey, Evolve IP• [email protected]
Thank You!