Skip to content
This repository was archived by the owner on Mar 10, 2024. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/docs/api/v2/engagement/create-contact.api.mdx

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/docs/api/v2/engagement/update-contact.api.mdx

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ properties:
type: string
nullable: true
example: CEO
company_name:
type: string
nullable: true
example: Acme Inc.
description: Maps to `company` field in Outreach (which creates an invisible account internally) and `person_company_name` in Salesloft (which is a field on person unrelated to the account object, accessible by the account_name_or_company field in email templates)
address:
$ref: ./objects/address.yaml
email_addresses:
Expand Down
6 changes: 6 additions & 0 deletions openapi/v2/engagement/openapi.bundle.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions packages/core/remotes/impl/outreach/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ export const fromOutreachProspectToContact = (record: OutreachRecord): Contact =
firstName: (attributes.firstName as string) ?? null,
lastName: (attributes.lastName as string) ?? null,
jobTitle: (attributes.title as string) ?? null,
companyName: (attributes.company as string) ?? null,
address: {
street1: (attributes.addressStreet as string) ?? null,
street2: (attributes.addressStreet2 as string) ?? null,
Expand Down Expand Up @@ -232,11 +233,13 @@ export const toOutreachProspectCreateParams = ({
customFields,
ownerId,
accountId,
companyName,
}: ContactCreateParams): Record<string, any> => {
const attributes = {
firstName,
lastName,
title: jobTitle,
company: companyName,
...toOutreachProspectAddressParams(address),
...toOutreachProspectEmailParams(emailAddresses),
...toOutreachProspectPhoneNumbers(phoneNumbers),
Expand Down
2 changes: 2 additions & 0 deletions packages/core/remotes/impl/salesloft/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export const fromSalesloftPersonToContact = (record: Record<string, any>): Conta
firstName: record.first_name ?? null,
lastName: record.last_name ?? null,
jobTitle: record.title ?? null,
companyName: record.person_company_name ?? null,
address: {
street1: null,
street2: null,
Expand Down Expand Up @@ -168,6 +169,7 @@ export const toSalesloftContactCreateParams = (contact: ContactCreateParams): Re
city: contact.address?.city,
state: contact.address?.state,
country: contact.address?.country,
person_company_name: contact.companyName,
email_address: contact.emailAddresses?.find((e) => e.emailAddressType === 'primary')?.emailAddress,
personal_email_address: contact.emailAddresses?.find((e) => e.emailAddressType === 'personal')?.emailAddress,
phone: contact.phoneNumbers?.find((e) => e.phoneNumberType === 'primary')?.phoneNumber,
Expand Down
5 changes: 5 additions & 0 deletions packages/schemas/gen/v2/engagement.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/types/engagement/contact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ type CoreContact = {
lastName: string | null;
jobTitle: string | null;
address: Address | null;
companyName?: string | null;
emailAddresses: EmailAddress[];
phoneNumbers: PhoneNumber[];
openCount: number;
Expand Down