1.数据回写至源数据(即数据管理)

为目标平台定义响应回写参数 primaryWriteback,配置响应回写结果集
例:金蝶写入成功后返回
image.png

primaryWriteback可以灵活配置,配置响应结果对应的id、number等关键字段,如下:

image.png

响应参数code代码参考:

  1. "response": [
  2. {
  3. "field": "primaryWriteback",
  4. "label": "回写参数",
  5. "type": "object",
  6. "is_required": false,
  7. "describe": null,
  8. "children": [
  9. {
  10. "field": "id",
  11. "label": "id",
  12. "type": "string",
  13. "is_required": false,
  14. "describe": null,
  15. "value": "{{Id}}",
  16. "parent": "primaryWriteback"
  17. },
  18. {
  19. "field": "number",
  20. "label": "number",
  21. "type": "string",
  22. "is_required": false,
  23. "describe": null,
  24. "value": "{{Number}}",
  25. "parent": "primaryWriteback"
  26. }
  27. ],
  28. "value": null
  29. }
  30. ]

配置成功,数据写入后,该数据管理中会新增一个primaryWriteback对象,对象的格式即为目标配置primaryWriteback的格式设置。

image.png

2.数据回写至新方案

1.新建一个接收数据回写的方案,方案平台选择轻易云集成平台,接口选择空操作。

image.png

2.新建后方案后,在顶部地址栏拿到方案ID(注意方案新建好后需要设置源平台id和number值)

image.png

3.在写入后需要回写的方案目标配置里面,配置写入后需要回写到的方案callBackStrategy子对象:callBackStrategy,里面需要包含strategyId,回写的方案ID,其他的参数可以动态配置(特别需要注意,返回值是存储在primaryWriteback子对象里面,配置取值的时候需要加上primaryWriteback,例:返回值里有id字段,取值就是{{primaryWriteback.id}}

image.png

示例josn:

  1. "response": [
  2. {
  3. "parent": null,
  4. "label": "回写方案",
  5. "field": "callBackStrategy",
  6. "type": "object",
  7. "value": null,
  8. "id": "callBack",
  9. "children": [
  10. {
  11. "field": "strategyId",
  12. "label": "方案ID",
  13. "type": "string",
  14. "is_required": true,
  15. "describe": null,
  16. "value": "b008d61b-2b91-3c0b-8c91-64c893bd6c7c",
  17. "parent": "callBackStrategy"
  18. },
  19. {
  20. "parent": "callBackStrategy",
  21. "label": "客户ID",
  22. "field": "FCUSTID",
  23. "type": "string",
  24. "value": "{{FCUSTID}}",
  25. "id": "FCUSTID"
  26. },
  27. {
  28. "parent": "callBackStrategy",
  29. "label": "客户类型编码",
  30. "field": "FCustTypeId_FNumber",
  31. "type": "string",
  32. "value": "{{FCustTypeId_FNumber}}",
  33. "id": "FCustTypeId_FNumber"
  34. },
  35. {
  36. "parent": "callBackStrategy",
  37. "label": "返回的单据编码",
  38. "field": "Number",
  39. "type": "string",
  40. "value": "{{primaryWriteback.Number}}",
  41. "id": "Number"
  42. },
  43. {
  44. "parent": "callBackStrategy",
  45. "label": "返回的单据ID",
  46. "field": "Id",
  47. "type": "string",
  48. "value": "{{primaryWriteback.Id}}",
  49. "id": "Number"
  50. }
  51. ]
  52. }
  53. ]