From d9585e5baa530a1ff8ba062a903cf6b907d7c378 Mon Sep 17 00:00:00 2001 From: Rowan Seymour Date: Mon, 12 Mar 2018 16:11:45 -0500 Subject: [PATCH] Rename contact actions --- .../testdata/flows/all_actions.json | 8 ++++---- cmd/flowrunner/testdata/flows/brochure.json | 2 +- cmd/flowrunner/testdata/flows/date_parse.json | 2 +- .../testdata/flows/default_result.json | 4 ++-- .../testdata/flows/dynamic_groups.json | 8 ++++---- cmd/flowrunner/testdata/flows/no_contact.json | 2 +- .../testdata/flows/two_questions.json | 2 +- .../{add_urn.go => add_contact_urn.go} | 18 ++++++++--------- flows/actions/envelope.go | 20 +++++++++---------- flows/actions/remove_contact_groups.go | 14 ++++++------- ...rred_channel.go => set_contact_channel.go} | 10 +++++----- ..._contact_field.go => set_contact_field.go} | 18 ++++++++--------- ...ate_contact.go => set_contact_property.go} | 18 ++++++++--------- flows/definition/legacy.go | 14 ++++++------- .../testdata/migrations/actions.json | 10 +++++----- flows/engine/assets_test.go | 16 +++++++-------- flows/engine/testdata/assets.json | 4 ++-- 17 files changed, 85 insertions(+), 85 deletions(-) rename flows/actions/{add_urn.go => add_contact_urn.go} (73%) rename flows/actions/{set_preferred_channel.go => set_contact_channel.go} (61%) rename flows/actions/{save_contact_field.go => set_contact_field.go} (69%) rename flows/actions/{update_contact.go => set_contact_property.go} (70%) diff --git a/cmd/flowrunner/testdata/flows/all_actions.json b/cmd/flowrunner/testdata/flows/all_actions.json index 76323cfb2..5260e1c85 100644 --- a/cmd/flowrunner/testdata/flows/all_actions.json +++ b/cmd/flowrunner/testdata/flows/all_actions.json @@ -38,13 +38,13 @@ }, { "uuid": "ca5138c1-2a26-44c6-a29c-6ef695bc67ee", - "type": "add_urn", + "type": "add_contact_urn", "scheme": "twitter", "path": "@(replace(lower(contact.name), \" \", \"_\"))" }, { "uuid": "7bd8b3bf-0a3c-4928-bc46-df416e77ddf4", - "type": "save_contact_field", + "type": "set_contact_field", "field": { "key": "activation_token", "label": "Activation Token" @@ -147,13 +147,13 @@ }, { "uuid": "f3581032-e122-45ee-8be7-4f3c955d97f8", - "type": "update_contact", + "type": "set_contact_property", "field_name": "language", "value": "eng" }, { "uuid": "7bd8b3bf-0a3c-4928-bc46-df416e77ddf4", - "type": "save_contact_field", + "type": "set_contact_field", "field": { "key": "gender", "label": "Gender" diff --git a/cmd/flowrunner/testdata/flows/brochure.json b/cmd/flowrunner/testdata/flows/brochure.json index 1751340e4..5492890d4 100644 --- a/cmd/flowrunner/testdata/flows/brochure.json +++ b/cmd/flowrunner/testdata/flows/brochure.json @@ -66,7 +66,7 @@ "actions": [ { "uuid": "455ba297-f6d2-45e6-bf3e-c1ef028b55ae", - "type": "update_contact", + "type": "set_contact_property", "field_name": "name", "value": "@run.input.text" }, diff --git a/cmd/flowrunner/testdata/flows/date_parse.json b/cmd/flowrunner/testdata/flows/date_parse.json index e940db196..b640d614f 100644 --- a/cmd/flowrunner/testdata/flows/date_parse.json +++ b/cmd/flowrunner/testdata/flows/date_parse.json @@ -51,7 +51,7 @@ "actions": [ { "uuid": "afd5ac22-2a86-4576-a2c7-715f0bb10194", - "type": "save_contact_field", + "type": "set_contact_field", "field": { "key": "birth_date", "label": "Birth Date" diff --git a/cmd/flowrunner/testdata/flows/default_result.json b/cmd/flowrunner/testdata/flows/default_result.json index cab66de42..e1bc14deb 100644 --- a/cmd/flowrunner/testdata/flows/default_result.json +++ b/cmd/flowrunner/testdata/flows/default_result.json @@ -46,13 +46,13 @@ "uuid": "2929d2fc-2778-4d98-a4bc-73a7345710b0", "actions": [ { - "type": "update_contact", + "type": "set_contact_property", "uuid": "aafb505c-603d-4025-864d-471345ed236d", "field_name": "name", "value": "@run.results.contact_name" }, { - "type": "save_contact_field", + "type": "set_contact_field", "uuid": "aafb505c-603d-4025-864d-471345ed237d", "field": { "key": "first_name", diff --git a/cmd/flowrunner/testdata/flows/dynamic_groups.json b/cmd/flowrunner/testdata/flows/dynamic_groups.json index 4cc1bdb56..34b9f6002 100644 --- a/cmd/flowrunner/testdata/flows/dynamic_groups.json +++ b/cmd/flowrunner/testdata/flows/dynamic_groups.json @@ -12,7 +12,7 @@ "actions": [ { "uuid": "7bd8b3bf-0a3c-4928-bc46-df416e77ddf4", - "type": "save_contact_field", + "type": "set_contact_field", "field": { "key": "gender", "label": "Gender" @@ -21,7 +21,7 @@ }, { "uuid": "ee4cd27e-1296-40fd-ac9c-8cd43e9fb8b5", - "type": "save_contact_field", + "type": "set_contact_field", "field": { "key": "age", "label": "Age" @@ -35,7 +35,7 @@ }, { "uuid": "bc94b3ba-4aad-410a-ae71-1861f69da0fe", - "type": "add_urn", + "type": "add_contact_urn", "scheme": "tel", "path": "+250781234567" }, @@ -46,7 +46,7 @@ }, { "uuid": "4ecf6abd-e8c8-424b-aef6-e904cf5b4fbe", - "type": "save_contact_field", + "type": "set_contact_field", "field": { "key": "age", "label": "Age" diff --git a/cmd/flowrunner/testdata/flows/no_contact.json b/cmd/flowrunner/testdata/flows/no_contact.json index d5d78a34b..68e76f6fc 100644 --- a/cmd/flowrunner/testdata/flows/no_contact.json +++ b/cmd/flowrunner/testdata/flows/no_contact.json @@ -35,7 +35,7 @@ }, { "uuid": "ca5138c1-2a26-44c6-a29c-6ef695bc67ee", - "type": "add_urn", + "type": "add_contact_urn", "scheme": "twitter", "path": "@(replace(lower(contact.name), \" \", \"_\"))" } diff --git a/cmd/flowrunner/testdata/flows/two_questions.json b/cmd/flowrunner/testdata/flows/two_questions.json index 884a891df..09bdd56bb 100644 --- a/cmd/flowrunner/testdata/flows/two_questions.json +++ b/cmd/flowrunner/testdata/flows/two_questions.json @@ -136,7 +136,7 @@ "actions": [ { "uuid": "afd5ac22-2a86-4576-a2c7-715f0bb10194", - "type": "update_contact", + "type": "set_contact_property", "field_name": "language", "value": "fra" }, diff --git a/flows/actions/add_urn.go b/flows/actions/add_contact_urn.go similarity index 73% rename from flows/actions/add_urn.go rename to flows/actions/add_contact_urn.go index 4269e637c..6f3b80f0f 100644 --- a/flows/actions/add_urn.go +++ b/flows/actions/add_contact_urn.go @@ -9,39 +9,39 @@ import ( "github.com/nyaruka/goflow/flows/events" ) -// TypeAddURN is our type for add URN actions -const TypeAddURN string = "add_urn" +// TypeAddContactURN is our type for add URN actions +const TypeAddContactURN string = "add_contact_urn" -// AddURNAction can be used to add a URN to the current contact. An `contact_urn_added` event +// AddContactURNAction can be used to add a URN to the current contact. An `contact_urn_added` event // will be created when this action is encountered. If there is no contact then this // action will be ignored. // // ``` // { // "uuid": "8eebd020-1af5-431c-b943-aa670fc74da9", -// "type": "add_urn", +// "type": "add_contact_urn", // "scheme": "tel", // "path": "@flow.phone_number" // } // ``` // -// @action add_urn -type AddURNAction struct { +// @action add_contact_urn +type AddContactURNAction struct { BaseAction Scheme string `json:"scheme" validate:"urnscheme"` Path string `json:"path" validate:"required"` } // Type returns the type of this action -func (a *AddURNAction) Type() string { return TypeAddURN } +func (a *AddContactURNAction) Type() string { return TypeAddContactURN } // Validate validates our action is valid and has all the assets it needs -func (a *AddURNAction) Validate(assets flows.SessionAssets) error { +func (a *AddContactURNAction) Validate(assets flows.SessionAssets) error { return nil } // Execute runs the labeling action -func (a *AddURNAction) Execute(run flows.FlowRun, step flows.Step, log flows.EventLog) error { +func (a *AddContactURNAction) Execute(run flows.FlowRun, step flows.Step, log flows.EventLog) error { // only generate event if run has a contact contact := run.Contact() if contact == nil { diff --git a/flows/actions/envelope.go b/flows/actions/envelope.go index c3669d419..64c775352 100644 --- a/flows/actions/envelope.go +++ b/flows/actions/envelope.go @@ -15,8 +15,8 @@ func ActionFromEnvelope(envelope *utils.TypedEnvelope) (flows.Action, error) { action = &AddInputLabelsAction{} case TypeAddContactGroups: action = &AddContactGroupsAction{} - case TypeAddURN: - action = &AddURNAction{} + case TypeAddContactURN: + action = &AddContactURNAction{} case TypeSendEmail: action = &EmailAction{} case TypeStartFlow: @@ -25,18 +25,18 @@ func ActionFromEnvelope(envelope *utils.TypedEnvelope) (flows.Action, error) { action = &StartSessionAction{} case TypeSendMsg: action = &SendMsgAction{} - case TypeRemoveFromGroup: - action = &RemoveFromGroupAction{} + case TypeRemoveContactGroups: + action = &RemoveContactGroupsAction{} case TypeReply: action = &ReplyAction{} case TypeSaveFlowResult: action = &SaveFlowResultAction{} - case TypeSaveContactField: - action = &SaveContactField{} - case TypeSetPreferredChannel: - action = &PreferredChannelAction{} - case TypeUpdateContact: - action = &UpdateContactAction{} + case TypeSetContactField: + action = &SetContactFieldAction{} + case TypeSetContactChannel: + action = &SetContactChannelAction{} + case TypeSetContactProperty: + action = &SetContactPropertyAction{} case TypeCallWebhook: action = &WebhookAction{} default: diff --git a/flows/actions/remove_contact_groups.go b/flows/actions/remove_contact_groups.go index 8c1083b82..89940e475 100644 --- a/flows/actions/remove_contact_groups.go +++ b/flows/actions/remove_contact_groups.go @@ -7,10 +7,10 @@ import ( "github.com/nyaruka/goflow/flows/events" ) -// TypeRemoveFromGroup is our type for our remove from group action -const TypeRemoveFromGroup string = "remove_contact_groups" +// TypeRemoveContactGroups is our type for our remove from group action +const TypeRemoveContactGroups string = "remove_contact_groups" -// RemoveFromGroupAction can be used to remove a contact from one or more groups. A `contact_groups_removed` event will be created +// RemoveContactGroupsAction can be used to remove a contact from one or more groups. A `contact_groups_removed` event will be created // for the groups which the contact is removed from. If no groups are specified, then the contact will be removed from // all groups. // @@ -26,22 +26,22 @@ const TypeRemoveFromGroup string = "remove_contact_groups" // ``` // // @action remove_contact_groups -type RemoveFromGroupAction struct { +type RemoveContactGroupsAction struct { BaseAction Groups []*flows.GroupReference `json:"groups" validate:"required,min=1,dive"` } // Type returns the type of this action -func (a *RemoveFromGroupAction) Type() string { return TypeRemoveFromGroup } +func (a *RemoveContactGroupsAction) Type() string { return TypeRemoveContactGroups } // Validate validates our action is valid and has all the assets it needs -func (a *RemoveFromGroupAction) Validate(assets flows.SessionAssets) error { +func (a *RemoveContactGroupsAction) Validate(assets flows.SessionAssets) error { // check we have all groups return a.validateGroups(assets, a.Groups) } // Execute runs the action -func (a *RemoveFromGroupAction) Execute(run flows.FlowRun, step flows.Step, log flows.EventLog) error { +func (a *RemoveContactGroupsAction) Execute(run flows.FlowRun, step flows.Step, log flows.EventLog) error { contact := run.Contact() if contact == nil { log.Add(events.NewFatalErrorEvent(fmt.Errorf("can't execute action in session without a contact"))) diff --git a/flows/actions/set_preferred_channel.go b/flows/actions/set_contact_channel.go similarity index 61% rename from flows/actions/set_preferred_channel.go rename to flows/actions/set_contact_channel.go index cc86e5a1e..1d8324a0d 100644 --- a/flows/actions/set_preferred_channel.go +++ b/flows/actions/set_contact_channel.go @@ -7,23 +7,23 @@ import ( "github.com/nyaruka/goflow/flows/events" ) -const TypeSetPreferredChannel string = "set_preferred_channel" +const TypeSetContactChannel string = "set_contact_channel" -type PreferredChannelAction struct { +type SetContactChannelAction struct { BaseAction Channel *flows.ChannelReference `json:"channel"` } // Type returns the type of this action -func (a *PreferredChannelAction) Type() string { return TypeSetPreferredChannel } +func (a *SetContactChannelAction) Type() string { return TypeSetContactChannel } // Validate validates our action is valid and has all the assets it needs -func (a *PreferredChannelAction) Validate(assets flows.SessionAssets) error { +func (a *SetContactChannelAction) Validate(assets flows.SessionAssets) error { _, err := assets.GetChannel(a.Channel.UUID) return err } -func (a *PreferredChannelAction) Execute(run flows.FlowRun, step flows.Step, log flows.EventLog) error { +func (a *SetContactChannelAction) Execute(run flows.FlowRun, step flows.Step, log flows.EventLog) error { if run.Contact() == nil { log.Add(events.NewFatalErrorEvent(fmt.Errorf("can't execute action in session without a contact"))) return nil diff --git a/flows/actions/save_contact_field.go b/flows/actions/set_contact_field.go similarity index 69% rename from flows/actions/save_contact_field.go rename to flows/actions/set_contact_field.go index b9d25bda1..4bb106481 100644 --- a/flows/actions/save_contact_field.go +++ b/flows/actions/set_contact_field.go @@ -9,39 +9,39 @@ import ( "github.com/nyaruka/goflow/utils" ) -// TypeSaveContactField is the type for our save to contact action -const TypeSaveContactField string = "save_contact_field" +// TypeSetContactField is the type for our set contact field action +const TypeSetContactField string = "set_contact_field" -// SaveContactField can be used to save a value to a contact. The value can be a template and will +// SetContactFieldAction can be used to save a value to a contact. The value can be a template and will // be evaluated during the flow. A `contact_field_changed` event will be created with the corresponding value. // // ``` // { // "uuid": "8eebd020-1af5-431c-b943-aa670fc74da9", -// "type": "save_contact_field", +// "type": "set_contact_field", // "field": {"key": "gender", "label": "Gender"}, // "value": "Male" // } // ``` // -// @action save_contact_field -type SaveContactField struct { +// @action set_contact_field +type SetContactFieldAction struct { BaseAction Field *flows.FieldReference `json:"field" validate:"required"` Value string `json:"value"` } // Type returns the type of this action -func (a *SaveContactField) Type() string { return TypeSaveContactField } +func (a *SetContactFieldAction) Type() string { return TypeSetContactField } // Validate validates our action is valid and has all the assets it needs -func (a *SaveContactField) Validate(assets flows.SessionAssets) error { +func (a *SetContactFieldAction) Validate(assets flows.SessionAssets) error { _, err := assets.GetField(a.Field.Key) return err } // Execute runs this action -func (a *SaveContactField) Execute(run flows.FlowRun, step flows.Step, log flows.EventLog) error { +func (a *SetContactFieldAction) Execute(run flows.FlowRun, step flows.Step, log flows.EventLog) error { if run.Contact() == nil { log.Add(events.NewFatalErrorEvent(fmt.Errorf("can't execute action in session without a contact"))) return nil diff --git a/flows/actions/update_contact.go b/flows/actions/set_contact_property.go similarity index 70% rename from flows/actions/update_contact.go rename to flows/actions/set_contact_property.go index 134c45336..670099196 100644 --- a/flows/actions/update_contact.go +++ b/flows/actions/set_contact_property.go @@ -10,33 +10,33 @@ import ( "github.com/nyaruka/goflow/utils" ) -// TypeUpdateContact is the type for our update contact action -const TypeUpdateContact string = "update_contact" +// TypeSetContactProperty is the type for our set contact property action +const TypeSetContactProperty string = "set_contact_property" -// UpdateContactAction can be used to update one of the built in fields for a contact of "name" or +// SetContactPropertyAction can be used to update one of the built in fields for a contact of "name" or // "language". An `contact_property_changed` event will be created with the corresponding values. // // ``` // { // "uuid": "8eebd020-1af5-431c-b943-aa670fc74da9", -// "type": "update_contact", +// "type": "set_contact_property", // "field_name": "language", // "value": "eng" // } // ``` // -// @action update_contact -type UpdateContactAction struct { +// @action set_contact_property +type SetContactPropertyAction struct { BaseAction FieldName string `json:"field_name" validate:"required,eq=name|eq=language"` Value string `json:"value"` } // Type returns the type of this action -func (a *UpdateContactAction) Type() string { return TypeUpdateContact } +func (a *SetContactPropertyAction) Type() string { return TypeSetContactProperty } // Validate validates our action is valid and has all the assets it needs -func (a *UpdateContactAction) Validate(assets flows.SessionAssets) error { +func (a *SetContactPropertyAction) Validate(assets flows.SessionAssets) error { // check language is valid if specified if a.FieldName == "language" && a.Value != "" { if _, err := utils.ParseLanguage(a.Value); err != nil { @@ -47,7 +47,7 @@ func (a *UpdateContactAction) Validate(assets flows.SessionAssets) error { } // Execute runs this action -func (a *UpdateContactAction) Execute(run flows.FlowRun, step flows.Step, log flows.EventLog) error { +func (a *SetContactPropertyAction) Execute(run flows.FlowRun, step flows.Step, log flows.EventLog) error { if run.Contact() == nil { log.Add(events.NewFatalErrorEvent(fmt.Errorf("can't execute action in session without a contact"))) return nil diff --git a/flows/definition/legacy.go b/flows/definition/legacy.go index 1fefbb5fa..93115694e 100644 --- a/flows/definition/legacy.go +++ b/flows/definition/legacy.go @@ -406,13 +406,13 @@ func migrateAction(baseLanguage utils.Language, a legacyAction, translations *fl }, nil case "lang": - return &actions.UpdateContactAction{ + return &actions.SetContactPropertyAction{ FieldName: "language", Value: string(a.Language), BaseAction: actions.NewBaseAction(a.UUID), }, nil case "channel": - return &actions.PreferredChannelAction{ + return &actions.SetContactChannelAction{ Channel: flows.NewChannelReference(a.Channel, a.Name), BaseAction: actions.NewBaseAction(a.UUID), }, nil @@ -536,7 +536,7 @@ func migrateAction(baseLanguage utils.Language, a legacyAction, translations *fl groups[i] = group.Migrate() } - return &actions.RemoveFromGroupAction{ + return &actions.RemoveContactGroupsAction{ Groups: groups, BaseAction: actions.NewBaseAction(a.UUID), }, nil @@ -551,7 +551,7 @@ func migrateAction(baseLanguage utils.Language, a legacyAction, translations *fl migratedValue = fmt.Sprintf("%s @(word_slice(contact.name, 2, -1))", migratedValue) } - return &actions.UpdateContactAction{ + return &actions.SetContactPropertyAction{ FieldName: "name", Value: migratedValue, BaseAction: actions.NewBaseAction(a.UUID), @@ -560,20 +560,20 @@ func migrateAction(baseLanguage utils.Language, a legacyAction, translations *fl // and another new action for adding a URN if urns.IsValidScheme(a.Field) { - return &actions.AddURNAction{ + return &actions.AddContactURNAction{ Scheme: a.Field, Path: migratedValue, BaseAction: actions.NewBaseAction(a.UUID), }, nil } else if a.Field == "tel_e164" { - return &actions.AddURNAction{ + return &actions.AddContactURNAction{ Scheme: "tel", Path: migratedValue, BaseAction: actions.NewBaseAction(a.UUID), }, nil } - return &actions.SaveContactField{ + return &actions.SetContactFieldAction{ Field: flows.NewFieldReference(flows.FieldKey(a.Field), a.Label), Value: migratedValue, BaseAction: actions.NewBaseAction(a.UUID), diff --git a/flows/definition/testdata/migrations/actions.json b/flows/definition/testdata/migrations/actions.json index 9ceedebc1..0a5cdae07 100644 --- a/flows/definition/testdata/migrations/actions.json +++ b/flows/definition/testdata/migrations/actions.json @@ -66,7 +66,7 @@ "name": "Twilio" }, "expected_action": { - "type": "set_preferred_channel", + "type": "set_contact_channel", "uuid": "5a4d00aa-807e-44af-9693-64b9fdedd352", "channel": {"uuid": "3eca24b7-6313-4f30-870f-f7b948e54b1e", "name": "Twilio"} }, @@ -116,7 +116,7 @@ "name": "French" }, "expected_action": { - "type": "update_contact", + "type": "set_contact_property", "uuid": "5a4d00aa-807e-44af-9693-64b9fdedd352", "field_name": "language", "value": "fra" @@ -187,7 +187,7 @@ "value": "Bob @step.value" }, "expected_action": { - "type": "update_contact", + "type": "set_contact_property", "uuid": "5a4d00aa-807e-44af-9693-64b9fdedd352", "field_name": "name", "value": "Bob @run.input" @@ -203,7 +203,7 @@ "value": "@step.value" }, "expected_action": { - "type": "update_contact", + "type": "set_contact_property", "uuid": "5a4d00aa-807e-44af-9693-64b9fdedd352", "field_name": "name", "value": "@run.input @(word_slice(contact.name, 2, -1))" @@ -219,7 +219,7 @@ "value": "@step.value" }, "expected_action": { - "type": "save_contact_field", + "type": "set_contact_field", "uuid": "5a4d00aa-807e-44af-9693-64b9fdedd352", "field": {"key": "gender", "label": "Gender"}, "value": "@run.input" diff --git a/flows/engine/assets_test.go b/flows/engine/assets_test.go index c9f826f53..76eb3a88f 100644 --- a/flows/engine/assets_test.go +++ b/flows/engine/assets_test.go @@ -120,19 +120,19 @@ func TestFlowValidation(t *testing.T) { // fix the add_group action addGroupAction.Groups[0].UUID = "2aad21f6-30b7-42c5-bd7f-1b720c154817" - // break the save_contact_field action so references an invalid field - saveContactAction := flow.Nodes()[0].Actions()[2].(*actions.SaveContactField) + // break the set_contact_field action so references an invalid field + saveContactAction := flow.Nodes()[0].Actions()[2].(*actions.SetContactFieldAction) saveContactAction.Field.Key = "xyx" // check that validation fails err = flow.Validate(session.Assets()) - assert.EqualError(t, err, "validation failed for action[uuid=7bd8b3bf-0a3c-4928-bc46-df416e77ddf4, type=save_contact_field]: no such field with key 'xyx'") + assert.EqualError(t, err, "validation failed for action[uuid=7bd8b3bf-0a3c-4928-bc46-df416e77ddf4, type=set_contact_field]: no such field with key 'xyx'") - // fix the save_contact_field action + // fix the set_contact_field action saveContactAction.Field.Key = "first_name" - // break the set_preferred_channel action so references an invalid channel - prefChannelAction := flow.Nodes()[0].Actions()[3].(*actions.PreferredChannelAction) + // break the set_contact_channel action so references an invalid channel + prefChannelAction := flow.Nodes()[0].Actions()[3].(*actions.SetContactChannelAction) prefChannelAction.Channel.UUID = "xyx" // can't simulate a missing channel without the asset store trying to fetch it... but we can stuff the wrong thing in the store @@ -140,8 +140,8 @@ func TestFlowValidation(t *testing.T) { // check that validation fails err = flow.Validate(session.Assets()) - assert.EqualError(t, err, "validation failed for action[uuid=3248a064-bc42-4dff-aa0f-93d85de2f600, type=set_preferred_channel]: asset cache contains asset with wrong type") + assert.EqualError(t, err, "validation failed for action[uuid=3248a064-bc42-4dff-aa0f-93d85de2f600, type=set_contact_channel]: asset cache contains asset with wrong type") - // fix the set_preferred_channel action + // fix the set_contact_channel action prefChannelAction.Channel.UUID = "57f1078f-88aa-46f4-a59a-948a5739c03d" } diff --git a/flows/engine/testdata/assets.json b/flows/engine/testdata/assets.json index 7b0e077ac..e49b8f734 100644 --- a/flows/engine/testdata/assets.json +++ b/flows/engine/testdata/assets.json @@ -32,7 +32,7 @@ }, { "uuid": "7bd8b3bf-0a3c-4928-bc46-df416e77ddf4", - "type": "save_contact_field", + "type": "set_contact_field", "field": { "key": "first_name", "label": "First Name" @@ -41,7 +41,7 @@ }, { "uuid": "3248a064-bc42-4dff-aa0f-93d85de2f600", - "type": "set_preferred_channel", + "type": "set_contact_channel", "channel": { "uuid": "57f1078f-88aa-46f4-a59a-948a5739c03d", "name": "Twilio Channel"