Skip to content

Commit e14d2a7

Browse files
authored
Merge pull request #99 from umbraco/bugfix/13.x/hubspot-renaming
HubSpot name references corrections
2 parents 1910986 + 57538ab commit e14d2a7

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

src/Umbraco.Forms.Integrations.Crm.Hubspot/HubspotWorkflow.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ public HubspotWorkflow(ILogger<HubspotWorkflow> logger, IContactService contactS
3030
_contactService = contactService;
3131

3232
Id = new Guid(HubspotWorkflowId);
33-
Name = "Save Contact to Hubspot";
34-
Description = "Form submissions are sent to Hubspot CRM";
33+
Name = "Save Contact to HubSpot";
34+
Description = "Form submissions are sent to HubSpot CRM";
3535
Icon = "icon-handshake";
3636
Group = "CRM";
3737
}
@@ -47,7 +47,7 @@ public override async Task<WorkflowExecutionStatus> ExecuteAsync(WorkflowExecuti
4747
var fieldMappings = JsonConvert.DeserializeObject<List<MappedProperty>>(fieldMappingsRawJson);
4848
if (fieldMappings.Count == 0)
4949
{
50-
_logger.LogWarning("Workflow {WorkflowName}: Missing Hubspot field mappings for workflow for the form {FormName} ({FormId})",
50+
_logger.LogWarning("Workflow {WorkflowName}: Missing HubSpot field mappings for workflow for the form {FormName} ({FormId})",
5151
workflowName, context.Form.Name, context.Form.Id);
5252
return WorkflowExecutionStatus.NotConfigured;
5353
}

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public async Task<CommandResult> PostContactAsync(Record record, List<MappedProp
149149
return CommandResult.NotConfigured;
150150
}
151151

152-
// Map data from the workflow setting Hubspot fields
152+
// Map data from the workflow setting HubSpot fields
153153
// From the form field values submitted for this form submission
154154
var propertiesRequestV1 = new PropertiesRequestV1();
155155
var propertiesRequestV3 = new PropertiesRequestV3();
@@ -167,7 +167,7 @@ public async Task<CommandResult> PostContactAsync(Record record, List<MappedProp
167167
propertiesRequestV1.Properties.Add(new PropertiesRequestV1.PropertyValue(mapping.HubspotField, value));
168168
propertiesRequestV3.Properties.Add(mapping.HubspotField, value);
169169

170-
// TODO: What about different field types in forms & Hubspot that are not simple text ones?
170+
// TODO: What about different field types in forms & HubSpot that are not simple text ones?
171171

172172
// "Email" appears to be a special form field used for uniqueness checks, so we can safely look it up by name.
173173
if (mapping.HubspotField.ToLowerInvariant() == "email")
@@ -192,7 +192,7 @@ public async Task<CommandResult> PostContactAsync(Record record, List<MappedProp
192192
}
193193
}
194194

195-
// POST data to hubspot
195+
// POST data to HubSpot
196196
// https://api.hubapi.com/crm/v3/objects/contacts?hapikey=YOUR_HUBSPOT_API_KEY
197197
var requestUrl = $"{CrmV3ApiBaseUrl}objects/contacts";
198198
var httpMethod = HttpMethod.Post;
@@ -215,7 +215,7 @@ public async Task<CommandResult> PostContactAsync(Record record, List<MappedProp
215215
var retryResult = await HandleFailedRequest(response.StatusCode, requestUrl, httpMethod, authenticationDetails, propertiesRequestV3, JsonContentType);
216216
if (retryResult.Success)
217217
{
218-
_logger.LogInformation($"Hubspot contact record created from record {record.UniqueId}.");
218+
_logger.LogInformation($"HubSpot contact record created from record {record.UniqueId}.");
219219
return CommandResult.Success;
220220
}
221221
else
@@ -228,7 +228,7 @@ public async Task<CommandResult> PostContactAsync(Record record, List<MappedProp
228228
}
229229
else
230230
{
231-
_logger.LogInformation($"Hubspot contact record created from record {record.UniqueId}.");
231+
_logger.LogInformation($"HubSpot contact record created from record {record.UniqueId}.");
232232
return CommandResult.Success;
233233
}
234234
}
@@ -247,7 +247,7 @@ private async Task<CommandResult> UpdateContactAsync(Record record, Authenticati
247247
var retryResult = await HandleFailedRequest(response.StatusCode, requestUrl, HttpMethod.Post, authenticationDetails, postData, JsonContentType);
248248
if (retryResult.Success)
249249
{
250-
_logger.LogInformation($"Hubspot contact record updated from record {record.UniqueId}.");
250+
_logger.LogInformation($"HubSpot contact record updated from record {record.UniqueId}.");
251251
return CommandResult.Success;
252252
}
253253
else
@@ -258,7 +258,7 @@ private async Task<CommandResult> UpdateContactAsync(Record record, Authenticati
258258
}
259259
else
260260
{
261-
_logger.LogInformation($"Hubspot contact record updated from record {record.UniqueId}.");
261+
_logger.LogInformation($"HubSpot contact record updated from record {record.UniqueId}.");
262262
return CommandResult.Success;
263263
}
264264
}

src/Umbraco.Forms.Integrations.Crm.Hubspot/docs/readme.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Hubspot with Umbraco Forms
2-
With this integration, you can connect Hubspot CRM with Umbraco Forms and store information that your Umbraco website visitors submit, as contacts in your Hubspot CRM platform!
1+
# HubSpot with Umbraco Forms
2+
With this integration, you can connect HubSpot CRM with Umbraco Forms and store information that your Umbraco website visitors submit, as contacts in your HubSpot CRM platform!
33

44
More specifically the integration adds a new workflow option when creating or editing a form via the back-office. When the form is added to your webpage, filled out, and submitted the information can be seen via your HubSpot account dashboard.
55

66
**Customizing Umbraco Forms:**
77

8-
Within Umbraco Forms, we provide a custom workflow that sends the submitted information to Hubspot CRM where it is used to create or update a contact record.
8+
Within Umbraco Forms, we provide a custom workflow that sends the submitted information to HubSpot CRM where it is used to create or update a contact record.
99

1010
Workflows within Umbraco Forms are processes that run after a form is submitted to allow you to do more with the provided information than just store it in the database for subsequent review in the back-office. Out of the box, you can configure operations like sending an email with the information provided, but workflows are also something you can build yourself for the specific needs of your application.
1111

0 commit comments

Comments
 (0)