Feathery Docs
HomeCommunityGitHub
  • Platform
    • Quickstart
    • Form Fields
      • Hidden Fields
      • How to Set Field Values
      • Link Fields Across Forms
      • Custom Field Input Format
    • Build Forms
      • Elements
        • Basic
          • Container
          • Button
          • Text
          • Progress Bar
          • Image
          • PDF Viewer
          • Video
          • Table
          • Tooltip
        • Fields
          • Address
            • Street Address Line 1
            • Street Address Line 2
            • City
            • State
            • Country
            • Zip Code
          • Button Group
          • Checkbox
          • Checkbox Group
          • Color Picker
          • Combobox
          • Dropdown
          • Dropdown Multiselect
          • Date Selector
          • Time Selector
          • Email
          • File Upload
          • Matrix
          • Number
          • Password
          • Picture Choice
          • Pin Input
          • Phone Number
          • Radio Group
          • Rating
          • Signature
            • Legally Binding Signatures
          • Slider
          • Social Security Number
          • Text Area
          • Text Field
          • Payment Method
          • URL
        • Custom HTML, JS, CSS, and Iframes
        • Custom Fields
      • Design
        • Reuse styles and elements
          • Styling
          • Assets
        • Alignment and Spacing
        • Sizing Forms and Elements
        • Responsive Layouts
      • Actions
      • Logic
        • Navigate Steps Conditionally
        • Show Elements Conditionally
        • Custom Field Validation
        • Available Conditions
        • Display Dynamic Text
        • Dynamically Repeating Containers
      • Advanced Logic & API Connections
        • Visual Rule Builder
          • Connect to API Action
            • Salesforce API Connector
          • Set Field Value Action
          • Navigate Step Action
          • Set Field Error Action
          • Open URL Action
          • Set Calendly URL Action
        • Javascript Rule Builder
          • API Connections in Code
          • Trigger Integrations from Logic
          • Reusable Logic Configs
        • Examples
          • API Connectors
            • Dynamic dropdown options
            • Dynamic form navigation
            • Pre-fill form from Salesforce
            • Pre-fill form from Hubspot
            • Pre-fill field options from Google Sheets
            • Generate ChatGPT Message
          • Field Validation
            • Complex Field Validation
            • Date and Time Validations
          • Initialize Date Field
          • Dynamically set field placeholder
          • Randomize Field Option Order
          • Update field options based on previous selection
      • Integrations
        • Event Triggers
        • Examples
          • Upload Files to Google Drive
      • Dev & Staging Environments
    • Launch Forms
      • Embed Your Forms
      • Custom URLs & SEO
      • User Tracking
      • Completion Criteria
      • UTM Parameters
      • Accessibility Standards
      • Analytics
      • A/B Testing
      • Offline Mode
    • Document Intelligence
      • Review Extractions
      • Post Processing
      • Supported Document Types
      • Prompting Guide
      • Examples
        • Investment Report
    • Document Autofill & Signatures
      • Autofill Document Templates
        • PDF Autofill
        • Word Doc Autofill
          • Dynamic Tables
        • Excel Autofill
        • PowerPoint Autofill
        • InDesign Autofill
      • Signature Workflows
        • Signature Notifications
        • Access Signed Documents
        • 21 CFR Part 11 Compliance
      • Export Form Submission PDF
    • Workflows
      • Collaboration
        • Email Invite
        • Start Directly
        • Anonymous Starts
      • Review, Edit & Approve
      • Unique Submission Links
    • Enterprise Compliance
      • Security and Privacy
      • Reliability and Performance
      • Document Management
      • Data Sovereignty
    • International Forms
      • Translate Forms
      • Right to Left (RTL) Support
      • International Form Fields
    • White Label Feathery
      • Build Custom Form Fields
      • Offer Custom Form Templates
      • Custom Dashboard Domain
    • Account Settings
      • Managing Your Team
      • Permissions and User Groups
      • Account Attributes
    • FAQs
      • Account & Billing
  • Guides
    • Verify Submissions & Prevent Spam
    • Build a Login or Verification Flow
      • Connect an Auth Integration
      • Add Auth Methods
        • Email SMS Code
        • Email Magic Link
        • Phone Number Verification
        • Social Logins
          • Google
          • Amazon
          • Apple
          • Bitbucket
          • Coinbase
          • Discord
          • Facebook
          • GitHub
          • GitLab
          • LinkedIn
          • Microsoft
          • Slack
          • Twitch
          • Twitter
      • (Optional) Require Auth for Onboarding Steps
      • (Optional) Add Login Flow to Your Site
        • Feathery-Hosted (Recommended)
        • Embed Login Flow
          • Login Embed Tutorial
    • Build a Payment Flow
      • Connect to Stripe
      • Select Products or Plans
      • Collect Payment Method
      • Purchase Products
    • Send Custom SMS Messages
    • Salesforce Picklist Options
  • Developers
    • React SDK
      • API Guide
        • init()
        • <Form>
          • contextRef
          • Event Handlers
            • onSubmit()
            • onLoad()
            • onChange()
            • onAction()
            • onError()
            • onFormComplete()
            • onView()
          • Custom JSX Components
          • PopupOptions
          • initialLoader
        • getFieldValues()
        • setFieldValues()
        • updateUserId()
        • Login API
          • <LoginForm>
          • useAuthClient()
      • Inline vs Popup Form
    • Javascript SDK
    • Context API
      • Field Object
      • field.setStyles()
      • Deprecated Context API
    • REST API
