Quickstart: Your First Feature

Get up and running fast with this tutorial

In This Guide

  • Create your first new feature
  • Get everything set up
  • Learn how to edit & test features

Install Just Add Features

If you don't have it already, install Just Add Features. (Install link & guide.)

Build Your First Feature

1. Add a "Custom Action" Step

Create (or open) a Campaign Canvas or Program Canvas.

Open your Campaign/Program then do the following:

  1. Click '>>' in the top left to display the full names
  2. Expand the list of steps by clicking in the top-left on the 'Program Steps' or 'Campaign Steps' heading
  3. In the expanded list, click the gold star next to Custom Action. This will pin it to the list.

This 10 second clip shows the process of pinning the Custom Action:

Once you've pinned it, simply drag the Custom Action onto your Program/Campign. You can also double-click.

Still Can't See "Custom Action" ?
  • Check you have fully expanded the list (see above clip)
  • Fully refresh your browser

2. Create Your Action

Click 'configure' on your Custom Action Step.

The Just Add Features app opens.

Click 'New Action'. You will be asked to choose a template to start from. Choose the basic template.

3. Test the Example

You should see a simple code-editor. Without changing anything, press 'Test'.

The test outcome will be displayed on the right. You should see a green 'Success' message appear.

4. Say 'Hello World'

Add one extra line to the top of the sample code:

eloqua.log("Hello World!");

The built-in eloqua.log("Message here..") function logs anything you need. Save and then re-test your code. You will see a log message appear on the right.

Logs also are saved when you run your Actions for real in Campaigns/Programs.

5. Break the Example!

Edit the code to break it. E.g. add fakeFunctionCall() or some nonsense to the top.

Hit 'Save' then 'Test' again. Now you should see a red error-message appear. This is how error-handling works.

6. Edit Your Action

Remove your deliberate error. Now let's make something!

Editing your Action is really simple. Just edit, save, test.

You can check it works (and what updates are returned) on the right.

Your code needs to call eloqua.done() - this built-in function tells Just Add Features that your Action is finished.

You can also pass eloqua.done() an object of field-value pairs, this will send updates back to the Contacts your Action is run on. Here is an example:

eloqua.done({C_FirstName: "Darth", C_LastName: "Vader"})

The above example updates every contact's name to "Darth Vader".

7. Use Fields

All the fields Eloqua sends in are available in eloqua.fields. So for example the contact's first name is available on eloqua.fields.C_FirstName.

Autocomplete for Fields

The code-editor in Just Add Features is smart, and it knows every field in your Eloqua database. Just type contact.fields. and a list of all available Eloqua fields will appear.

Here's an example:

eloqua.log("Hello " + eloqua.fields.C_FirstName)

That example will log out e.g. "Hello Sam".

Before you can use a field, you need to specify that Eloqua should send it. You can do this on the 'Settings' tab. This also tells you which exact field names to use for accessing & updating contact data.

8. Run It!

This is the fun bit.

Connect your Custom Action step and activate the Program Canvas/Campaign Canvas. Make sure you have something after your Custom Action step, so you can see it worked.

Contacts should flow through your Custom Action and receive the updates etc.

To view outcome information: open your action and view the 'Logs' tab.