diff --git a/flows/routers/random_once.go b/flows/routers/random_once.go new file mode 100644 index 000000000..777453f55 --- /dev/null +++ b/flows/routers/random_once.go @@ -0,0 +1,115 @@ +package routers + +import ( + "encoding/json" + "strconv" + + "github.com/nyaruka/gocommon/jsonx" + "github.com/nyaruka/gocommon/random" + "github.com/nyaruka/goflow/flows" + "github.com/nyaruka/goflow/utils" + + "github.com/pkg/errors" +) + +func init() { + registerType(TypeRandomOnce, readRandomOnceRouter) +} + +// TypeRandomOnce is the type for a random once router +const TypeRandomOnce string = "random_once" + +// RandomOnceRouter is a router which will choose one of it's exits at random, but only using each exit once +type RandomOnceRouter struct { + baseRouter + + defaultCategoryUUID flows.CategoryUUID +} + +// NewRandomOnce creates a new random once router +func NewRandomOnce(wait flows.Wait, resultName string, categories []flows.Category, defaultCategoryUUID flows.CategoryUUID) *RandomOnceRouter { + return &RandomOnceRouter{ + baseRouter: newBaseRouter(TypeRandom, wait, resultName, categories), + defaultCategoryUUID: defaultCategoryUUID, + } +} + +// Validate validates that the fields on this router are valid +func (r *RandomOnceRouter) Validate(flow flows.Flow, exits []flows.Exit) error { + // check the done category is valid + if r.defaultCategoryUUID != "" && !r.isValidCategory(r.defaultCategoryUUID) { + return errors.Errorf("default category %s is not a valid category", r.defaultCategoryUUID) + } + + return r.validate(flow, exits) +} + +// Route determines which exit to take from a node +func (r *RandomOnceRouter) Route(run flows.FlowRun, step flows.Step, logEvent flows.EventCallback) (flows.ExitUUID, error) { + // find all the exits we have taken in the past + exitsTaken := make(map[flows.ExitUUID]bool) + for _, s := range run.Path() { + if s.NodeUUID() == step.NodeUUID() { + exitsTaken[s.ExitUUID()] = true + } + } + + // convert that to bucket categories remaining + bucketsRemaining := make([]flows.Category, 0) + for _, c := range r.categories { + if !exitsTaken[c.ExitUUID()] && c.UUID() != r.defaultCategoryUUID { + bucketsRemaining = append(bucketsRemaining, c) + } + } + + // take the default route if we've been to all the other bucket categories + if len(bucketsRemaining) == 0 { + return r.routeToCategory(run, step, r.defaultCategoryUUID, "", "", nil, logEvent) + } + + // pick a random remaining bucket category + categoryNum := random.IntN(len(bucketsRemaining)) + categoryUUID := bucketsRemaining[categoryNum].UUID() + + return r.routeToCategory(run, step, categoryUUID, strconv.Itoa(categoryNum), "", nil, logEvent) +} + +//------------------------------------------------------------------------------------------ +// JSON Encoding / Decoding +//------------------------------------------------------------------------------------------ + +type randomOnceRouterEnvelope struct { + baseRouterEnvelope + + DefaultCategoryUUID flows.CategoryUUID `json:"default_category_uuid" validate:"required,uuid4"` +} + +func readRandomOnceRouter(data json.RawMessage) (flows.Router, error) { + e := &randomOnceRouterEnvelope{} + if err := utils.UnmarshalAndValidate(data, e); err != nil { + return nil, err + } + + r := &RandomOnceRouter{ + defaultCategoryUUID: e.DefaultCategoryUUID, + } + + if err := r.unmarshal(&e.baseRouterEnvelope); err != nil { + return nil, err + } + + return r, nil +} + +// MarshalJSON marshals this resume into JSON +func (r *RandomOnceRouter) MarshalJSON() ([]byte, error) { + e := &randomOnceRouterEnvelope{ + DefaultCategoryUUID: r.defaultCategoryUUID, + } + + if err := r.marshal(&e.baseRouterEnvelope); err != nil { + return nil, err + } + + return jsonx.Marshal(e) +} diff --git a/flows/routers/testdata/random_once.json b/flows/routers/testdata/random_once.json new file mode 100644 index 000000000..61fc74efc --- /dev/null +++ b/flows/routers/testdata/random_once.json @@ -0,0 +1,118 @@ +[ + { + "description": "Random bucket category chosen and result created", + "router": { + "type": "random_once", + "result_name": "Random Result", + "categories": [ + { + "uuid": "598ae7a5-2f81-48f1-afac-595262514aa1", + "name": "Question 1", + "exit_uuid": "49a47f31-ec90-42b5-a0d8-6efb5b1fa57b" + }, + { + "uuid": "c70fe86c-9aac-4cc2-a5cb-d35cbe3fed6e", + "name": "Question 2", + "exit_uuid": "5bd6a427-2b9a-4a4d-ad3f-eb39eaaa7e5a" + }, + { + "uuid": "78ae8f05-f92e-43b2-a886-406eaea1b8e0", + "name": "Done", + "exit_uuid": "b787ffe3-c21a-46ad-9475-954614b52477" + } + ], + "default_category_uuid": "78ae8f05-f92e-43b2-a886-406eaea1b8e0" + }, + "results": { + "random_result": { + "name": "Random Result", + "value": "1", + "category": "Question 2", + "node_uuid": "64373978-e8f6-4973-b6ff-a2993f3376fc", + "created_on": "2018-10-18T14:20:30.000123456Z" + } + }, + "events": [ + { + "type": "run_result_changed", + "created_on": "2018-10-18T14:20:30.000123456Z", + "step_uuid": "59d74b86-3e2f-4a93-aece-b05d2fdcde0c", + "name": "Random Result", + "value": "1", + "category": "Question 2" + } + ], + "inspection": { + "dependencies": [], + "issues": [], + "results": [ + { + "key": "random_result", + "name": "Random Result", + "categories": [ + "Question 1", + "Question 2", + "Done" + ], + "node_uuids": [ + "64373978-e8f6-4973-b6ff-a2993f3376fc" + ] + } + ], + "waiting_exits": [], + "parent_refs": [] + } + }, + { + "description": "Default category taken if no bucket categories", + "router": { + "type": "random_once", + "result_name": "Random Result", + "categories": [ + { + "uuid": "78ae8f05-f92e-43b2-a886-406eaea1b8e0", + "name": "Done", + "exit_uuid": "b787ffe3-c21a-46ad-9475-954614b52477" + } + ], + "default_category_uuid": "78ae8f05-f92e-43b2-a886-406eaea1b8e0" + }, + "results": { + "random_result": { + "name": "Random Result", + "value": "", + "category": "Done", + "node_uuid": "64373978-e8f6-4973-b6ff-a2993f3376fc", + "created_on": "2018-10-18T14:20:30.000123456Z" + } + }, + "events": [ + { + "type": "run_result_changed", + "created_on": "2018-10-18T14:20:30.000123456Z", + "step_uuid": "59d74b86-3e2f-4a93-aece-b05d2fdcde0c", + "name": "Random Result", + "category": "Done", + "value": "" + } + ], + "inspection": { + "dependencies": [], + "issues": [], + "results": [ + { + "key": "random_result", + "name": "Random Result", + "categories": [ + "Done" + ], + "node_uuids": [ + "64373978-e8f6-4973-b6ff-a2993f3376fc" + ] + } + ], + "waiting_exits": [], + "parent_refs": [] + } + } +] \ No newline at end of file diff --git a/test/runner_test.go b/test/runner_test.go index c60c89c72..3b6394c13 100644 --- a/test/runner_test.go +++ b/test/runner_test.go @@ -14,6 +14,7 @@ import ( "github.com/nyaruka/gocommon/dates" "github.com/nyaruka/gocommon/httpx" "github.com/nyaruka/gocommon/jsonx" + "github.com/nyaruka/gocommon/random" "github.com/nyaruka/gocommon/uuids" "github.com/nyaruka/goflow/assets" "github.com/nyaruka/goflow/envs" @@ -191,6 +192,7 @@ func TestFlows(t *testing.T) { require.NoError(t, err) require.True(t, len(testCases) > 0) + defer random.SetGenerator(random.DefaultGenerator) defer uuids.SetGenerator(uuids.DefaultGenerator) defer dates.SetNowSource(dates.DefaultNowSource) defer httpx.SetRequestor(httpx.DefaultRequestor) @@ -200,6 +202,7 @@ func TestFlows(t *testing.T) { var httpMocksCopy *httpx.MockRequestor fmt.Printf("running %s\n", tc) + random.SetGenerator(random.NewSeededGenerator(123456)) uuids.SetGenerator(uuids.NewSeededGenerator(123456)) dates.SetNowSource(dates.NewSequentialNowSource(time.Date(2018, 7, 6, 12, 30, 0, 123456789, time.UTC))) smtpx.SetSender(smtpx.NewMockSender("")) diff --git a/test/testdata/runner/question_randomization.json b/test/testdata/runner/question_randomization.json new file mode 100644 index 000000000..ca846e91f --- /dev/null +++ b/test/testdata/runner/question_randomization.json @@ -0,0 +1,494 @@ +{ + "flows": [ + { + "uuid": "eaae833a-4970-4be1-aed4-2e6295903b8f", + "name": "Question Randomization", + "spec_version": "13.1.0", + "type": "messaging", + "expire_after_minutes": 10080, + "language": "eng", + "localization": {}, + "nodes": [ + { + "uuid": "0e8917ac-123c-4fc8-a693-a9fa7690ef1a", + "actions": [ + { + "attachments": [], + "text": "Welcome", + "type": "send_msg", + "quick_replies": [], + "uuid": "2cc0384c-3220-48d4-b53f-2ad66edfbdbc" + } + ], + "exits": [ + { + "uuid": "0a9bca3c-eacb-4fea-8865-6bd2555068f7", + "destination_uuid": "b37738f7-c6ff-435b-aafd-f1a29dbd7cd6" + } + ] + }, + { + "uuid": "b37738f7-c6ff-435b-aafd-f1a29dbd7cd6", + "actions": [], + "router": { + "type": "random_once", + "default_category_uuid": "3fba5b56-e7ff-4ad2-a9ca-b3a25d2fb73f", + "categories": [ + { + "uuid": "7789ad94-a063-4570-bf4f-caab46f25961", + "name": "Bucket 1", + "exit_uuid": "4508564d-819f-452a-821d-e70c5be2d0cf" + }, + { + "uuid": "35435fe8-1613-4d4a-b580-4a0234c8ef4f", + "name": "Bucket 2", + "exit_uuid": "a4a9137e-fd94-4b6f-86e1-2412ce7eba33" + }, + { + "uuid": "0153edd0-0ae0-42ca-87cf-3b3fc64849db", + "name": "Bucket 3", + "exit_uuid": "fa779ed2-dad1-4f4d-824a-b7f22d4736ca" + }, + { + "uuid": "3fba5b56-e7ff-4ad2-a9ca-b3a25d2fb73f", + "name": "Done", + "exit_uuid": "68e55f94-3efa-4b4a-ab60-160f7b01e666" + } + ] + }, + "exits": [ + { + "uuid": "4508564d-819f-452a-821d-e70c5be2d0cf", + "destination_uuid": "66076abc-3928-464d-a21f-ac2eb76f3a3e" + }, + { + "uuid": "a4a9137e-fd94-4b6f-86e1-2412ce7eba33", + "destination_uuid": "228d6e83-3f44-4408-bc0d-5ec1a7c07c04" + }, + { + "uuid": "fa779ed2-dad1-4f4d-824a-b7f22d4736ca", + "destination_uuid": "c4435f6e-1d40-4b0c-9e27-f3f6c4801a59" + }, + { + "uuid": "68e55f94-3efa-4b4a-ab60-160f7b01e666", + "destination_uuid": "80369f75-68c8-4291-98dc-fdc3b25ff537" + } + ] + }, + { + "uuid": "80369f75-68c8-4291-98dc-fdc3b25ff537", + "actions": [ + { + "attachments": [], + "text": "You're done. Thanks!", + "type": "send_msg", + "quick_replies": [], + "uuid": "f0e874b2-ad53-4ee8-9c8a-1480b51261da" + } + ], + "exits": [ + { + "uuid": "cf12c5a3-c1db-4ba8-8b6d-66cbd49d2ad2", + "destination_uuid": null + } + ] + }, + { + "uuid": "66076abc-3928-464d-a21f-ac2eb76f3a3e", + "actions": [ + { + "attachments": [], + "text": "Do you like cats?", + "type": "send_msg", + "quick_replies": [], + "uuid": "c2c44fbc-1362-404a-a087-d62d3cbc390a" + } + ], + "exits": [ + { + "uuid": "a5f39459-6f5d-42b1-a73b-0d640ed9a7eb", + "destination_uuid": "b75e08a1-6326-4bdb-a87b-a95ae49d9eb2" + } + ] + }, + { + "uuid": "228d6e83-3f44-4408-bc0d-5ec1a7c07c04", + "actions": [ + { + "attachments": [], + "text": "Do you like dogs?", + "type": "send_msg", + "quick_replies": [], + "uuid": "c1c689e6-4acf-468d-b5d5-cb183dd55364" + } + ], + "exits": [ + { + "uuid": "e8100147-225e-4b55-8347-42672863cff3", + "destination_uuid": "1e024a99-552b-4506-87ca-844f141fb06a" + } + ] + }, + { + "uuid": "c4435f6e-1d40-4b0c-9e27-f3f6c4801a59", + "actions": [ + { + "attachments": [], + "text": "Do you like lizards?", + "type": "send_msg", + "quick_replies": [], + "uuid": "320d2ef6-a4a1-42a8-88f5-2f2393ef4532" + } + ], + "exits": [ + { + "uuid": "d73fed98-0e74-4e13-ba5a-5ac30969f1fe", + "destination_uuid": "45e30dab-3a58-4ced-9049-0514824bf14f" + } + ] + }, + { + "uuid": "b75e08a1-6326-4bdb-a87b-a95ae49d9eb2", + "actions": [], + "router": { + "type": "switch", + "default_category_uuid": "8a9d796e-3b42-444b-914a-681a66d2f07d", + "cases": [ + { + "arguments": [ + "Yes" + ], + "type": "has_any_word", + "uuid": "bbb10d79-77be-45ca-aa0e-395f8875f732", + "category_uuid": "398fd835-e66b-48ed-97cf-354522539459" + }, + { + "arguments": [ + "No" + ], + "type": "has_any_word", + "uuid": "a5e71738-a815-4aa8-9ce6-02f5d21963c5", + "category_uuid": "2ef2b934-eb17-49ae-817e-86140d56ea04" + } + ], + "categories": [ + { + "uuid": "398fd835-e66b-48ed-97cf-354522539459", + "name": "Yes", + "exit_uuid": "f98af058-1ce7-4813-a17b-f6f8649810f0" + }, + { + "uuid": "2ef2b934-eb17-49ae-817e-86140d56ea04", + "name": "No", + "exit_uuid": "4cf31cc2-f028-4c8d-84ef-0fabdb781971" + }, + { + "uuid": "8a9d796e-3b42-444b-914a-681a66d2f07d", + "name": "Other", + "exit_uuid": "519bfd32-355e-44d6-8cbc-3e27d5eb3dc3" + } + ], + "operand": "@input.text", + "wait": { + "type": "msg" + }, + "result_name": "Cats" + }, + "exits": [ + { + "uuid": "f98af058-1ce7-4813-a17b-f6f8649810f0", + "destination_uuid": "b37738f7-c6ff-435b-aafd-f1a29dbd7cd6" + }, + { + "uuid": "4cf31cc2-f028-4c8d-84ef-0fabdb781971", + "destination_uuid": "b37738f7-c6ff-435b-aafd-f1a29dbd7cd6" + }, + { + "uuid": "519bfd32-355e-44d6-8cbc-3e27d5eb3dc3", + "destination_uuid": "e3c37e07-8e7d-4884-86f1-9320e754416d" + } + ] + }, + { + "uuid": "1e024a99-552b-4506-87ca-844f141fb06a", + "actions": [], + "router": { + "type": "switch", + "default_category_uuid": "b1733dba-3351-480b-b219-a141178c1a75", + "cases": [ + { + "arguments": [ + "Yes" + ], + "type": "has_any_word", + "uuid": "df9ddd9c-6863-4272-ac3a-4511ea58dd32", + "category_uuid": "399436fd-2357-4bfd-8dfe-9f2d3062b544" + }, + { + "arguments": [ + "No" + ], + "type": "has_any_word", + "uuid": "6525691c-5e02-4f47-a160-16ced35e39c3", + "category_uuid": "393960dd-01f5-411e-a754-61046f256357" + } + ], + "categories": [ + { + "uuid": "399436fd-2357-4bfd-8dfe-9f2d3062b544", + "name": "Yes", + "exit_uuid": "a2ce6b62-ebdc-4941-93b7-b816313919e9" + }, + { + "uuid": "393960dd-01f5-411e-a754-61046f256357", + "name": "No", + "exit_uuid": "32736e6e-25be-4156-b2b0-3ad7e83cf24b" + }, + { + "uuid": "b1733dba-3351-480b-b219-a141178c1a75", + "name": "Other", + "exit_uuid": "6a90e825-489d-4001-8eff-9e17a32bd6d0" + } + ], + "operand": "@input.text", + "wait": { + "type": "msg" + }, + "result_name": "Dogs" + }, + "exits": [ + { + "uuid": "a2ce6b62-ebdc-4941-93b7-b816313919e9", + "destination_uuid": "b37738f7-c6ff-435b-aafd-f1a29dbd7cd6" + }, + { + "uuid": "32736e6e-25be-4156-b2b0-3ad7e83cf24b", + "destination_uuid": "b37738f7-c6ff-435b-aafd-f1a29dbd7cd6" + }, + { + "uuid": "6a90e825-489d-4001-8eff-9e17a32bd6d0", + "destination_uuid": "8abecce8-0184-41ac-9573-b8e876b10a77" + } + ] + }, + { + "uuid": "45e30dab-3a58-4ced-9049-0514824bf14f", + "actions": [], + "router": { + "type": "switch", + "default_category_uuid": "4af7b318-8256-4f57-a64d-872437fe4ca0", + "cases": [ + { + "arguments": [ + "Yes" + ], + "type": "has_any_word", + "uuid": "ff67556f-b345-4c8e-905d-0799420a8880", + "category_uuid": "b7410d60-e327-40aa-aae9-513c0f6e0ffe" + }, + { + "arguments": [ + "No" + ], + "type": "has_any_word", + "uuid": "438bc422-00cf-4266-86ff-172be31793c9", + "category_uuid": "f3c0c5c1-b391-491f-b37b-05f6461d6656" + } + ], + "categories": [ + { + "uuid": "b7410d60-e327-40aa-aae9-513c0f6e0ffe", + "name": "Yes", + "exit_uuid": "a58c2787-f393-44c4-a61e-0fc2cc44aef2" + }, + { + "uuid": "f3c0c5c1-b391-491f-b37b-05f6461d6656", + "name": "No", + "exit_uuid": "552084c6-bdea-41fa-9c9b-e5e8ac2ff5ab" + }, + { + "uuid": "4af7b318-8256-4f57-a64d-872437fe4ca0", + "name": "Other", + "exit_uuid": "5fb500e9-2766-42c1-acd2-191943084305" + } + ], + "operand": "@input.text", + "wait": { + "type": "msg" + }, + "result_name": "Lizards" + }, + "exits": [ + { + "uuid": "a58c2787-f393-44c4-a61e-0fc2cc44aef2", + "destination_uuid": "b37738f7-c6ff-435b-aafd-f1a29dbd7cd6" + }, + { + "uuid": "552084c6-bdea-41fa-9c9b-e5e8ac2ff5ab", + "destination_uuid": "b37738f7-c6ff-435b-aafd-f1a29dbd7cd6" + }, + { + "uuid": "5fb500e9-2766-42c1-acd2-191943084305", + "destination_uuid": "af0062ac-16a9-4e7b-94ad-0397e6b56e12" + } + ] + }, + { + "uuid": "e3c37e07-8e7d-4884-86f1-9320e754416d", + "actions": [ + { + "attachments": [], + "text": "Yes or no", + "type": "send_msg", + "quick_replies": [], + "uuid": "0f5f6748-3be9-4d78-85e8-99a1b68abfa6" + } + ], + "exits": [ + { + "uuid": "37eabc5f-6ef8-46e7-98da-a78e8295e7a6", + "destination_uuid": "b75e08a1-6326-4bdb-a87b-a95ae49d9eb2" + } + ] + }, + { + "uuid": "8abecce8-0184-41ac-9573-b8e876b10a77", + "actions": [ + { + "attachments": [], + "text": "Yes or no", + "type": "send_msg", + "quick_replies": [], + "uuid": "90a64ca1-8477-4556-8b96-1e34873a443b" + } + ], + "exits": [ + { + "uuid": "2a594a68-d79b-4aee-8061-1adf61eb77dd", + "destination_uuid": "1e024a99-552b-4506-87ca-844f141fb06a" + } + ] + }, + { + "uuid": "af0062ac-16a9-4e7b-94ad-0397e6b56e12", + "actions": [ + { + "attachments": [], + "text": "Yes or no", + "type": "send_msg", + "quick_replies": [], + "uuid": "b601995d-592c-4527-97ee-7dab4b7338a2" + } + ], + "exits": [ + { + "uuid": "b511de7f-d7d2-4346-9c74-58232260da80", + "destination_uuid": "45e30dab-3a58-4ced-9049-0514824bf14f" + } + ] + } + ], + "_ui": { + "nodes": { + "0e8917ac-123c-4fc8-a693-a9fa7690ef1a": { + "position": { + "left": 80, + "top": 60 + }, + "type": "execute_actions" + }, + "b37738f7-c6ff-435b-aafd-f1a29dbd7cd6": { + "type": "split_by_expression", + "position": { + "left": 420, + "top": 60 + }, + "config": { + "cases": {} + } + }, + "80369f75-68c8-4291-98dc-fdc3b25ff537": { + "position": { + "left": 820, + "top": 60 + }, + "type": "execute_actions" + }, + "66076abc-3928-464d-a21f-ac2eb76f3a3e": { + "position": { + "left": 180, + "top": 240 + }, + "type": "execute_actions" + }, + "228d6e83-3f44-4408-bc0d-5ec1a7c07c04": { + "position": { + "left": 460, + "top": 240 + }, + "type": "execute_actions" + }, + "c4435f6e-1d40-4b0c-9e27-f3f6c4801a59": { + "position": { + "left": 740, + "top": 240 + }, + "type": "execute_actions" + }, + "b75e08a1-6326-4bdb-a87b-a95ae49d9eb2": { + "type": "wait_for_response", + "position": { + "left": 180, + "top": 360 + }, + "config": { + "cases": {} + } + }, + "1e024a99-552b-4506-87ca-844f141fb06a": { + "type": "wait_for_response", + "position": { + "left": 460, + "top": 360 + }, + "config": { + "cases": {} + } + }, + "45e30dab-3a58-4ced-9049-0514824bf14f": { + "type": "wait_for_response", + "position": { + "left": 740, + "top": 360 + }, + "config": { + "cases": {} + } + }, + "e3c37e07-8e7d-4884-86f1-9320e754416d": { + "position": { + "left": 180, + "top": 520 + }, + "type": "execute_actions" + }, + "8abecce8-0184-41ac-9573-b8e876b10a77": { + "position": { + "left": 460, + "top": 520 + }, + "type": "execute_actions" + }, + "af0062ac-16a9-4e7b-94ad-0397e6b56e12": { + "position": { + "left": 740, + "top": 520 + }, + "type": "execute_actions" + } + }, + "stickies": {} + } + } + ] +} \ No newline at end of file diff --git a/test/testdata/runner/question_randomization.test.json b/test/testdata/runner/question_randomization.test.json new file mode 100644 index 000000000..ea01de9c6 --- /dev/null +++ b/test/testdata/runner/question_randomization.test.json @@ -0,0 +1,1536 @@ +{ + "outputs": [ + { + "events": [ + { + "created_on": "2018-07-06T12:30:04.123456789Z", + "msg": { + "text": "Welcome", + "uuid": "c34b6c7d-fa06-4563-92a3-d648ab64bccb" + }, + "step_uuid": "8720f157-ca1c-432f-9c0b-2014ddc77094", + "type": "msg_created" + }, + { + "created_on": "2018-07-06T12:30:08.123456789Z", + "msg": { + "text": "Do you like dogs?", + "uuid": "5ecda5fc-951c-437b-a17e-f85e49829fb9" + }, + "step_uuid": "970b8069-50f5-4f6f-8f41-6b2d9f33d623", + "type": "msg_created" + }, + { + "created_on": "2018-07-06T12:30:11.123456789Z", + "step_uuid": "312d3af0-a565-4c96-ba00-bd7f0d08e671", + "type": "msg_wait" + } + ], + "session": { + "contact": { + "created_on": "2018-01-01T12:00:00Z", + "id": 1234567, + "language": "eng", + "name": "Ben Haggerty", + "status": "active", + "timezone": "America/Guayaquil", + "urns": [ + "tel:+12065551212", + "facebook:1122334455667788", + "mailto:ben@macklemore" + ], + "uuid": "ba96bf7f-bc2a-4873-a7c7-254d1927c4e3" + }, + "environment": { + "allowed_languages": [ + "eng", + "eng" + ], + "date_format": "YYYY-MM-DD", + "max_value_length": 640, + "number_format": { + "decimal_symbol": ".", + "digit_grouping_symbol": "," + }, + "redaction_policy": "none", + "time_format": "tt:mm", + "timezone": "America/Los_Angeles" + }, + "runs": [ + { + "created_on": "2018-07-06T12:30:00.123456789Z", + "events": [ + { + "created_on": "2018-07-06T12:30:04.123456789Z", + "msg": { + "text": "Welcome", + "uuid": "c34b6c7d-fa06-4563-92a3-d648ab64bccb" + }, + "step_uuid": "8720f157-ca1c-432f-9c0b-2014ddc77094", + "type": "msg_created" + }, + { + "created_on": "2018-07-06T12:30:08.123456789Z", + "msg": { + "text": "Do you like dogs?", + "uuid": "5ecda5fc-951c-437b-a17e-f85e49829fb9" + }, + "step_uuid": "970b8069-50f5-4f6f-8f41-6b2d9f33d623", + "type": "msg_created" + }, + { + "created_on": "2018-07-06T12:30:11.123456789Z", + "step_uuid": "312d3af0-a565-4c96-ba00-bd7f0d08e671", + "type": "msg_wait" + } + ], + "exited_on": null, + "expires_on": "2018-07-13T12:30:01.123456789Z", + "flow": { + "name": "Question Randomization", + "uuid": "eaae833a-4970-4be1-aed4-2e6295903b8f" + }, + "modified_on": "2018-07-06T12:30:13.123456789Z", + "path": [ + { + "arrived_on": "2018-07-06T12:30:03.123456789Z", + "exit_uuid": "0a9bca3c-eacb-4fea-8865-6bd2555068f7", + "node_uuid": "0e8917ac-123c-4fc8-a693-a9fa7690ef1a", + "uuid": "8720f157-ca1c-432f-9c0b-2014ddc77094" + }, + { + "arrived_on": "2018-07-06T12:30:06.123456789Z", + "exit_uuid": "a4a9137e-fd94-4b6f-86e1-2412ce7eba33", + "node_uuid": "b37738f7-c6ff-435b-aafd-f1a29dbd7cd6", + "uuid": "5802813d-6c58-4292-8228-9728778b6c98" + }, + { + "arrived_on": "2018-07-06T12:30:07.123456789Z", + "exit_uuid": "e8100147-225e-4b55-8347-42672863cff3", + "node_uuid": "228d6e83-3f44-4408-bc0d-5ec1a7c07c04", + "uuid": "970b8069-50f5-4f6f-8f41-6b2d9f33d623" + }, + { + "arrived_on": "2018-07-06T12:30:10.123456789Z", + "node_uuid": "1e024a99-552b-4506-87ca-844f141fb06a", + "uuid": "312d3af0-a565-4c96-ba00-bd7f0d08e671" + } + ], + "status": "waiting", + "uuid": "692926ea-09d6-4942-bd38-d266ec8d3716" + } + ], + "status": "waiting", + "trigger": { + "contact": { + "created_on": "2018-01-01T12:00:00Z", + "id": 1234567, + "language": "eng", + "name": "Ben Haggerty", + "status": "active", + "timezone": "America/Guayaquil", + "urns": [ + "tel:+12065551212", + "facebook:1122334455667788", + "mailto:ben@macklemore" + ], + "uuid": "ba96bf7f-bc2a-4873-a7c7-254d1927c4e3" + }, + "environment": { + "allowed_languages": [ + "eng", + "eng" + ], + "date_format": "YYYY-MM-DD", + "max_value_length": 640, + "number_format": { + "decimal_symbol": ".", + "digit_grouping_symbol": "," + }, + "redaction_policy": "none", + "time_format": "tt:mm", + "timezone": "America/Los_Angeles" + }, + "flow": { + "name": "Question Randomization", + "uuid": "eaae833a-4970-4be1-aed4-2e6295903b8f" + }, + "triggered_on": "2020-03-20T14:45:56.043737-05:00", + "type": "manual" + }, + "type": "messaging", + "uuid": "d2f852ec-7b4e-457f-ae7f-f8b243c49ff5", + "wait": { + "type": "msg" + } + } + }, + { + "events": [ + { + "created_on": "2018-07-06T12:30:17.123456789Z", + "msg": { + "text": "yes", + "urn": "tel:+12065551212", + "uuid": "c02a3a5c-6b17-4ffe-918c-c46ab5626a5e" + }, + "step_uuid": "312d3af0-a565-4c96-ba00-bd7f0d08e671", + "type": "msg_received" + }, + { + "category": "Yes", + "created_on": "2018-07-06T12:30:21.123456789Z", + "input": "yes", + "name": "Dogs", + "step_uuid": "312d3af0-a565-4c96-ba00-bd7f0d08e671", + "type": "run_result_changed", + "value": "yes" + }, + { + "created_on": "2018-07-06T12:30:25.123456789Z", + "msg": { + "text": "Do you like cats?", + "uuid": "1b5491ec-2b83-445d-bebe-b4a1f677cf4c" + }, + "step_uuid": "b88ce93d-4360-4455-a691-235cbe720980", + "type": "msg_created" + }, + { + "created_on": "2018-07-06T12:30:28.123456789Z", + "step_uuid": "4f15f627-b1e2-4851-8dbf-00ecf5d03034", + "type": "msg_wait" + } + ], + "session": { + "contact": { + "created_on": "2018-01-01T12:00:00Z", + "id": 1234567, + "language": "eng", + "last_seen_on": "2020-03-20T14:45:58.276104-05:00", + "name": "Ben Haggerty", + "status": "active", + "timezone": "America/Guayaquil", + "urns": [ + "tel:+12065551212", + "facebook:1122334455667788", + "mailto:ben@macklemore" + ], + "uuid": "ba96bf7f-bc2a-4873-a7c7-254d1927c4e3" + }, + "environment": { + "allowed_languages": [ + "eng", + "eng" + ], + "date_format": "YYYY-MM-DD", + "max_value_length": 640, + "number_format": { + "decimal_symbol": ".", + "digit_grouping_symbol": "," + }, + "redaction_policy": "none", + "time_format": "tt:mm", + "timezone": "America/Los_Angeles" + }, + "input": { + "created_on": "2020-03-20T14:45:58.276104-05:00", + "text": "yes", + "type": "msg", + "urn": "tel:+12065551212", + "uuid": "c02a3a5c-6b17-4ffe-918c-c46ab5626a5e" + }, + "runs": [ + { + "created_on": "2018-07-06T12:30:00.123456789Z", + "events": [ + { + "created_on": "2018-07-06T12:30:04.123456789Z", + "msg": { + "text": "Welcome", + "uuid": "c34b6c7d-fa06-4563-92a3-d648ab64bccb" + }, + "step_uuid": "8720f157-ca1c-432f-9c0b-2014ddc77094", + "type": "msg_created" + }, + { + "created_on": "2018-07-06T12:30:08.123456789Z", + "msg": { + "text": "Do you like dogs?", + "uuid": "5ecda5fc-951c-437b-a17e-f85e49829fb9" + }, + "step_uuid": "970b8069-50f5-4f6f-8f41-6b2d9f33d623", + "type": "msg_created" + }, + { + "created_on": "2018-07-06T12:30:11.123456789Z", + "step_uuid": "312d3af0-a565-4c96-ba00-bd7f0d08e671", + "type": "msg_wait" + }, + { + "created_on": "2018-07-06T12:30:17.123456789Z", + "msg": { + "text": "yes", + "urn": "tel:+12065551212", + "uuid": "c02a3a5c-6b17-4ffe-918c-c46ab5626a5e" + }, + "step_uuid": "312d3af0-a565-4c96-ba00-bd7f0d08e671", + "type": "msg_received" + }, + { + "category": "Yes", + "created_on": "2018-07-06T12:30:21.123456789Z", + "input": "yes", + "name": "Dogs", + "step_uuid": "312d3af0-a565-4c96-ba00-bd7f0d08e671", + "type": "run_result_changed", + "value": "yes" + }, + { + "created_on": "2018-07-06T12:30:25.123456789Z", + "msg": { + "text": "Do you like cats?", + "uuid": "1b5491ec-2b83-445d-bebe-b4a1f677cf4c" + }, + "step_uuid": "b88ce93d-4360-4455-a691-235cbe720980", + "type": "msg_created" + }, + { + "created_on": "2018-07-06T12:30:28.123456789Z", + "step_uuid": "4f15f627-b1e2-4851-8dbf-00ecf5d03034", + "type": "msg_wait" + } + ], + "exited_on": null, + "expires_on": "2018-07-13T12:30:15.123456789Z", + "flow": { + "name": "Question Randomization", + "uuid": "eaae833a-4970-4be1-aed4-2e6295903b8f" + }, + "modified_on": "2018-07-06T12:30:30.123456789Z", + "path": [ + { + "arrived_on": "2018-07-06T12:30:03.123456789Z", + "exit_uuid": "0a9bca3c-eacb-4fea-8865-6bd2555068f7", + "node_uuid": "0e8917ac-123c-4fc8-a693-a9fa7690ef1a", + "uuid": "8720f157-ca1c-432f-9c0b-2014ddc77094" + }, + { + "arrived_on": "2018-07-06T12:30:06.123456789Z", + "exit_uuid": "a4a9137e-fd94-4b6f-86e1-2412ce7eba33", + "node_uuid": "b37738f7-c6ff-435b-aafd-f1a29dbd7cd6", + "uuid": "5802813d-6c58-4292-8228-9728778b6c98" + }, + { + "arrived_on": "2018-07-06T12:30:07.123456789Z", + "exit_uuid": "e8100147-225e-4b55-8347-42672863cff3", + "node_uuid": "228d6e83-3f44-4408-bc0d-5ec1a7c07c04", + "uuid": "970b8069-50f5-4f6f-8f41-6b2d9f33d623" + }, + { + "arrived_on": "2018-07-06T12:30:10.123456789Z", + "exit_uuid": "a2ce6b62-ebdc-4941-93b7-b816313919e9", + "node_uuid": "1e024a99-552b-4506-87ca-844f141fb06a", + "uuid": "312d3af0-a565-4c96-ba00-bd7f0d08e671" + }, + { + "arrived_on": "2018-07-06T12:30:23.123456789Z", + "exit_uuid": "4508564d-819f-452a-821d-e70c5be2d0cf", + "node_uuid": "b37738f7-c6ff-435b-aafd-f1a29dbd7cd6", + "uuid": "a4d15ed4-5b24-407f-b86e-4b881f09a186" + }, + { + "arrived_on": "2018-07-06T12:30:24.123456789Z", + "exit_uuid": "a5f39459-6f5d-42b1-a73b-0d640ed9a7eb", + "node_uuid": "66076abc-3928-464d-a21f-ac2eb76f3a3e", + "uuid": "b88ce93d-4360-4455-a691-235cbe720980" + }, + { + "arrived_on": "2018-07-06T12:30:27.123456789Z", + "node_uuid": "b75e08a1-6326-4bdb-a87b-a95ae49d9eb2", + "uuid": "4f15f627-b1e2-4851-8dbf-00ecf5d03034" + } + ], + "results": { + "dogs": { + "category": "Yes", + "created_on": "2018-07-06T12:30:19.123456789Z", + "input": "yes", + "name": "Dogs", + "node_uuid": "1e024a99-552b-4506-87ca-844f141fb06a", + "value": "yes" + } + }, + "status": "waiting", + "uuid": "692926ea-09d6-4942-bd38-d266ec8d3716" + } + ], + "status": "waiting", + "trigger": { + "contact": { + "created_on": "2018-01-01T12:00:00Z", + "id": 1234567, + "language": "eng", + "name": "Ben Haggerty", + "status": "active", + "timezone": "America/Guayaquil", + "urns": [ + "tel:+12065551212", + "facebook:1122334455667788", + "mailto:ben@macklemore" + ], + "uuid": "ba96bf7f-bc2a-4873-a7c7-254d1927c4e3" + }, + "environment": { + "allowed_languages": [ + "eng", + "eng" + ], + "date_format": "YYYY-MM-DD", + "max_value_length": 640, + "number_format": { + "decimal_symbol": ".", + "digit_grouping_symbol": "," + }, + "redaction_policy": "none", + "time_format": "tt:mm", + "timezone": "America/Los_Angeles" + }, + "flow": { + "name": "Question Randomization", + "uuid": "eaae833a-4970-4be1-aed4-2e6295903b8f" + }, + "triggered_on": "2020-03-20T14:45:56.043737-05:00", + "type": "manual" + }, + "type": "messaging", + "uuid": "d2f852ec-7b4e-457f-ae7f-f8b243c49ff5", + "wait": { + "type": "msg" + } + } + }, + { + "events": [ + { + "created_on": "2018-07-06T12:30:34.123456789Z", + "msg": { + "text": "no", + "urn": "tel:+12065551212", + "uuid": "08c8aecf-2193-4b14-9369-8da0d46c0bd7" + }, + "step_uuid": "4f15f627-b1e2-4851-8dbf-00ecf5d03034", + "type": "msg_received" + }, + { + "category": "No", + "created_on": "2018-07-06T12:30:38.123456789Z", + "input": "no", + "name": "Cats", + "step_uuid": "4f15f627-b1e2-4851-8dbf-00ecf5d03034", + "type": "run_result_changed", + "value": "no" + }, + { + "created_on": "2018-07-06T12:30:42.123456789Z", + "msg": { + "text": "Do you like lizards?", + "uuid": "b52a7f80-f820-4163-9654-8a7258fbaae4" + }, + "step_uuid": "688e64f9-2456-4b42-afcb-91a2073e5459", + "type": "msg_created" + }, + { + "created_on": "2018-07-06T12:30:45.123456789Z", + "step_uuid": "8ed05195-68cc-47fa-8e78-3bde7b3370ae", + "type": "msg_wait" + } + ], + "session": { + "contact": { + "created_on": "2018-01-01T12:00:00Z", + "id": 1234567, + "language": "eng", + "last_seen_on": "2020-03-20T14:46:00.852209-05:00", + "name": "Ben Haggerty", + "status": "active", + "timezone": "America/Guayaquil", + "urns": [ + "tel:+12065551212", + "facebook:1122334455667788", + "mailto:ben@macklemore" + ], + "uuid": "ba96bf7f-bc2a-4873-a7c7-254d1927c4e3" + }, + "environment": { + "allowed_languages": [ + "eng", + "eng" + ], + "date_format": "YYYY-MM-DD", + "max_value_length": 640, + "number_format": { + "decimal_symbol": ".", + "digit_grouping_symbol": "," + }, + "redaction_policy": "none", + "time_format": "tt:mm", + "timezone": "America/Los_Angeles" + }, + "input": { + "created_on": "2020-03-20T14:46:00.852209-05:00", + "text": "no", + "type": "msg", + "urn": "tel:+12065551212", + "uuid": "08c8aecf-2193-4b14-9369-8da0d46c0bd7" + }, + "runs": [ + { + "created_on": "2018-07-06T12:30:00.123456789Z", + "events": [ + { + "created_on": "2018-07-06T12:30:04.123456789Z", + "msg": { + "text": "Welcome", + "uuid": "c34b6c7d-fa06-4563-92a3-d648ab64bccb" + }, + "step_uuid": "8720f157-ca1c-432f-9c0b-2014ddc77094", + "type": "msg_created" + }, + { + "created_on": "2018-07-06T12:30:08.123456789Z", + "msg": { + "text": "Do you like dogs?", + "uuid": "5ecda5fc-951c-437b-a17e-f85e49829fb9" + }, + "step_uuid": "970b8069-50f5-4f6f-8f41-6b2d9f33d623", + "type": "msg_created" + }, + { + "created_on": "2018-07-06T12:30:11.123456789Z", + "step_uuid": "312d3af0-a565-4c96-ba00-bd7f0d08e671", + "type": "msg_wait" + }, + { + "created_on": "2018-07-06T12:30:17.123456789Z", + "msg": { + "text": "yes", + "urn": "tel:+12065551212", + "uuid": "c02a3a5c-6b17-4ffe-918c-c46ab5626a5e" + }, + "step_uuid": "312d3af0-a565-4c96-ba00-bd7f0d08e671", + "type": "msg_received" + }, + { + "category": "Yes", + "created_on": "2018-07-06T12:30:21.123456789Z", + "input": "yes", + "name": "Dogs", + "step_uuid": "312d3af0-a565-4c96-ba00-bd7f0d08e671", + "type": "run_result_changed", + "value": "yes" + }, + { + "created_on": "2018-07-06T12:30:25.123456789Z", + "msg": { + "text": "Do you like cats?", + "uuid": "1b5491ec-2b83-445d-bebe-b4a1f677cf4c" + }, + "step_uuid": "b88ce93d-4360-4455-a691-235cbe720980", + "type": "msg_created" + }, + { + "created_on": "2018-07-06T12:30:28.123456789Z", + "step_uuid": "4f15f627-b1e2-4851-8dbf-00ecf5d03034", + "type": "msg_wait" + }, + { + "created_on": "2018-07-06T12:30:34.123456789Z", + "msg": { + "text": "no", + "urn": "tel:+12065551212", + "uuid": "08c8aecf-2193-4b14-9369-8da0d46c0bd7" + }, + "step_uuid": "4f15f627-b1e2-4851-8dbf-00ecf5d03034", + "type": "msg_received" + }, + { + "category": "No", + "created_on": "2018-07-06T12:30:38.123456789Z", + "input": "no", + "name": "Cats", + "step_uuid": "4f15f627-b1e2-4851-8dbf-00ecf5d03034", + "type": "run_result_changed", + "value": "no" + }, + { + "created_on": "2018-07-06T12:30:42.123456789Z", + "msg": { + "text": "Do you like lizards?", + "uuid": "b52a7f80-f820-4163-9654-8a7258fbaae4" + }, + "step_uuid": "688e64f9-2456-4b42-afcb-91a2073e5459", + "type": "msg_created" + }, + { + "created_on": "2018-07-06T12:30:45.123456789Z", + "step_uuid": "8ed05195-68cc-47fa-8e78-3bde7b3370ae", + "type": "msg_wait" + } + ], + "exited_on": null, + "expires_on": "2018-07-13T12:30:32.123456789Z", + "flow": { + "name": "Question Randomization", + "uuid": "eaae833a-4970-4be1-aed4-2e6295903b8f" + }, + "modified_on": "2018-07-06T12:30:47.123456789Z", + "path": [ + { + "arrived_on": "2018-07-06T12:30:03.123456789Z", + "exit_uuid": "0a9bca3c-eacb-4fea-8865-6bd2555068f7", + "node_uuid": "0e8917ac-123c-4fc8-a693-a9fa7690ef1a", + "uuid": "8720f157-ca1c-432f-9c0b-2014ddc77094" + }, + { + "arrived_on": "2018-07-06T12:30:06.123456789Z", + "exit_uuid": "a4a9137e-fd94-4b6f-86e1-2412ce7eba33", + "node_uuid": "b37738f7-c6ff-435b-aafd-f1a29dbd7cd6", + "uuid": "5802813d-6c58-4292-8228-9728778b6c98" + }, + { + "arrived_on": "2018-07-06T12:30:07.123456789Z", + "exit_uuid": "e8100147-225e-4b55-8347-42672863cff3", + "node_uuid": "228d6e83-3f44-4408-bc0d-5ec1a7c07c04", + "uuid": "970b8069-50f5-4f6f-8f41-6b2d9f33d623" + }, + { + "arrived_on": "2018-07-06T12:30:10.123456789Z", + "exit_uuid": "a2ce6b62-ebdc-4941-93b7-b816313919e9", + "node_uuid": "1e024a99-552b-4506-87ca-844f141fb06a", + "uuid": "312d3af0-a565-4c96-ba00-bd7f0d08e671" + }, + { + "arrived_on": "2018-07-06T12:30:23.123456789Z", + "exit_uuid": "4508564d-819f-452a-821d-e70c5be2d0cf", + "node_uuid": "b37738f7-c6ff-435b-aafd-f1a29dbd7cd6", + "uuid": "a4d15ed4-5b24-407f-b86e-4b881f09a186" + }, + { + "arrived_on": "2018-07-06T12:30:24.123456789Z", + "exit_uuid": "a5f39459-6f5d-42b1-a73b-0d640ed9a7eb", + "node_uuid": "66076abc-3928-464d-a21f-ac2eb76f3a3e", + "uuid": "b88ce93d-4360-4455-a691-235cbe720980" + }, + { + "arrived_on": "2018-07-06T12:30:27.123456789Z", + "exit_uuid": "4cf31cc2-f028-4c8d-84ef-0fabdb781971", + "node_uuid": "b75e08a1-6326-4bdb-a87b-a95ae49d9eb2", + "uuid": "4f15f627-b1e2-4851-8dbf-00ecf5d03034" + }, + { + "arrived_on": "2018-07-06T12:30:40.123456789Z", + "exit_uuid": "fa779ed2-dad1-4f4d-824a-b7f22d4736ca", + "node_uuid": "b37738f7-c6ff-435b-aafd-f1a29dbd7cd6", + "uuid": "44fe8d72-00ed-4736-acca-bbca70987315" + }, + { + "arrived_on": "2018-07-06T12:30:41.123456789Z", + "exit_uuid": "d73fed98-0e74-4e13-ba5a-5ac30969f1fe", + "node_uuid": "c4435f6e-1d40-4b0c-9e27-f3f6c4801a59", + "uuid": "688e64f9-2456-4b42-afcb-91a2073e5459" + }, + { + "arrived_on": "2018-07-06T12:30:44.123456789Z", + "node_uuid": "45e30dab-3a58-4ced-9049-0514824bf14f", + "uuid": "8ed05195-68cc-47fa-8e78-3bde7b3370ae" + } + ], + "results": { + "cats": { + "category": "No", + "created_on": "2018-07-06T12:30:36.123456789Z", + "input": "no", + "name": "Cats", + "node_uuid": "b75e08a1-6326-4bdb-a87b-a95ae49d9eb2", + "value": "no" + }, + "dogs": { + "category": "Yes", + "created_on": "2018-07-06T12:30:19.123456789Z", + "input": "yes", + "name": "Dogs", + "node_uuid": "1e024a99-552b-4506-87ca-844f141fb06a", + "value": "yes" + } + }, + "status": "waiting", + "uuid": "692926ea-09d6-4942-bd38-d266ec8d3716" + } + ], + "status": "waiting", + "trigger": { + "contact": { + "created_on": "2018-01-01T12:00:00Z", + "id": 1234567, + "language": "eng", + "name": "Ben Haggerty", + "status": "active", + "timezone": "America/Guayaquil", + "urns": [ + "tel:+12065551212", + "facebook:1122334455667788", + "mailto:ben@macklemore" + ], + "uuid": "ba96bf7f-bc2a-4873-a7c7-254d1927c4e3" + }, + "environment": { + "allowed_languages": [ + "eng", + "eng" + ], + "date_format": "YYYY-MM-DD", + "max_value_length": 640, + "number_format": { + "decimal_symbol": ".", + "digit_grouping_symbol": "," + }, + "redaction_policy": "none", + "time_format": "tt:mm", + "timezone": "America/Los_Angeles" + }, + "flow": { + "name": "Question Randomization", + "uuid": "eaae833a-4970-4be1-aed4-2e6295903b8f" + }, + "triggered_on": "2020-03-20T14:45:56.043737-05:00", + "type": "manual" + }, + "type": "messaging", + "uuid": "d2f852ec-7b4e-457f-ae7f-f8b243c49ff5", + "wait": { + "type": "msg" + } + } + }, + { + "events": [ + { + "created_on": "2018-07-06T12:30:51.123456789Z", + "msg": { + "text": "maybe", + "urn": "tel:+12065551212", + "uuid": "3216c1b0-7152-45e7-9018-a66dcae8e867" + }, + "step_uuid": "8ed05195-68cc-47fa-8e78-3bde7b3370ae", + "type": "msg_received" + }, + { + "category": "Other", + "created_on": "2018-07-06T12:30:55.123456789Z", + "input": "maybe", + "name": "Lizards", + "step_uuid": "8ed05195-68cc-47fa-8e78-3bde7b3370ae", + "type": "run_result_changed", + "value": "maybe" + }, + { + "created_on": "2018-07-06T12:30:58.123456789Z", + "msg": { + "text": "Yes or no", + "uuid": "b504fe9e-d8a8-47fd-af9c-ff2f1faac4db" + }, + "step_uuid": "27b67219-e599-4697-b62c-3c781ca3b5da", + "type": "msg_created" + }, + { + "created_on": "2018-07-06T12:31:01.123456789Z", + "step_uuid": "f5e0f002-41fc-4565-8d9f-e51d30290005", + "type": "msg_wait" + } + ], + "session": { + "contact": { + "created_on": "2018-01-01T12:00:00Z", + "id": 1234567, + "language": "eng", + "last_seen_on": "2020-03-20T14:46:05.791215-05:00", + "name": "Ben Haggerty", + "status": "active", + "timezone": "America/Guayaquil", + "urns": [ + "tel:+12065551212", + "facebook:1122334455667788", + "mailto:ben@macklemore" + ], + "uuid": "ba96bf7f-bc2a-4873-a7c7-254d1927c4e3" + }, + "environment": { + "allowed_languages": [ + "eng", + "eng" + ], + "date_format": "YYYY-MM-DD", + "max_value_length": 640, + "number_format": { + "decimal_symbol": ".", + "digit_grouping_symbol": "," + }, + "redaction_policy": "none", + "time_format": "tt:mm", + "timezone": "America/Los_Angeles" + }, + "input": { + "created_on": "2020-03-20T14:46:05.791215-05:00", + "text": "maybe", + "type": "msg", + "urn": "tel:+12065551212", + "uuid": "3216c1b0-7152-45e7-9018-a66dcae8e867" + }, + "runs": [ + { + "created_on": "2018-07-06T12:30:00.123456789Z", + "events": [ + { + "created_on": "2018-07-06T12:30:04.123456789Z", + "msg": { + "text": "Welcome", + "uuid": "c34b6c7d-fa06-4563-92a3-d648ab64bccb" + }, + "step_uuid": "8720f157-ca1c-432f-9c0b-2014ddc77094", + "type": "msg_created" + }, + { + "created_on": "2018-07-06T12:30:08.123456789Z", + "msg": { + "text": "Do you like dogs?", + "uuid": "5ecda5fc-951c-437b-a17e-f85e49829fb9" + }, + "step_uuid": "970b8069-50f5-4f6f-8f41-6b2d9f33d623", + "type": "msg_created" + }, + { + "created_on": "2018-07-06T12:30:11.123456789Z", + "step_uuid": "312d3af0-a565-4c96-ba00-bd7f0d08e671", + "type": "msg_wait" + }, + { + "created_on": "2018-07-06T12:30:17.123456789Z", + "msg": { + "text": "yes", + "urn": "tel:+12065551212", + "uuid": "c02a3a5c-6b17-4ffe-918c-c46ab5626a5e" + }, + "step_uuid": "312d3af0-a565-4c96-ba00-bd7f0d08e671", + "type": "msg_received" + }, + { + "category": "Yes", + "created_on": "2018-07-06T12:30:21.123456789Z", + "input": "yes", + "name": "Dogs", + "step_uuid": "312d3af0-a565-4c96-ba00-bd7f0d08e671", + "type": "run_result_changed", + "value": "yes" + }, + { + "created_on": "2018-07-06T12:30:25.123456789Z", + "msg": { + "text": "Do you like cats?", + "uuid": "1b5491ec-2b83-445d-bebe-b4a1f677cf4c" + }, + "step_uuid": "b88ce93d-4360-4455-a691-235cbe720980", + "type": "msg_created" + }, + { + "created_on": "2018-07-06T12:30:28.123456789Z", + "step_uuid": "4f15f627-b1e2-4851-8dbf-00ecf5d03034", + "type": "msg_wait" + }, + { + "created_on": "2018-07-06T12:30:34.123456789Z", + "msg": { + "text": "no", + "urn": "tel:+12065551212", + "uuid": "08c8aecf-2193-4b14-9369-8da0d46c0bd7" + }, + "step_uuid": "4f15f627-b1e2-4851-8dbf-00ecf5d03034", + "type": "msg_received" + }, + { + "category": "No", + "created_on": "2018-07-06T12:30:38.123456789Z", + "input": "no", + "name": "Cats", + "step_uuid": "4f15f627-b1e2-4851-8dbf-00ecf5d03034", + "type": "run_result_changed", + "value": "no" + }, + { + "created_on": "2018-07-06T12:30:42.123456789Z", + "msg": { + "text": "Do you like lizards?", + "uuid": "b52a7f80-f820-4163-9654-8a7258fbaae4" + }, + "step_uuid": "688e64f9-2456-4b42-afcb-91a2073e5459", + "type": "msg_created" + }, + { + "created_on": "2018-07-06T12:30:45.123456789Z", + "step_uuid": "8ed05195-68cc-47fa-8e78-3bde7b3370ae", + "type": "msg_wait" + }, + { + "created_on": "2018-07-06T12:30:51.123456789Z", + "msg": { + "text": "maybe", + "urn": "tel:+12065551212", + "uuid": "3216c1b0-7152-45e7-9018-a66dcae8e867" + }, + "step_uuid": "8ed05195-68cc-47fa-8e78-3bde7b3370ae", + "type": "msg_received" + }, + { + "category": "Other", + "created_on": "2018-07-06T12:30:55.123456789Z", + "input": "maybe", + "name": "Lizards", + "step_uuid": "8ed05195-68cc-47fa-8e78-3bde7b3370ae", + "type": "run_result_changed", + "value": "maybe" + }, + { + "created_on": "2018-07-06T12:30:58.123456789Z", + "msg": { + "text": "Yes or no", + "uuid": "b504fe9e-d8a8-47fd-af9c-ff2f1faac4db" + }, + "step_uuid": "27b67219-e599-4697-b62c-3c781ca3b5da", + "type": "msg_created" + }, + { + "created_on": "2018-07-06T12:31:01.123456789Z", + "step_uuid": "f5e0f002-41fc-4565-8d9f-e51d30290005", + "type": "msg_wait" + } + ], + "exited_on": null, + "expires_on": "2018-07-13T12:30:49.123456789Z", + "flow": { + "name": "Question Randomization", + "uuid": "eaae833a-4970-4be1-aed4-2e6295903b8f" + }, + "modified_on": "2018-07-06T12:31:03.123456789Z", + "path": [ + { + "arrived_on": "2018-07-06T12:30:03.123456789Z", + "exit_uuid": "0a9bca3c-eacb-4fea-8865-6bd2555068f7", + "node_uuid": "0e8917ac-123c-4fc8-a693-a9fa7690ef1a", + "uuid": "8720f157-ca1c-432f-9c0b-2014ddc77094" + }, + { + "arrived_on": "2018-07-06T12:30:06.123456789Z", + "exit_uuid": "a4a9137e-fd94-4b6f-86e1-2412ce7eba33", + "node_uuid": "b37738f7-c6ff-435b-aafd-f1a29dbd7cd6", + "uuid": "5802813d-6c58-4292-8228-9728778b6c98" + }, + { + "arrived_on": "2018-07-06T12:30:07.123456789Z", + "exit_uuid": "e8100147-225e-4b55-8347-42672863cff3", + "node_uuid": "228d6e83-3f44-4408-bc0d-5ec1a7c07c04", + "uuid": "970b8069-50f5-4f6f-8f41-6b2d9f33d623" + }, + { + "arrived_on": "2018-07-06T12:30:10.123456789Z", + "exit_uuid": "a2ce6b62-ebdc-4941-93b7-b816313919e9", + "node_uuid": "1e024a99-552b-4506-87ca-844f141fb06a", + "uuid": "312d3af0-a565-4c96-ba00-bd7f0d08e671" + }, + { + "arrived_on": "2018-07-06T12:30:23.123456789Z", + "exit_uuid": "4508564d-819f-452a-821d-e70c5be2d0cf", + "node_uuid": "b37738f7-c6ff-435b-aafd-f1a29dbd7cd6", + "uuid": "a4d15ed4-5b24-407f-b86e-4b881f09a186" + }, + { + "arrived_on": "2018-07-06T12:30:24.123456789Z", + "exit_uuid": "a5f39459-6f5d-42b1-a73b-0d640ed9a7eb", + "node_uuid": "66076abc-3928-464d-a21f-ac2eb76f3a3e", + "uuid": "b88ce93d-4360-4455-a691-235cbe720980" + }, + { + "arrived_on": "2018-07-06T12:30:27.123456789Z", + "exit_uuid": "4cf31cc2-f028-4c8d-84ef-0fabdb781971", + "node_uuid": "b75e08a1-6326-4bdb-a87b-a95ae49d9eb2", + "uuid": "4f15f627-b1e2-4851-8dbf-00ecf5d03034" + }, + { + "arrived_on": "2018-07-06T12:30:40.123456789Z", + "exit_uuid": "fa779ed2-dad1-4f4d-824a-b7f22d4736ca", + "node_uuid": "b37738f7-c6ff-435b-aafd-f1a29dbd7cd6", + "uuid": "44fe8d72-00ed-4736-acca-bbca70987315" + }, + { + "arrived_on": "2018-07-06T12:30:41.123456789Z", + "exit_uuid": "d73fed98-0e74-4e13-ba5a-5ac30969f1fe", + "node_uuid": "c4435f6e-1d40-4b0c-9e27-f3f6c4801a59", + "uuid": "688e64f9-2456-4b42-afcb-91a2073e5459" + }, + { + "arrived_on": "2018-07-06T12:30:44.123456789Z", + "exit_uuid": "5fb500e9-2766-42c1-acd2-191943084305", + "node_uuid": "45e30dab-3a58-4ced-9049-0514824bf14f", + "uuid": "8ed05195-68cc-47fa-8e78-3bde7b3370ae" + }, + { + "arrived_on": "2018-07-06T12:30:57.123456789Z", + "exit_uuid": "b511de7f-d7d2-4346-9c74-58232260da80", + "node_uuid": "af0062ac-16a9-4e7b-94ad-0397e6b56e12", + "uuid": "27b67219-e599-4697-b62c-3c781ca3b5da" + }, + { + "arrived_on": "2018-07-06T12:31:00.123456789Z", + "node_uuid": "45e30dab-3a58-4ced-9049-0514824bf14f", + "uuid": "f5e0f002-41fc-4565-8d9f-e51d30290005" + } + ], + "results": { + "cats": { + "category": "No", + "created_on": "2018-07-06T12:30:36.123456789Z", + "input": "no", + "name": "Cats", + "node_uuid": "b75e08a1-6326-4bdb-a87b-a95ae49d9eb2", + "value": "no" + }, + "dogs": { + "category": "Yes", + "created_on": "2018-07-06T12:30:19.123456789Z", + "input": "yes", + "name": "Dogs", + "node_uuid": "1e024a99-552b-4506-87ca-844f141fb06a", + "value": "yes" + }, + "lizards": { + "category": "Other", + "created_on": "2018-07-06T12:30:53.123456789Z", + "input": "maybe", + "name": "Lizards", + "node_uuid": "45e30dab-3a58-4ced-9049-0514824bf14f", + "value": "maybe" + } + }, + "status": "waiting", + "uuid": "692926ea-09d6-4942-bd38-d266ec8d3716" + } + ], + "status": "waiting", + "trigger": { + "contact": { + "created_on": "2018-01-01T12:00:00Z", + "id": 1234567, + "language": "eng", + "name": "Ben Haggerty", + "status": "active", + "timezone": "America/Guayaquil", + "urns": [ + "tel:+12065551212", + "facebook:1122334455667788", + "mailto:ben@macklemore" + ], + "uuid": "ba96bf7f-bc2a-4873-a7c7-254d1927c4e3" + }, + "environment": { + "allowed_languages": [ + "eng", + "eng" + ], + "date_format": "YYYY-MM-DD", + "max_value_length": 640, + "number_format": { + "decimal_symbol": ".", + "digit_grouping_symbol": "," + }, + "redaction_policy": "none", + "time_format": "tt:mm", + "timezone": "America/Los_Angeles" + }, + "flow": { + "name": "Question Randomization", + "uuid": "eaae833a-4970-4be1-aed4-2e6295903b8f" + }, + "triggered_on": "2020-03-20T14:45:56.043737-05:00", + "type": "manual" + }, + "type": "messaging", + "uuid": "d2f852ec-7b4e-457f-ae7f-f8b243c49ff5", + "wait": { + "type": "msg" + } + } + }, + { + "events": [ + { + "created_on": "2018-07-06T12:31:07.123456789Z", + "msg": { + "text": "yes", + "urn": "tel:+12065551212", + "uuid": "972021bb-3bca-401f-b600-c5a210fe67ec" + }, + "step_uuid": "f5e0f002-41fc-4565-8d9f-e51d30290005", + "type": "msg_received" + }, + { + "category": "Yes", + "created_on": "2018-07-06T12:31:11.123456789Z", + "input": "yes", + "name": "Lizards", + "step_uuid": "f5e0f002-41fc-4565-8d9f-e51d30290005", + "type": "run_result_changed", + "value": "yes" + }, + { + "created_on": "2018-07-06T12:31:15.123456789Z", + "msg": { + "text": "You're done. Thanks!", + "uuid": "658fd57d-f132-4ae4-8ab7-4a517a86045c" + }, + "step_uuid": "b6c40a98-ecfa-4266-9853-0310d032b497", + "type": "msg_created" + } + ], + "session": { + "contact": { + "created_on": "2018-01-01T12:00:00Z", + "id": 1234567, + "language": "eng", + "last_seen_on": "2020-03-20T14:46:07.98558-05:00", + "name": "Ben Haggerty", + "status": "active", + "timezone": "America/Guayaquil", + "urns": [ + "tel:+12065551212", + "facebook:1122334455667788", + "mailto:ben@macklemore" + ], + "uuid": "ba96bf7f-bc2a-4873-a7c7-254d1927c4e3" + }, + "environment": { + "allowed_languages": [ + "eng", + "eng" + ], + "date_format": "YYYY-MM-DD", + "max_value_length": 640, + "number_format": { + "decimal_symbol": ".", + "digit_grouping_symbol": "," + }, + "redaction_policy": "none", + "time_format": "tt:mm", + "timezone": "America/Los_Angeles" + }, + "input": { + "created_on": "2020-03-20T14:46:07.98558-05:00", + "text": "yes", + "type": "msg", + "urn": "tel:+12065551212", + "uuid": "972021bb-3bca-401f-b600-c5a210fe67ec" + }, + "runs": [ + { + "created_on": "2018-07-06T12:30:00.123456789Z", + "events": [ + { + "created_on": "2018-07-06T12:30:04.123456789Z", + "msg": { + "text": "Welcome", + "uuid": "c34b6c7d-fa06-4563-92a3-d648ab64bccb" + }, + "step_uuid": "8720f157-ca1c-432f-9c0b-2014ddc77094", + "type": "msg_created" + }, + { + "created_on": "2018-07-06T12:30:08.123456789Z", + "msg": { + "text": "Do you like dogs?", + "uuid": "5ecda5fc-951c-437b-a17e-f85e49829fb9" + }, + "step_uuid": "970b8069-50f5-4f6f-8f41-6b2d9f33d623", + "type": "msg_created" + }, + { + "created_on": "2018-07-06T12:30:11.123456789Z", + "step_uuid": "312d3af0-a565-4c96-ba00-bd7f0d08e671", + "type": "msg_wait" + }, + { + "created_on": "2018-07-06T12:30:17.123456789Z", + "msg": { + "text": "yes", + "urn": "tel:+12065551212", + "uuid": "c02a3a5c-6b17-4ffe-918c-c46ab5626a5e" + }, + "step_uuid": "312d3af0-a565-4c96-ba00-bd7f0d08e671", + "type": "msg_received" + }, + { + "category": "Yes", + "created_on": "2018-07-06T12:30:21.123456789Z", + "input": "yes", + "name": "Dogs", + "step_uuid": "312d3af0-a565-4c96-ba00-bd7f0d08e671", + "type": "run_result_changed", + "value": "yes" + }, + { + "created_on": "2018-07-06T12:30:25.123456789Z", + "msg": { + "text": "Do you like cats?", + "uuid": "1b5491ec-2b83-445d-bebe-b4a1f677cf4c" + }, + "step_uuid": "b88ce93d-4360-4455-a691-235cbe720980", + "type": "msg_created" + }, + { + "created_on": "2018-07-06T12:30:28.123456789Z", + "step_uuid": "4f15f627-b1e2-4851-8dbf-00ecf5d03034", + "type": "msg_wait" + }, + { + "created_on": "2018-07-06T12:30:34.123456789Z", + "msg": { + "text": "no", + "urn": "tel:+12065551212", + "uuid": "08c8aecf-2193-4b14-9369-8da0d46c0bd7" + }, + "step_uuid": "4f15f627-b1e2-4851-8dbf-00ecf5d03034", + "type": "msg_received" + }, + { + "category": "No", + "created_on": "2018-07-06T12:30:38.123456789Z", + "input": "no", + "name": "Cats", + "step_uuid": "4f15f627-b1e2-4851-8dbf-00ecf5d03034", + "type": "run_result_changed", + "value": "no" + }, + { + "created_on": "2018-07-06T12:30:42.123456789Z", + "msg": { + "text": "Do you like lizards?", + "uuid": "b52a7f80-f820-4163-9654-8a7258fbaae4" + }, + "step_uuid": "688e64f9-2456-4b42-afcb-91a2073e5459", + "type": "msg_created" + }, + { + "created_on": "2018-07-06T12:30:45.123456789Z", + "step_uuid": "8ed05195-68cc-47fa-8e78-3bde7b3370ae", + "type": "msg_wait" + }, + { + "created_on": "2018-07-06T12:30:51.123456789Z", + "msg": { + "text": "maybe", + "urn": "tel:+12065551212", + "uuid": "3216c1b0-7152-45e7-9018-a66dcae8e867" + }, + "step_uuid": "8ed05195-68cc-47fa-8e78-3bde7b3370ae", + "type": "msg_received" + }, + { + "category": "Other", + "created_on": "2018-07-06T12:30:55.123456789Z", + "input": "maybe", + "name": "Lizards", + "step_uuid": "8ed05195-68cc-47fa-8e78-3bde7b3370ae", + "type": "run_result_changed", + "value": "maybe" + }, + { + "created_on": "2018-07-06T12:30:58.123456789Z", + "msg": { + "text": "Yes or no", + "uuid": "b504fe9e-d8a8-47fd-af9c-ff2f1faac4db" + }, + "step_uuid": "27b67219-e599-4697-b62c-3c781ca3b5da", + "type": "msg_created" + }, + { + "created_on": "2018-07-06T12:31:01.123456789Z", + "step_uuid": "f5e0f002-41fc-4565-8d9f-e51d30290005", + "type": "msg_wait" + }, + { + "created_on": "2018-07-06T12:31:07.123456789Z", + "msg": { + "text": "yes", + "urn": "tel:+12065551212", + "uuid": "972021bb-3bca-401f-b600-c5a210fe67ec" + }, + "step_uuid": "f5e0f002-41fc-4565-8d9f-e51d30290005", + "type": "msg_received" + }, + { + "category": "Yes", + "created_on": "2018-07-06T12:31:11.123456789Z", + "input": "yes", + "name": "Lizards", + "step_uuid": "f5e0f002-41fc-4565-8d9f-e51d30290005", + "type": "run_result_changed", + "value": "yes" + }, + { + "created_on": "2018-07-06T12:31:15.123456789Z", + "msg": { + "text": "You're done. Thanks!", + "uuid": "658fd57d-f132-4ae4-8ab7-4a517a86045c" + }, + "step_uuid": "b6c40a98-ecfa-4266-9853-0310d032b497", + "type": "msg_created" + } + ], + "exited_on": "2018-07-06T12:31:17.123456789Z", + "expires_on": null, + "flow": { + "name": "Question Randomization", + "uuid": "eaae833a-4970-4be1-aed4-2e6295903b8f" + }, + "modified_on": "2018-07-06T12:31:17.123456789Z", + "path": [ + { + "arrived_on": "2018-07-06T12:30:03.123456789Z", + "exit_uuid": "0a9bca3c-eacb-4fea-8865-6bd2555068f7", + "node_uuid": "0e8917ac-123c-4fc8-a693-a9fa7690ef1a", + "uuid": "8720f157-ca1c-432f-9c0b-2014ddc77094" + }, + { + "arrived_on": "2018-07-06T12:30:06.123456789Z", + "exit_uuid": "a4a9137e-fd94-4b6f-86e1-2412ce7eba33", + "node_uuid": "b37738f7-c6ff-435b-aafd-f1a29dbd7cd6", + "uuid": "5802813d-6c58-4292-8228-9728778b6c98" + }, + { + "arrived_on": "2018-07-06T12:30:07.123456789Z", + "exit_uuid": "e8100147-225e-4b55-8347-42672863cff3", + "node_uuid": "228d6e83-3f44-4408-bc0d-5ec1a7c07c04", + "uuid": "970b8069-50f5-4f6f-8f41-6b2d9f33d623" + }, + { + "arrived_on": "2018-07-06T12:30:10.123456789Z", + "exit_uuid": "a2ce6b62-ebdc-4941-93b7-b816313919e9", + "node_uuid": "1e024a99-552b-4506-87ca-844f141fb06a", + "uuid": "312d3af0-a565-4c96-ba00-bd7f0d08e671" + }, + { + "arrived_on": "2018-07-06T12:30:23.123456789Z", + "exit_uuid": "4508564d-819f-452a-821d-e70c5be2d0cf", + "node_uuid": "b37738f7-c6ff-435b-aafd-f1a29dbd7cd6", + "uuid": "a4d15ed4-5b24-407f-b86e-4b881f09a186" + }, + { + "arrived_on": "2018-07-06T12:30:24.123456789Z", + "exit_uuid": "a5f39459-6f5d-42b1-a73b-0d640ed9a7eb", + "node_uuid": "66076abc-3928-464d-a21f-ac2eb76f3a3e", + "uuid": "b88ce93d-4360-4455-a691-235cbe720980" + }, + { + "arrived_on": "2018-07-06T12:30:27.123456789Z", + "exit_uuid": "4cf31cc2-f028-4c8d-84ef-0fabdb781971", + "node_uuid": "b75e08a1-6326-4bdb-a87b-a95ae49d9eb2", + "uuid": "4f15f627-b1e2-4851-8dbf-00ecf5d03034" + }, + { + "arrived_on": "2018-07-06T12:30:40.123456789Z", + "exit_uuid": "fa779ed2-dad1-4f4d-824a-b7f22d4736ca", + "node_uuid": "b37738f7-c6ff-435b-aafd-f1a29dbd7cd6", + "uuid": "44fe8d72-00ed-4736-acca-bbca70987315" + }, + { + "arrived_on": "2018-07-06T12:30:41.123456789Z", + "exit_uuid": "d73fed98-0e74-4e13-ba5a-5ac30969f1fe", + "node_uuid": "c4435f6e-1d40-4b0c-9e27-f3f6c4801a59", + "uuid": "688e64f9-2456-4b42-afcb-91a2073e5459" + }, + { + "arrived_on": "2018-07-06T12:30:44.123456789Z", + "exit_uuid": "5fb500e9-2766-42c1-acd2-191943084305", + "node_uuid": "45e30dab-3a58-4ced-9049-0514824bf14f", + "uuid": "8ed05195-68cc-47fa-8e78-3bde7b3370ae" + }, + { + "arrived_on": "2018-07-06T12:30:57.123456789Z", + "exit_uuid": "b511de7f-d7d2-4346-9c74-58232260da80", + "node_uuid": "af0062ac-16a9-4e7b-94ad-0397e6b56e12", + "uuid": "27b67219-e599-4697-b62c-3c781ca3b5da" + }, + { + "arrived_on": "2018-07-06T12:31:00.123456789Z", + "exit_uuid": "a58c2787-f393-44c4-a61e-0fc2cc44aef2", + "node_uuid": "45e30dab-3a58-4ced-9049-0514824bf14f", + "uuid": "f5e0f002-41fc-4565-8d9f-e51d30290005" + }, + { + "arrived_on": "2018-07-06T12:31:13.123456789Z", + "exit_uuid": "68e55f94-3efa-4b4a-ab60-160f7b01e666", + "node_uuid": "b37738f7-c6ff-435b-aafd-f1a29dbd7cd6", + "uuid": "3ceb7525-c2e1-40b0-bec9-e032f4f9af5f" + }, + { + "arrived_on": "2018-07-06T12:31:14.123456789Z", + "exit_uuid": "cf12c5a3-c1db-4ba8-8b6d-66cbd49d2ad2", + "node_uuid": "80369f75-68c8-4291-98dc-fdc3b25ff537", + "uuid": "b6c40a98-ecfa-4266-9853-0310d032b497" + } + ], + "results": { + "cats": { + "category": "No", + "created_on": "2018-07-06T12:30:36.123456789Z", + "input": "no", + "name": "Cats", + "node_uuid": "b75e08a1-6326-4bdb-a87b-a95ae49d9eb2", + "value": "no" + }, + "dogs": { + "category": "Yes", + "created_on": "2018-07-06T12:30:19.123456789Z", + "input": "yes", + "name": "Dogs", + "node_uuid": "1e024a99-552b-4506-87ca-844f141fb06a", + "value": "yes" + }, + "lizards": { + "category": "Yes", + "created_on": "2018-07-06T12:31:09.123456789Z", + "input": "yes", + "name": "Lizards", + "node_uuid": "45e30dab-3a58-4ced-9049-0514824bf14f", + "value": "yes" + } + }, + "status": "completed", + "uuid": "692926ea-09d6-4942-bd38-d266ec8d3716" + } + ], + "status": "completed", + "trigger": { + "contact": { + "created_on": "2018-01-01T12:00:00Z", + "id": 1234567, + "language": "eng", + "name": "Ben Haggerty", + "status": "active", + "timezone": "America/Guayaquil", + "urns": [ + "tel:+12065551212", + "facebook:1122334455667788", + "mailto:ben@macklemore" + ], + "uuid": "ba96bf7f-bc2a-4873-a7c7-254d1927c4e3" + }, + "environment": { + "allowed_languages": [ + "eng", + "eng" + ], + "date_format": "YYYY-MM-DD", + "max_value_length": 640, + "number_format": { + "decimal_symbol": ".", + "digit_grouping_symbol": "," + }, + "redaction_policy": "none", + "time_format": "tt:mm", + "timezone": "America/Los_Angeles" + }, + "flow": { + "name": "Question Randomization", + "uuid": "eaae833a-4970-4be1-aed4-2e6295903b8f" + }, + "triggered_on": "2020-03-20T14:45:56.043737-05:00", + "type": "manual" + }, + "type": "messaging", + "uuid": "d2f852ec-7b4e-457f-ae7f-f8b243c49ff5" + } + } + ], + "resumes": [ + { + "msg": { + "text": "yes", + "urn": "tel:+12065551212", + "uuid": "c02a3a5c-6b17-4ffe-918c-c46ab5626a5e" + }, + "resumed_on": "2020-03-20T14:45:58.276104-05:00", + "type": "msg" + }, + { + "msg": { + "text": "no", + "urn": "tel:+12065551212", + "uuid": "08c8aecf-2193-4b14-9369-8da0d46c0bd7" + }, + "resumed_on": "2020-03-20T14:46:00.852209-05:00", + "type": "msg" + }, + { + "msg": { + "text": "maybe", + "urn": "tel:+12065551212", + "uuid": "3216c1b0-7152-45e7-9018-a66dcae8e867" + }, + "resumed_on": "2020-03-20T14:46:05.791215-05:00", + "type": "msg" + }, + { + "msg": { + "text": "yes", + "urn": "tel:+12065551212", + "uuid": "972021bb-3bca-401f-b600-c5a210fe67ec" + }, + "resumed_on": "2020-03-20T14:46:07.98558-05:00", + "type": "msg" + } + ], + "trigger": { + "contact": { + "created_on": "2018-01-01T12:00:00Z", + "id": 1234567, + "language": "eng", + "name": "Ben Haggerty", + "status": "active", + "timezone": "America/Guayaquil", + "urns": [ + "tel:+12065551212", + "facebook:1122334455667788", + "mailto:ben@macklemore" + ], + "uuid": "ba96bf7f-bc2a-4873-a7c7-254d1927c4e3" + }, + "environment": { + "allowed_languages": [ + "eng", + "eng" + ], + "date_format": "YYYY-MM-DD", + "max_value_length": 640, + "number_format": { + "decimal_symbol": ".", + "digit_grouping_symbol": "," + }, + "redaction_policy": "none", + "time_format": "tt:mm", + "timezone": "America/Los_Angeles" + }, + "flow": { + "name": "Question Randomization", + "uuid": "eaae833a-4970-4be1-aed4-2e6295903b8f" + }, + "triggered_on": "2020-03-20T14:45:56.043737-05:00", + "type": "manual" + } +} \ No newline at end of file