Calls
Triggers
4min
the triggers endpoint http post https //www regpack com/reg/api2/triggers/ the triggers endpoint is used to configure the triggers (conditional logic) for existing products basic structure each call to the api requires action and a group id name type required description action string true for triggers, the only action is create group id integer true this designates which project the change should be applied to api id in the header must be part of the organization that owns the group doc json true this contains the parameters you would like to include in the request, formatted as json example call each call to the api requires action and group id curl x post "https //www regpack com/reg/api2/triggers/" \\ h "content type application/json" \\ h "accept application/json" \\ h "api id 15263" \\ h "api user api admin\@regpacks com" \\ h "api token cd2e514f 7gab 3cde 62fg 51abcd4e7362" \\ d '{ "action" "create", "group id" 1625251, "doc" { "reverse trigger" true, "action" { "product id" "2767021", "action type" "add product no show" }, "conditions" { "andor" "and", "condition list" \[ { "field id" "f 349514 4451053", "field value" "guitar" }, { "product id" "2594110", "action" "product added" }, { "status id" "90809", "action" "set status" } ] } } }' example response json { "undo trigger" true, "action" { "action vars" { "product id" "1654403" }, "action type" "add product no show" }, "log conds" { "andor" "and", "conditions" \[ { "log ex id" "field set to", "vars" { "field id" "f 349514 4451053", "field value" "guitar" } }, { "log ex id" "product added", "vars" { "product id" "745947" }, "multi id" "multi product added 745947" }, { "log ex id" "set status", "vars" { "status id" "70418" }, "multi id" "multi set status 70418" } ] }, "text qv" " \<span class=\\"fs wrap\\"> \<span class=\\"filter name\\">rate type\</span> \<em>is\</em> \<span class=\\"answer\\">\<span class=\\"val\\">bucket rate \</span>\</span> \<a href=\\"javascript;\\" class=\\"fs delete\\" rel=\\"f231\\">\</a> \</span> \<span class=\\"fs wrap\\"> \<span class=\\"filter name\\">administrator license 12 month legacy price business package\</span> \<em>is\</em> \<span class=\\"answer\\">\<span class=\\"val\\">added to user cart\</span>\</span> \<a href=\\"javascript;\\" class=\\"fs delete\\" rel=\\"multi product added 745947\\">\</a> \</span> \<span class=\\"fs wrap\\"> \<span class=\\"filter name\\">status is active\</span> \<a href=\\"javascript;\\" class=\\"fs delete\\" rel=\\"multi set status 70418\\">\</a> \</span>", "ui obj" \[ { "trigger id" "mongo text search", "vars" \[ { "rate type" "guitar" } ] }, { "trigger id" "product logs", "multi id" "multi product added 745947", "vars" \[ { "log ex id" "product added" }, { "trigger vars" "{\\"product id\\" \\"745947\\"}" } ] }, { "trigger id" "set status log", "vars" \[ { "log ex id" "set status" }, { "trigger vars" "{\\"status id\\" \\"70418\\"}" } ] } ], "group id" "1625251", " id" "100906231 1656649", "creation date" { "sec" 1729011822, "usec" 42000 }, "trig action cond level" "parent condition child condition child action", "success" true }