目的
您可以在触发器菜单中设置触发器并同步URL。 相应的触发器会被对应的工作流程触发。
位置
管理控制台 ▶ 开发者页面 ▶ 触发器 ▶选择需要设置触发器的公司
步骤
[设置同步]
1. 输入URL并点击“更新”按钮。
2. 来到款式页面,您此时应该可以看到激活的“同步”按钮。
3. 点击同步按钮来在新标签页中打开您在上方输入的URL。在新标签页中的URL包含了款式名,款式版本,以及外部款式名作为查询字符串。
[设置渲染]
1. 在“渲染”一栏下点击“添加触发器”。
2. 选择会触发该功能的工作流程。
3. 来到工作室或款式页面并修改该款式的工作流程。
4. 该款式的渲染将被加入到队列中。
*该款式的渲染相关设置会遵循该款式上传时在CLO软件中设置的各项渲染属性。
[设置Webhook]
1. 在"Webhook"一栏下点击“添加触发器”。
2. 选择会触发该功能的工作流程。
3. 输入该webhook会需要的URL。
4. 如果您想要检查该请求是否有效,请输入名称和相关值。它们会和webhook需求一起被添加到HTTP header中。
5. 来到工作室或款式页面并修改相应款式的工作流程。
6. Webhook将会被触发。
Webhook request body sample
{
"UpdateTime": "2020-07-21T06:25:09.759785Z",
"UpdateUser": "hello@clo-set.com",
"Topic": {
"TopicId": "4ea0710a0e5f4e099d92f7a284d167f9",
"Version": 1,
"TopicType": 1
},
"TriggerType": 1,
"TriggerOption": {
"WorkflowSeq": 1679,
"TriggerStatus": 1
}
}
Webhook body schema
{
"UpdateTime": {
"$id": "#/properties/UpdateTime",
"type": "string",
"format": "date-time",
"description": "The update time that trigger fired."
},
"UpdateUser": {
"$id": "#/properties/UpdateUser",
"type": "string",
"description": "Email address of user"
},
"Topic": {
"$id": "#/properties/Topic",
"type": "object",
"description": "The updated space/style information",
"required": [
"TopicId",
"Version",
"TopicType"
],
"properties": {
"TopicId": {
"$id": "#/properties/Topic/properties/TopicId",
"type": "string",
"description": "The id of updated style or space"
},
"Version": {
"$id": "#/properties/Topic/properties/Version",
"type": "integer",
"description": "Version of style. Will be '0' if topic type is not style.",
"default": 0
},
"TopicType": {
"$id": "#/properties/Topic/properties/TopicType",
"type": "integer",
"enum": [0, 1],
"description": "Enum for what the topic type is. 0 is none, 1 is style.",
"default": "None"
}
}
},
"TriggerType": {
"$id": "#/properties/TriggerType",
"type": "integer",
"enum": [0, 1],
"description": "The trigger type that webhook triggered. 0 is none, 1 is workflow",
"default": 0
},
"TriggerOption": {
"$id": "#/properties/TriggerOption",
"type": "object",
"description": "The object information for trigger",
"required": [
"WorkflowSeq",
"TriggerStatus"
],
"properties": {
"WorkflowSeq": {
"$id": "#/properties/TriggerOption/properties/WorkflowSeq",
"type": "integer",
"description": "Workflow seq that tiggered."
},
"TriggerStatus": {
"$id": "#/properties/TriggerOption/properties/TriggerStatus",
"type": "integer",
"enum": [0, 1],
"description": "The changed trigger status for triggered object. 0 is none, 1 is changed",
"default": 0
}
}
}
}