# Oracle NetSuite Application Scope

> `UiPath.OracleNetSuite.Activities.OracleNetSuiteScopeActivity`

`UiPath.OracleNetSuite.Activities.OracleNetSuiteScopeActivity`

Each NetSuite activity calls a [SOAP operation](https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/chapter_N3477815.html) using the request parameters you enter in the activity's input properties. To successfully call the SOAP operations, the activities rely on the NetSuite Scope activity to use either **Token-Based** (preferred) or **User Credentials** [authentication](https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_N3445710.html) to connect to a new or existing NetSuite [integration record](https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_4389727047.html).

Using your Oracle account (**Account ID**) and Token-Based authentication (**ConsumerKey**, **ConsumerSecret**, **TokenId**, and **TokenSecret**) the **NetSuite Scope** activity establishes an authenticated connection to your integration record.

:::important
NetSuite has deprecated RLC (request-level credentials authentication, e.g. standard authentication) and has removed support for it entirely in the 2021.1 release. It was previously unsupported for SOAP API calls with the release of 2020.2 for admin roles. 

As a result the option for Standard Authentication has been removed as of version 1.2 of the Oracle NetSuite activity pack.
:::

After establishing your connection, the activity returns an `OracleNetSuiteConnection` object (**OracleNetSuiteConnection**) that you can use for authentication in subsequent uses of the **NetSuite Application Scope** activity.

:::note
When using this activities package, it's important that you read and follow the **best practices** documented in NetSuite's [SuiteApp Architectural Fundamentals & Examples (SAFE)](https://netsuite.custhelp.com/app/answers/detail/a_id/46388) guide and the [Concurrency governance cheat sheet](https://system.netsuite.com/core/media/media.nl?id=127925362&c=NLCORP&h=8742ad8b887aa6881f85&_xt=.pdf).
:::

## How it works

The following steps and message sequence diagram is an example of how the activity works from design time (i.e., the activity dependencies and input/output properties) to run time.

1. Complete the [Setup](https://docs.uipath.com/activities/other/latest/legacy-integrations/netsuite-setup) steps.
2. Add a activity for each `SecureString` input property.
   * Add two **Get Credential** activities.  For more information, see the [Create Credential Assets](https://docs.uipath.com/activities/other/latest/legacy-integrations/netsuite-setup) section in the **Setup** guide.
3. Enter values for either the Token Authentication properties.
4. Create and enter a `IConnection` variable for the Output property. You can use this variable in subsequent uses of the **NetSuite Scope** activity.

     ![docs image](https://dev-assets.cms.uipath.com/assets/images/activities/legacy-integrations-docs-image-185338-1b986602-ef014325.webp)

## In the Body of the Activity

To build your project and enable the **Object Wizard** in other activities, you must use the **Connection Wizard** by clicking the **Configure** button.

To learn more, see the [Wizards](https://docs.uipath.com/activities/other/latest/legacy-integrations/netsuite-about) section in the **About** page.

## Properties

### Authentication

:::note
Standard Credentials are considered deprecated and have been removed in version 1.2 and higher. Existing projects will continue to run but should be updated to use Token Based Authentication.
:::

* **AcountID** - The identifier assigned to your NetSuite account. This field supports only `Strings` or `String` variables. You can find your NetSuite account ID at the beginning of the NetSuite URL. For example, if the URL is `https://1234567.app.netsuite.com/`, your account ID is `1234567`.
* **Authentication Type** - The type of authentication to use when connecting to your integration record. As of version 1.2 of the activity pack, the only option supported is Token.
* **ConsumerKey** - The auto-generated key assigned to your integration record. This field supports only `Strings` or `String` variables. To find the **ConsumerKey** value, see the **Token-Based Authentication** bullet in the [Create Integration Record](https://docs.uipath.com/activities/other/latest/legacy-integrations/netsuite-setup) section of the **Setup** guide.
* **ConsumerSecret** - The `SecureString` used to authorize communications between UiPath and your integration record.
  + To find the **ConsumerSecret** value, see the **Token-Based Authentication** bullet in the [Create Integration Record](https://docs.uipath.com/activities/other/latest/legacy-integrations/netsuite-setup) section of the **Setup** guide.
  + To enter your `SecureString` variable, use a activity.
* **TokenID** - The auto-generated identifier assigned to the user. This field supports only `Strings` or `String` variables. To find the **TokenID** value, see [Create User Access Token](https://docs.uipath.com/activities/other/latest/legacy-integrations/netsuite-setup) in the the **Setup** guide.
* **TokenSecret** - The `SecureString` used to authorize the **TokenID** access to the integration record.
  + To find the **TokenSecret** value, see [Create User Access Token](https://docs.uipath.com/activities/other/latest/legacy-integrations/netsuite-setup) in the the **Setup** guide.
  + To enter your `SecureString` variable, use a activity.

### Common

* **DisplayName** - The display name of the activity. This field supports only `Strings` or `String` variables.

### Misc

* **Private** - If selected, the values of variables and arguments are no longer logged at Verbose level.

### Options

* **ReportApiErrorAsException** - When selected, API error responses are reported in BusinessActivityExecutionException by all child activities that use this application scope. When cleared, the child activity populates the API error message in the ResponseStatus output property and workflow execution continues. Check the ResponseStatus property to confirm successful execution.

### Output

* **Oracle NetSuite Connection** - A record of your established connection that you can use in subsequent **NetSuite Application Scope** activities. Enter a `IConnection` variable (*UiPath.BAF.Models.Connection.IConnection*).

### UseExistingConnection

* **ExistingConnection** - A connection record from a parent **NetSuite Application Scope** activity that you can use instead of establishing a new connection. Enter an `IConnection` variable.
  + The `IConnection` variable must be from a previously run **NetSuite Application Scope** activity (parent) that still has an active connection.
  + If you're unable to establish a connection using this property, try re-running your parent **NetSuite Scope** activity.
