To create a NetSuite purchase order from a Coupa purchase order, the following prerequisites must be met:
•Create a custom field in the NetSuite purchase order and vendor entities.
•Create a webhook in Coupa.
Creating a custom field in NetSuite purchase order and vendor entities
Create a Coupa ID custom field in the NetSuite purchase order and vendor entities.
1Log in to the NetSuite organization.
2Go to Customization > Lists, Records, & Fields > Transaction Body Fields > New.
The following image shows the Transaction Body Field page:
3On the Transaction Body Field page, enter the value as Coupa ID in the LABEL field, custbody_coupa_id in the ID field, and select PURCHASE on the Applies To tab.
These values are used to search for a matching purchase order.
The following image shows the Custom Entity Field page:
6On the Custom Entity Field page, enter the value as Coupa ID in the LABEL field, custentity_coupa_id in the ID field, and select VENDOR on the Applies To tab.
These values are used to search for a matching vendor.
7Click Save.
Creating a webhook in Coupa
Webhooks send information from one system to another system when an event occurs.
To create a webhook in Coupa, perform the following steps:
1Log in to the Coupa organization.
2Go to Setup > Integrations > Call Outs > Create.
The following image shows the Setup page:
3In the Call Outs page, enter values for the following fields:
- In the Name field, enter the call out name.
- From the Call Out Type list, select Process Action.
- In the Endpoint Detail section, select Create new from the Type list, enter the service URL of the Purchase Order Flow process to be invoked in the Host Name field, select the authentication type as Basic, and enter the user name and password that is used to login to CAI organization.
Note: The service URL will be generated after you publish the Purchase Order Flow process.
- In the Data Mapping / API Filter section, from the Filter list, select the previously created purchase_orders custom field.
The following image shows the Call Outs page:
4Click Create.
5Go to Setup > Platform > Process Automator > Create new process.
The following image shows the Setup page:
6In the New Process page, enter values for the following fields:
- In the Name field, enter the process name.
- In the Trigger section, from the Launch Process on list, select Document Event, from the Document list, select Purchase Order, and from the Trigger process on list, select Issued.
- In the Perform Action section, from the Object list, select Trigger.Purchase Order, from the Action, select API Call Out, and from the Call Out field, select the previously created call out.