1. Help Center
  2. Customer Success Guides

How To: Advanced Workflows Defined

Using XML coding for the first time can be tricky, this article strives to make advanced workflows easier to understand.

XML is the code language we use to create our workflows in accounts, think of it as the backend of the Zoomph front end! In this article we will go over Types of Workflows, Best Practices, and Definitions of each line of code your may come across while creating and maintaining workflows. 

Workflows are used for a few basic principles: identity, maintenance, partner, and campaign tagging.

  1. Identity Workflows: creating a tag to help find an aggregate group of content — a teams owned content, player tags, mascot tag, etc.. 
  2. Maintenance Workflows: these are used to clean up feeds, you can use workflows to remove content, fix faulty tags, sort out content types, etc.. 
  3. Partner Workflows: these are PTVs and Logo + Asset Workflows, they help identify text mention and logo exposures for brand partners of our clients
  4. Campaigns: these tag specific campaigns of the social teams, branded and unbranded. Think of #WallpaperWednesday, "First Down brought to you by",  "Chick-fil-A Power Play", etc...

Best Practices:

  • When in doubt, use the Basic Edit. You can create a workflow in the Basic Edit, and switch it to advanced edit to help you start your workflow. 
  • Do Not save the workflow, when assigned to a feed, until you are confident in your conditions.
    • Save going forward, not retroactively, and disable the workflow until you are confident in your conditions.
    • Save your draft periodically
  • Ask for help, the Advanced Edit can turn into a rabbit hole quickly, reach out to a teammate to see if they can help be a fresh set of eyes. 

XML Basics 

Think of an advanced workflow like a Grocery List, and the Feed is your local market. You need to get everything on that list, but not every item is related to the next. Our XML coding mimics this behavior by allowing for a user to search for multiple, unrelated things within a feed. This keeps the workflows homepage neat and uncluttered, and allows for a user to focus in one space instead of many. 

 

Reminder: whatever line of code you open <>, you must also close </>.

<workflow>
<scope allFeeds="false">
  <feed id="73361" />
</scope>
  <!-- End of Scope-->
<rules>
  <rule> ** Editor Note:RULE ONE**
    <triggers>
      <trigger on="NewItem" />
    </triggers>
    <conditions>
      <or>
          <!--if ANY of these things Occur-->
        <messages operator="Equal" value="Yankees" />
          <displayName operator="Equal" value="New York Yankees" />
        </or>
    </conditions>
    <actions>
      <addTag value="Yankees Owned" />
    </actions>
  </rule>
<rule> **Editor's Note:RULE TWO**
      <triggers>
        <trigger on="NewItem" />
      </triggers>
      <conditions>
        <and>
          <or>
            <message operator="Contains" value="Pride" />
            <message operator="Contains" value="LGBTQ" />
            <message operator="Contains" value="Pride Night" />
            <hashtags operator="Contains" value="NightOut2022" />
          </or>
          <or>
            <fbSponsorTagName operator="Contains" value="Team DC" />
            <tags operator="Contains" value="Logo AI:Team DC" />
            <mentions operator="Contains" value="teamdcsports" />
            <message operator="Contains" value="Team DC Sports" />
            <message operator="Contains" value="Team DC" />
          </or>
        </and>
      </conditions>
      <actions>
        <addTag value="Team DC Sports - Pride Night" />
      </actions>
  </rule>
  </rules>
</workflow>

With this workflow, every new piece of content in the feed (73361) will be search for two different set of conditions, Rule 1 and Rule 2. If the content matches either set conditions, it will get the required tag, if not it won't get any change. 

Code Dictionary:

Code: Definition
<workflow> Beginning of workflow 
<scope allFeeds="false" > Not applying to all feeds in the account
<feed id ="75214"/> Only apply to this feed specifically
</scope> End Scope
<rules> Beginning of Rules
<rule> Beginning of one Rule
<triggers>  Begin Triggers — What should trigger the workflow to run?
<trigger on="NewItem" />  When a new item is received
<trigger on="UpdateItem" /> When an item has been updates
<trigger on="ModerationStatusChange" /> The status of an item has been changed from moderation
<trigger on="ModerationTagChange" /> When a tag was added or removed
<triggers/> End of Triggers
<conditions> Begin Conditions — What needs to be true for this Rule? (Boolean Conditions)
<and> Each condition (all of them) must be true for the workflow action to take place
<or> Only one condition (any) must be true for the workflow action to take place
<none> Not any of the conditions are true for the workflow action to take place
<and/> Ends ALL
<or/> Ends ANY
<none/> Ends NONE
<conditions/> End Conditions 
<action> Begin Actions — What do you want the workflow to do?
<addTag value= Add tag to a post
<performTextValuation brand= This enables the discounting for the text mention brand exposure, must use HIVE logo name 
<removeTag value= Removing a tag from a post 
<discardTag value= This action will delete the piece of content so it will not show up in moderation and will not count towards your capacity.
<action/> End of action
</rule> End of rule
</rules> End of all rules
</workflow> End of workflow
   
Other Common Code   
<tags operator="Contains" value= The existing tag name on a post
<username operator="Equal" value= The author's Twitter or Instagram handle
<displayName operator="Equal" value= The name of the page as it appears on Facebook and YouTube
<message operator="Contains" value= Looks through the text content of a post for a specific word or phrase
<mentions operator="Contains" value= Handles that are mentioned in a post "@-ing" someone
<hashtags operator="Contains" value= The hashtags that are included in a post
<fbSponsorTagName operator="Contains" value= Looks for a Facebook "Handshake", ex. Golden States Warriors with Oracle. Used in PTVs
<source operator="Equal" value="Twitter" /> The social network that the content is from - Twitter, Facebook, Instagram, RSS, Direct Upload, YouTube, Twitch
<authorBio operator="Contains" value= Looks at the text contained in the bio section of a social profile
<verified operator="Equal" value= Whether or not someone's profile is marked as verified on the social network
<twFollowerCount operator="GreaterThan" value= Looks at the number of followers of a social profile
<subType operator="Equal" value=" Looks at the post type within each social platform - Tweet, Reply, Retweet, Post, Comment, Story, YouTube Video, Twitch Clip, RSS Post
<created operator="Before" value= Looks at the date that a post is published 
<contentType operator="Equal" value= Looks at if the post is a text, photo, or video
<language operator="Equal" value= The language the content was written and published in
<sentiment operator="Equal" value= Looks at if the post is considered positive, negative, or objective
<locationText operator="Contains" value The customizable text that is listed in the location field of someone's social.
<geolocation operator="Contains" northLat= Identifies the geolocation of post is within the custom defined geofence
<region operator="Contains" value= Looks at if the geolocation of a post is within a specified country or large area within that country
<hasGeo operator="Equal" value= Whether or not a post has a geolocation