You can replace the implementation of how we take products and discounts from Dynamics and pass them to Oneflow.
Note:
This article is an advanced tutorial for experienced Dynamics CRM Developers.
Register plugin
- So, for us to replace the implementation, we’ll need to register a plugin step for an of_GetProductsPayload message:
Note:
It should be synchronous and should execute on PostOperation.
- When the Executemethod of your plugin is called, you’ll get the following input and output parameters:
Param name | Direction | Data type | Description |
---|---|---|---|
requestData | Input | string | JSON string contains the agreementId in Oneflow and opportunityId of the opportunity in Dynamics to take the products from. |
isError | Output | bool | Indicates whether an error occurred during the out-of-the-box operation |
errorMessage | Output | string | Error details if an exception occurred. |
result | Output | string | Resulting JSON string of products to add to the Oneflow contract. |
Examples
RequestData format
Result format
The payload field contains a JSON that’s passed to Oneflow API directly.
You can read more about the object structure in Oneflow API docs at https://developer.oneflow.com/docs/product-group.
Replace JSON result
Now, if you want to have your implementation of products, you’ll need to replace the original result JSON with your own as follows:
That’s it!