See also the Workflow Training content.

This workflow collects information in a form, and injects it into a Rainbird query. If Rainbird can get a result with the information provided it will email it, otherwise it will email an agent link so that the query can be completed manually.

To use this workflow, first download and import the attached Hello World for Workflow.rbird file into your Rainbird platform.


Forms > FormTrigger component

This component collects a name, country of residence and email address from the user.

  • Form Title – Enter the name of the form (optional)
  • Form description – Enter a description for the form (optional)
  • Form fields (1)
    • Label – Enter Name
    • Description – Enter The person’s name (optional)
    • Type – Select Text
    • Default Value – Enter Name (optional)
    • Index – Leave blank
  • Form fields (2)
    • Label – Enter Country
    • Description – Enter The person’s country of residence (optional)
    • Type – Select Text
    • Default Value – Enter Country of residence (optional)
    • Index – Leave blank
  • Form fields (3)
    • Label – Enter Email address
    • Description – Enter Your email address (optional)
    • Type – Select Email
    • Default Value – Enter Email address (optional)
    • Index – Leave blank
  • Call to action – Enter Submit (or other button label)
  • Thanks Message – Enter Check your emails for the answer, or a link if more info is needed. (optional)
  • Thanks Image URL – Leave blank (optional)
  • Script – Leave blank
  • Stylesheet – Leave blank.


Rainbird > Start component

This component links the workflow to a specific Rainbird map.

  • Base URL – Community (or other environment if applicable)
  • API key – Enter your Rainbird API key
  • Knowledge Map ID – Enter the ID for the knowledge map you want to query


Rainbird > Inject component

This component will take the data from the form and inject it as facts into Rainbird.

  • Base URL – Click on the menu icon and select Start: Base URL
  • Session ID – Click on the menu icon and select Start: Session ID
  • Data – Here you have to specify the facts to be injected into Rainbird:
  • Click on the menu and select Name.
  • Add a comma , (make sure there are no spaces either side of it)
  • Type lives in (the name of the relationship you are creating facts for)
  • Add a comma , (make sure there are no spaces either side of it)
  • Click on the menu and select Country.

 

Rainbird > Query component

This component will query the Rainbird map using the data collected in the form.

  • Base URL – Click on the menu and select Start: Base URL
  • Session ID – Click on the menu and select Start: Session ID
  • Subject – Click on the menu and select Name
  • Relationship – Enter might speak
  • Object – Leave blank

 

Filter > Contains component

This will look at the results of the Rainbird query, and filter the result depending on whether or not the query has been answered. It has two out ports, corresponding to whether the data contains or does not contain the specified text. This component effectively carries our an ‘OR’ action.

  • Data – Click on the menu and select Raw Output
  • Contains – type prompt (if Rainbird cannot calculate an answer the output will contain this)

 

Rainbird > Agent Action component

This component will create a Rainbird agent so the user can interact with the tool and get a result.

There are two Out ports: ‘Agent’ Provides the URL for the agent, and Out sends the result of the query, if required (it will not be used In this flow as the result will just be displayed in the agent screen).

NOTE: Connect this component to the “contains” out port on the Filter > Contains component.

  • Base URL - Community (or other environment if applicable)
  • Session ID – Select Start: Session ID
  • Subject – Select Name
  • Relationship – might speak (i.e. the name of the relationship being queried in the Rainbird map – this cannot be selected, so should ideally be copied and pasted from the map)
  • Object – Leave blank (as this will be provided by the Rainbird map)

 

Email > SendEmail component

This will send an email with the Rainbird agent link to the email address collected in the form. The user will be able to click on the link and interact with Rainbird.

NOTE: Connect this component to the “agent” out port on the Rainbird > Agent Action component.

  • To – Click on the menu icon and select Email address
  • From – leave blank
  • Reply to – leave blank
  • Subject – Agent link (or whatever else you want the email’s title to be)
  • Attachment file – leave blank
  • Text – Click on the menu and select Web link. You can add any other explanatory text you wish too.
  • HTML – Leave blank


Email > SendEmail component

This will send an email with the result of the query to the email address collected in the form

NOTE: Connect this component to the “agent” out port on the Rainbird > Agent Action component.

  • To – Click on the menu icon and select Email address
  • From – leave blank
  • Reply to – leave blank
  • Subject – Agent link (or whatever else you want the email’s title to be)
  • Attachment file – leave blank
  • Text:
    • Click on the menu and select Name
    • Type speaks (with a space each side)
    • Click on the menu and select Query: Results
      • Click on Query: Results
      • Click on Add modifier and select JSON Path
      • In path type [0].object
  • HTML – Leave blank


Running your workflow

Your flow is now ready to be run. Click the Start Flow button, then go to the Form Trigger component and copy the Form URL

Paste this into your browser and complete the form:

  • If Rainbird can get an answer using the information provided it will be emailed to you.
  • If Rainbird can’t reach an answer using the information provided It will email you a link to an agent so you can complete the query manually.