Articles in this section

Create and manage aliases to reference resources in scripts

Aliases provide an easy and efficient way to reference resources in your integration. For example, instead of referring to a specific connection ID in a script, you can use an alias for that connection instead. This makes maintaining the script easier and less error-prone because it prevents you from having to manually change the referenced ID later, such as if you clone the flow and the clone uses a different connection.

In addition to preventing manual changes when you clone flows or integrations within the same account, using aliases makes your integrations portable across accounts. For example, if you download an integration as a zip file and install it in another account, or if you create a template, aliases streamline the process.

Setting up aliases is essential if your organization is using Integration Lifecycle Management. As you pull and merge changes between clones, using aliases in your scripts helps ensure your integrations work as expected.

Support for aliases

Users with Manage access to an integration can create aliases for connections, exports, imports, and flows.

You can create aliases at two levels:

  • Integration-level aliases: Aliases you create at the integration level are available to all flows within the integration as inherited aliases. You create and manage these using the Aliases tab that appears for each integration.

    5869672944539-AliasesTab.png
  • Flow-level aliases: You can also create custom aliases for a specific flow. You create and manage these aliases from the flow settings.

    FlowAliases.png

Note

  • Flow-level aliases take precedence over integration aliases. For example, if an alias named ns_prod is defined separately for the integration and the flow, the system will resolve the alias using the resource provided in the flow-level definition. In other words, the flow-level alias is used and the inherited alias from the integration is ignored.

  • You cannot create aliases for standalone flows. Even if you are creating flow-level aliases only, the flow(s) must be part of an integration.

  • If you clone an individual flow, any flow-level aliases for connections, imports, or exports are also cloned. However, any aliases that point to other flows are not cloned.

  • You can only create an alias for an import or export if it uses a connection that is currently registered with the integration.

Once aliases are set up, you can access them easily from the View aliases link when doing either of the following tasks:

Related effects of creating aliases

Once you create an alias, you or another user cannot delete the connection, export, import, or flow the alias points to without first deleting the alias. An error message will appear if you attempt to delete the resource while an alias exists.

In addition, you cannot remove a flow from an integration if one or more aliases exist. To make it a standalone flow, first remove the aliases.

Create an alias

  1. To create an integration-level alias, navigate to the integration and click the Aliases tab. On the top right, click Create alias.

    -or-

    To create a flow-level alias, navigate to the flow and click the [gear icon] to open the Settings. In the Advanced section under Aliases, click Manage. Then, click Create alias.

  2. Provide the alias details.

    CreateAlias.png

    Alias ID: Enter a descriptive, unique name. This is what you will use in scripts to refer to the resource. Use only letters, numbers, hyphens(-) and/or underscores(_). For example, shopify_flow_neworders or netsuite-connection2_prod.

    Tip

    All alpha characters will be saved as lowercase. Use underscores or hyphens rather than uppercase to make a long alias easier to read.

    Alias description: Enter a description that provides more context on how the resource is used in your integration.

    Resource type: Select whether the alias should reference a connection, export, flow, or import.

  3. Under Resource name, select the specific resource for this alias to reference. Only resources for the type you selected above are available.

  4. Click Save & close.

Edit an alias

Editing an alias is helpful when you've built an improved flow or other resource and want all of the scripts that reference the alias to use the new resource. You can update any of the fields for an alias as needed, but keep in mind this may have implications on any scripts that currently reference the alias.

Caution

  • If you change the Alias ID (name), it is not updated in existing scripts.

  • Only change the Resource type and Resource name if you're certain this will not adversely impact any existing scripts that reference the alias.

  1. To edit an integration-level alias, navigate to the integration and click the Aliases tab. Locate the alias you want to edit and click the […] in the Actions column to open the menu. Then, click Edit alias.

    -or-

    To edit a flow-level alias, navigate to the flow and click the [gear icon] to open the Settings. In the Advanced section under Aliases, click Manage. Under the Aliases section, locate the alias you want to edit and click the […] in the Actions column to open the menu. Then, click Edit alias.

  2. Edit the alias details as needed.

  3. Click Save & close.

Delete an alias

Caution

Only delete an alias if you're certain it is not referenced in any scripts, custom forms, or connection routes. Deleting an alias DOES NOT remove these references, and errors will occur during execution if you do not remove the references.

  1. Remove all references to the alias from scripts, custom forms, and connection routes.

  2. To delete an integration-level alias, navigate to the integration and click the Aliases tab. Locate the alias you want to delete and click the […] in the Actions column to open the menu. Then, click Delete alias.

    -or-

    To delete a flow-level alias, navigate to the flow and click the [gear icon] to open the Settings. In the Advanced section under Aliases, click Manage. Under the Aliases section, locate the alias you want to delete and click the […] in the Actions column to open the menu. Then, click Delete alias.

  3. Read the warning text. If you want to proceed, click Delete alias.

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.