diff --git a/packages/destination-actions/src/destinations/facebook-custom-audiences/generated-types.ts b/packages/destination-actions/src/destinations/facebook-custom-audiences/generated-types.ts index 59b2e16987..44bc2e671a 100644 --- a/packages/destination-actions/src/destinations/facebook-custom-audiences/generated-types.ts +++ b/packages/destination-actions/src/destinations/facebook-custom-audiences/generated-types.ts @@ -4,7 +4,7 @@ export interface Settings { /** * Your advertiser account id. Read [more](https://www.facebook.com/business/help/1492627900875762). */ - adAccountId: string + retlAdAccountId: string } // Generated file. DO NOT MODIFY IT BY HAND. @@ -12,7 +12,7 @@ export interface AudienceSettings { /** * Your advertiser account id. Read [more](https://www.facebook.com/business/help/1492627900875762). */ - adAccountId: string + engageAdAccountId: string /** * A brief description about your audience. */ diff --git a/packages/destination-actions/src/destinations/facebook-custom-audiences/index.ts b/packages/destination-actions/src/destinations/facebook-custom-audiences/index.ts index 3d672ec30f..c1c5c7faa4 100644 --- a/packages/destination-actions/src/destinations/facebook-custom-audiences/index.ts +++ b/packages/destination-actions/src/destinations/facebook-custom-audiences/index.ts @@ -16,7 +16,7 @@ const destination: AudienceDestinationDefinition = { authentication: { scheme: 'oauth2', fields: { - adAccountId + retlAdAccountId: adAccountId }, refreshAccessToken: async () => { return { accessToken: 'TODO: Implement this' } @@ -30,7 +30,7 @@ const destination: AudienceDestinationDefinition = { } }, audienceFields: { - adAccountId, + engageAdAccountId: adAccountId, audienceDescription: { type: 'string', label: 'Description', @@ -45,7 +45,7 @@ const destination: AudienceDestinationDefinition = { }, async createAudience(request, createAudienceInput) { const audienceName = createAudienceInput.audienceName - const adAccountId = createAudienceInput.audienceSettings?.adAccountId + const adAccountId = createAudienceInput.audienceSettings?.engageAdAccountId const audienceDescription = createAudienceInput.audienceSettings?.audienceDescription if (!audienceName) { diff --git a/packages/destination-actions/src/destinations/facebook-custom-audiences/sync/index.ts b/packages/destination-actions/src/destinations/facebook-custom-audiences/sync/index.ts index 90101a3c54..a31546b1f6 100644 --- a/packages/destination-actions/src/destinations/facebook-custom-audiences/sync/index.ts +++ b/packages/destination-actions/src/destinations/facebook-custom-audiences/sync/index.ts @@ -10,11 +10,12 @@ const action: ActionDefinition = { hooks: { retlOnMappingSave: { label: 'Select or create an audience in Facebook', - description: 'TODO: Create or select an audience in Facebook.', + description: + 'When saving this mapping, Segment will either create a new audience in Facebook or connect to an existing one. To create a new audience, enter the name of the audience. To connect to an existing audience, select the audience ID from the dropdown.', inputFields: { audienceName: { type: 'string', - label: 'Audience Name', + label: 'Audience Creation Name', description: 'The name of the audience in Facebook.', default: 'TODO: Model Name by default' }, @@ -23,7 +24,7 @@ const action: ActionDefinition = { label: 'Existing Audience ID', description: 'The ID of the audience in Facebook.', dynamic: async (request, { settings }) => { - const fbClient = new FacebookClient(request, settings.adAccountId) + const fbClient = new FacebookClient(request, settings.retlAdAccountId) const { choices, error } = await fbClient.getAllAudiences() if (error) { @@ -51,7 +52,7 @@ const action: ActionDefinition = { } }, performHook: async (request, { settings, hookInputs }) => { - const fbClient = new FacebookClient(request, settings.adAccountId) + const fbClient = new FacebookClient(request, settings.retlAdAccountId) if (hookInputs.existingAudienceId) { const { data, error } = await fbClient.getSingleAudience(hookInputs.existingAudienceId)