Skip to content

Commit 3ac3ac6

Browse files
committed
PR updates
1 parent 0c83d76 commit 3ac3ac6

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/Umbraco.Forms.Integrations.Crm.ActiveCampaign/ActiveCampaignContactsWorkflow.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ public override WorkflowExecutionStatus Execute(WorkflowExecutionContext context
6969

7070
if(contacts.Contacts.Count > 0 && !_settings.AllowContactUpdate)
7171
{
72-
_logger.LogError("ActiveCampaign contact update is not allowed.");
72+
_logger.LogInformation("Contact already exists in ActiveCampaign and workflow is configured to not apply updates, so update of information was skipped.");
7373

74-
return WorkflowExecutionStatus.Cancelled;
74+
return WorkflowExecutionStatus.Completed;
7575
}
7676

7777
var requestDto = new ContactDetailDto { Contact = Build(context.Record) };

src/Umbraco.Forms.Integrations.Crm.ActiveCampaign/Configuration/ActiveCampaignSettings.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ public ActiveCampaignSettings()
88
ContactFields = new List<ContactFieldSettings>();
99
}
1010

11-
public string BaseUrl { get; set; }
11+
public string BaseUrl { get; }
1212

13-
public string ApiKey { get; set; }
13+
public string ApiKey { get; }
1414

15-
public bool AllowContactUpdate { get; set; }
15+
public bool AllowContactUpdate { get; }
1616

1717
public List<ContactFieldSettings> ContactFields { get; set; }
1818
}

src/Umbraco.Forms.Integrations.Crm.Hubspot/Configuration/HubspotSettings.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ namespace Umbraco.Forms.Integrations.Crm.Hubspot.Configuration
33
{
44
public class HubspotSettings
55
{
6-
public string ApiKey { get; set; }
6+
public string ApiKey { get; }
77

8-
public bool AllowContactUpdate { get; set; }
8+
public bool AllowContactUpdate { get; }
99
}
1010
}

src/Umbraco.Forms.Integrations.Crm.Hubspot/Services/HubspotContactService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,10 @@ public async Task<CommandResult> PostContactAsync(Record record, List<MappedProp
203203
if (response.StatusCode == HttpStatusCode.Conflict)
204204
{
205205
if (!_settings.AllowContactUpdate)
206-
_logger.LogError("Hubspot contact update is not allowed.");
206+
_logger.LogInformation("Contact already exists in HubSpot CRM and workflow is configured to not apply updates, so update of information was skipped.");
207207
return _settings.AllowContactUpdate
208208
? await UpdateContactAsync(record, authenticationDetails, propertiesRequestV1, emailValue)
209-
: CommandResult.Failed;
209+
: CommandResult.Success;
210210
}
211211
else
212212
{

0 commit comments

Comments
 (0)