parent
5dd5b357f3
commit
fbd1aeedc8
|
@ -15,7 +15,7 @@ import (
|
|||
)
|
||||
|
||||
// StoreContactActivity posts a new contact object to datastore
|
||||
func StoreContactActivity(ctx workflow.Context, w app.ContactActivityWrapper) error { //nolint:gocritic // what we want
|
||||
func StoreContactActivity(ctx workflow.Context, w app.ContactActivityWrapper) error { //nolint:gocritic // don't care
|
||||
obj := &crm_models.Contact{
|
||||
AccountID: w.AccountID,
|
||||
AssistantName: w.AssistantName,
|
||||
|
@ -67,7 +67,7 @@ func StoreContactActivity(ctx workflow.Context, w app.ContactActivityWrapper) er
|
|||
}
|
||||
|
||||
// NotifyContactActivity sends an email to a new lead
|
||||
func NotifyContactActivity(ctx context.Context, w *app.ContactActivityWrapper) error {
|
||||
func NotifyContactActivity(ctx context.Context, w app.ContactActivityWrapper) error { //nolint:dupl,gocritic,lll // todo #2 need email templates
|
||||
sugar.Info("workflow.notifyContact: 📥")
|
||||
var buf bytes.Buffer
|
||||
const textBody = `
|
||||
|
|
|
@ -59,7 +59,7 @@ func StoreLeadActivity(ctx workflow.Context, w app.LeadActivityWrapper) error {
|
|||
}
|
||||
|
||||
// NotifyLeadActivity sends an email to a new lead
|
||||
func NotifyLeadActivity(ctx context.Context, w *app.LeadActivityWrapper) error {
|
||||
func NotifyLeadActivity(ctx context.Context, w app.LeadActivityWrapper) error { //nolint:dupl,gocritic,lll // todo #2 need email templates
|
||||
sugar.Info("workflow.notifyLead: 📥")
|
||||
var buf bytes.Buffer
|
||||
const textBody = `
|
||||
|
|
|
@ -9,12 +9,15 @@ import (
|
|||
|
||||
// NewLeadWorkflowWrapper wraps a Lead with auth and saga info
|
||||
type NewLeadWorkflowWrapper struct {
|
||||
APIKey string
|
||||
SagaID string
|
||||
SagaType string
|
||||
//
|
||||
// Address crm_models.Address
|
||||
Company string
|
||||
Description string
|
||||
Email string
|
||||
FirstName string
|
||||
ID string
|
||||
LastName string
|
||||
MobilePhone string
|
||||
Name string
|
||||
|
@ -33,9 +36,6 @@ type NewLeadWorkflowWrapper struct {
|
|||
UTMSource string
|
||||
UTMTerm string
|
||||
Website string
|
||||
APIKey string
|
||||
SagaID string
|
||||
SagaType string
|
||||
}
|
||||
|
||||
// NewLeadWorkflow is a Temporal workflow
|
||||
|
|
Loading…
Reference in New Issue