Manage Buy Business Process Configuration
Buy Business Process Configuration is used for enabling or disabling the generate contract document based on order completion.
Manage Configurations
You can manage the buying runtime configurations by retrieving details using the configuration API. You can get all the available configuration details using this API.
Here's how you can get the configuration details:
- To get the configuration details, run the following cURL command or use a REST
API client.
curl -H Authorization: Bearer <accessToken> https://<hostName>/cx/industry/buying/configManagement/v1/configuration/businessProcessConfig -X GET
- To get the configuration details for a specific configuration, run the following
cURL command or use a REST API client.
curl -H Authorization: Bearer <accessToken> https://<hostName>/cx/industry/buying/configManagement/v1/configuration/businessProcessConfig?name=generateContractOnOrderCompletion -X GET
How to Enable or Disable Generate Contract on Order Completion
By default, the generateContractOnOrderCompletion flag is set to false. When this flag is set to false, you can use Generic Contract APIs to generate contracts document and update the life cycle status of the contract. When this flag is set to true, then the contract document is generated based on order completion event.
You can enable or disable generating contracts on order completion using Business Process Config 'generateContractOnOrderCompletion' by following these steps:
- Create the JSON request payload with the details described. For example, create
'update_config.json' file with the following JSON and use it in cURL
command.Note: You can use "enabled": false in the following request payload to disable generateContractOnOrderCompletion.
Fields and descriptions table
Field Description name The valid value is "Buy Business Process". configuration List of configurations. name configuration name. The valid value is "generateContractOnOrderCompletion". enabled Enable configuration name by passing either true or false. { "name": "Buy Business Process", "configuration": [ { "name": "generateContractOnOrderCompletion", "enabled": true } ] }
- You can use the created JSON (update_config.json) to update the generateContractOnOrderCompletion to enabled or disabled using the following API endpoint.
- Call the configuration API by running this cURL command or by using any REST API
client:
wherecurl -X PATCH 'https://<hostName>/api/configManagement/v1/configuration/businessProcessConfig' -H 'Content-Type: application/json' -H 'Authorization: Bearer <accessToken>' -d @update_config.json
- <accessToken> is the OAuth access token for Back Office Specialist role.
- <hostName> is the URL for the CX Industries Framework API Gateway.
- The API returns the following
response:
{ "id": "3f22f9ae-6dba-4975-b769-ef5ba6fcec92-1698212341", "name": "Buy Business Process", "href": "https://<hostName>/api/configManagement/v1/configuration/buyProcessConfig/3f22f9ae-6dba-4975-b769-ef5ba6fcec92-1698212341", "configuration": [ { "name": "generateContractOnOrderCompletion", "enabled": true } ] }