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