Use Add-Ins in Scripts and Workspaces

After you upload an add-in, you can place it in scripts and workspaces. This functionality can be added in several ways, depending on how the add-in is written.

If the add-in includes functionality to accept information from rule and branch conditions, you can configure script branches and script and workspace rules to send information to the add-in and perform actions based on the add-in’s response. For instance, if your organization handles customers whose products are still under warranty differently than customers with expired warranties, you could create a script branch that opens one script page if a customer’s product is still under warranty and another page if it is not.

The add-in can display anywhere you want on the script or workspace, or you can hide it using functionality in the script and workspace designers. You can also configure script branches and script and workspace rules to communicate with the add-in. We provide a script example here.

  1. Add a custom field to your script where customers enter their product’s serial number.
  2. Place an add-in on the script that compares the value entered in the custom field to a list of serial numbers that are under warranty.
  3. Create two script branches that branch to different pages on the script.
  4. Configure the branches to fire when the customer clicks the Next Page button on the script’s navigation panel (or when another action is taken).
  5. Create one If condition for each branch that is checked when an add-in’s control condition returns a certain value.
  6. When you edit the conditions, you can enter the information you want to send to the add-in in the Add-In Parameter field.
    In this example, you send the custom field’s ID number to the add-in. The add-in would then find the value entered in the custom field on the script and compare it to an external database that contains serial numbers that are under warranty.
  7. Set different operators and values for the conditions in each branch.
    1. If you want the add-in to return true when it finds the serial number in the external database, set the operator to equals and the value to true.
    2. Set the other branch’s operator and value to equals and false.

Results:

Using this configuration, one branch is triggered when the add-in finds that a serial number is under warranty, and the other branch is triggered when the add-in finds it is not under warranty.

What to do next

Using script or workspace rules, you could further expand this example to update the external database with the serial number entered on the script when other conditions are met.