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.
- Create an application integration.
- Add and configure a REST Adapter as a trigger connection.
- On the Basic Info page, enter a name.
- On the Resource Configuration page, select the Get verb.
- Select the Add and review parameters for this endpoint and Configure this endpoint to receive the response configuration options.
- On the Request Parameters page, the customer and contact parameters and data types are set as follows:
- On the Response page, select JSON sample as the response payload format and enter the JSON sample.
- Select response-mapper from the Element list.
- Select JSON as the media type.
- Add and configure an Oracle NetSuite Adapter as an invoke connection to attach a contact value to a customer.
- On the Basic Info page, enter a name.
- On the Operations page, select the Miscellaneous operation type, then select Attach.
- Select Contact as the attach object type and Customer as the business object to which to attach Contact details.
- 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
). - Add and configure a second Oracle NetSuite Adapter to detach the contact value from the customer.
- On the Basic Info page, enter a name.
- On the Operations page, select the Miscellaneous operation type, then select Detach.
- Select Contact as the detach object type and Customer as the business object from which to detach Contact details.
- 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. - 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.
- 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.