Powered by GitBook
On this page

Was this helpful?

  1. Platform
  2. Build Forms
  3. Advanced Logic & API Connections
  4. Javascript Rule Builder

Trigger Integrations from Logic

PreviousAPI Connections in CodeNextReusable Logic Configs

Last updated 6 months ago

Was this helpful?

On our Business Tier, you can trigger integrations using Feathery's Javascript Rule Builder. This allows you to trigger these integrations at any point of your form and under any conditions that you set.

Here are the steps to trigger integrations:

  1. In the integration tab of your form, define an integration action (such as our Salesforce integration) using the Custom Logic trigger. An integration action is a single action for a given integration (ex: Create / Update for a certain object type in Salesforce)

  1. Then, once you press Save, an ID will appear at the top of the integration. You can copy that ID (or multiple IDs)

    1. For the on-code action, use the "Run Integrations" action in the no-code logic builder and select which integration(s) you want to run. The "wait for completion" toggle determines whether you want to wait for the integration to finish before proceeding to the next step of the logic rule

    2. If you want to use code, the function takes in the following parameters:

      1. actionIds: string[]: an array of all the integration IDs that you want to run in order

        1. options: JSON with the following attributes:

          1. waitForCompletion: boolean. Sets whether you want the form to wait until the integration is done running before proceeding. If true, the form will wait. If false, the integration will run asynchronously and let the user continue in the form.

          2. multiple: boolean. Sets whether you want to be able to run this integration multiple times for a single submission. If set to true, you can run an integration multiple times. Otherwise, if false, a given action can only be run once per submission.

          3. Here is some sample code to trigger two Salesforce integration actions:

            let accountCreation = await feathery.runIntegrationActions(['b1802192-d7be-4432-9916-e62f17d8b23a','93b378b5-34ec-4ae3-a644-e160a79486c2'], {"waitForCompletion": true, "multiple": false} );

  1. Integrations triggered from Logic also support dependencies. For example, creating a Salesforce account and then a contact that is associated with that newly created account. For Salesforce actions, you can enable this by using the "Create or Update Record" Salesforce action, and then selecting the object type you want to create/update (ex: Contacts, Accounts, Custom Objects, etc). Then, under the "Linked Object Fields" section, you can see all of the related object fields for the chosen object type. You can link those related object fields to the objects created or updated by any other integration action.

    • To do this, in the field dropdown, there are options for ID - Action <Action_ID>. These map to any previously created Salesforce integration actions.

    • When you link these fields, then when this integration is run, it will reference the ID of the created Object associated with the action of the field.

  1. In the example below, I am calling two actions in order: b1802192-d7be-4432-9916-e62f17d8b23a ( which creates a Salesforce Account) and 93b378b5-34ec-4ae3-a644-e160a79486c2 (which creates a Salesforce Contact).

    • In the second action that creates the Contact, I have defined the Account ID field (found in the Linked Object Fields header) to link to @ID- Action b1802192-d7be-4432-9916-e62f17d8b23a. This means that the created Contact will be linked to the newly created/updated Account from the first action.

    • I then need to make sure I call these actions in the right order within my Logic rule. I need to ensure that the Action ID for the Create/Update Account action comes first before the Contact action.

    • Code Snippet: let accountCreation = await feathery.runIntegrationActions(['b1802192-d7be-4432-9916-e62f17d8b23a','93b378b5-34ec-4ae3-a644-e160a79486c2'], {"waitForCompletion": true, "multiple": false} );

Then, within a Logic rule, you can use the no-code "Run integrations" action or function to trigger the integration.

feathery.runIntegrationActions