Skip to content

Commit

Permalink
chore: move pardot to new component structure
Browse files Browse the repository at this point in the history
  • Loading branch information
aashishmalik committed Mar 6, 2024
1 parent c106590 commit 135bb49
Show file tree
Hide file tree
Showing 4 changed files with 427 additions and 13 deletions.
176 changes: 176 additions & 0 deletions test/integrations/destinations/pardot/dataDelivery/business.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
import { ProxyV1TestData } from '../../../testTypes';
import { generateMetadata, generateProxyV1Payload } from '../../../testUtils';

const commonHeaders = {
Authorization: 'Bearer myToken',
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8',
'Pardot-Business-Unit-Id': '0Uv2v000000k9tHCAQ',
'User-Agent': 'RudderLabs',
};

const commonRequestParameters = {
headers: commonHeaders,
FORM: {
first_name: 'Roger12',
last_name: 'Federer12',
website: 'https://rudderstack.com',
score: 14,
campaign_id: 42213,
},
};

export const businessV1TestScenarios = [
{
id: 'pardot_v1_bussiness_scenario_1',
name: 'pardot',
description: '[Proxy v1 API] :: pardot oauth',
successCriteria: 'Proper response from destination is received',
scenario: 'Oauth',
feature: 'dataDelivery',
module: 'destination',
version: 'v1',
input: {
request: {
body: {
endpoint:
'https://pi.pardot.com/api/prospect/version/4/do/upsert/email/[email protected]',
data: 'first_name=Roger12&last_name=Federer12&website=https%3A%2F%2Frud',
params: { destination: 'pardot' },
headers: {
Authorization: 'Bearer myToken',
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8',
'Pardot-Business-Unit-Id': '0Uv2v000000k9tHCAQ',
'User-Agent': 'RudderLabs',
},
method: 'POST',
},
method: 'POST',
},
},
output: {
response: {
status: 200,
body: {
output: {
status: 200,
message: 'Request Processed Successfully',
response: [
{
error: `{
'@attributes': {
stat: 'ok',
version: 1,
},
prospect: {
id: 123435,
campaign_id: 42213,
salutation: null,
first_name: 'Roger_12',
last_name: 'Federer_12',
email: '[email protected]',
password: null,
company: null,
website: 'https://rudderstack.com',
job_title: null,
department: null,
country: 'AU',
address_one: null,
address_two: null,
city: null,
state: null,
territory: null,
zip: null,
phone: null,
fax: null,
source: null,
annual_revenue: null,
employees: null,
industry: null,
years_in_business: null,
comments: null,
notes: null,
score: 14,
grade: null,
last_activity_at: null,
recent_interaction: 'Never active.',
crm_lead_fid: null,
crm_contact_fid: null,
crm_owner_fid: '00G2v000004WYXaEAO',
crm_account_fid: null,
salesforce_fid: null,
crm_last_sync: null,
crm_url: null,
is_do_not_email: null,
is_do_not_call: null,
opted_out: null,
is_reviewed: 1,
is_starred: null,
created_at: '2022-01-21 18:21:46',
updated_at: '2022-01-21 18:48:41',
campaign: {
id: 42113,
name: 'Test',
crm_fid: '7012y000000MNOCLL4',
},
assigned_to: {
user: {
id: 38443703,
email: '[email protected]',
first_name: 'Rudderstack',
last_name: 'User',
job_title: null,
role: 'Administrator',
account: 489853,
created_at: '2021-02-26 06:25:17',
updated_at: '2021-02-26 06:25:17',
},
},
Are_you_shipping_large_fragile_or_bulky_items: false,
Calendly: false,
Country_Code: 'AU',
Currency: 'AUD',
Inventory_or_Warehouse_Management_System: false,
Lead_Status: 'New',
Marketing_Stage: 'SAL',
Record_Type_ID: 'TestCompany Lead',
profile: {
id: 304,
name: 'Default',
profile_criteria: [
{
id: 1500,
name: 'Shipping Volume',
matches: 'Unknown',
},
{
id: 1502,
name: 'Industry',
matches: 'Unknown',
},
{
id: 1506,
name: 'Job Title',
matches: 'Unknown',
},
{
id: 1508,
name: 'Department',
matches: 'Unknown',
},
],
},
visitors: null,
visitor_activities: null,
lists: null,
},
}`,
statusCode: 200,
metadata: generateMetadata(1),
},
],
},
},
},
},
},
];
5 changes: 5 additions & 0 deletions test/integrations/destinations/pardot/dataDelivery/data.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { businessV1TestScenarios } from './business';
import { v1OauthScenarios } from './oauth';
import { otherScenariosV1 } from './other';

export const data = [...v1OauthScenarios, ...businessV1TestScenarios, ...otherScenariosV1];
Loading

0 comments on commit 135bb49

Please sign in to comment.