Attach and Detach a Contact with the Oracle NetSuite Adapter

You can attach and detach contacts and files in the Oracle NetSuite Adapter. This section provides a use case in which a contact value is first attached to a customer and then detached from that customer.

  1. Create an application integration.
  2. Add and configure a REST Adapter as a trigger connection.
    1. On the Basic Info page, enter a name.
    2. On the Resource Configuration page, select the Get verb.
    3. Select the Add and review parameters for this endpoint and Configure this endpoint to receive the response configuration options.
    4. On the Request Parameters page, the customer and contact parameters and data types are set as follows:
    5. On the Response page, select JSON sample as the response payload format and enter the JSON sample.
    6. Select response-mapper from the Element list.
    7. Select JSON as the media type.
  3. Add and configure an Oracle NetSuite Adapter as an invoke connection to attach a contact value to a customer.
    1. On the Basic Info page, enter a name.
    2. On the Operations page, select the Miscellaneous operation type, then select Attach.
    3. Select Contact as the attach object type and Customer as the business object to which to attach Contact details.
  4. In the mapper between the REST Adapter and Oracle NetSuite Adapter, specify concrete values for the target Customer > internalId element (for this example, 1298) and the target Contact > internalId element (for this example, 1307).
  5. Add and configure a second Oracle NetSuite Adapter to detach the contact value from the customer.
    1. On the Basic Info page, enter a name.
    2. On the Operations page, select the Miscellaneous operation type, then select Detach.
    3. Select Contact as the detach object type and Customer as the business object from which to detach Contact details.
  6. In the request mapper between the two Oracle NetSuite Adapters, map the source Customer > internalId element to the target Customer > internalId element and set a concrete value of 1307 for the target Contact > internalId element in the Expression Builder.
  7. In the response mapper after the second Oracle NetSuite Adapter, map the source Customer > internalId element to the target Customer. Ensure that you use @internalId and do not set a concrete value in the Expression Builder.
  8. Invoke the integration. Because this is a REST Adapter-trigger based integration, you can invoke it from the Test page in Oracle Integration). See Test REST Adapter Trigger Connection-Based Integrations in Using Integrations in Oracle Integration 3.