refactor(vtiger-crm): update field names and keys
This commit is contained in:
@@ -9,7 +9,7 @@ export const fields = [
|
||||
},
|
||||
{
|
||||
label: 'Record Currency',
|
||||
key: 'recordCurrency',
|
||||
key: 'recordCurrencyId',
|
||||
type: 'dropdown',
|
||||
required: false,
|
||||
description: '',
|
||||
@@ -78,8 +78,8 @@ export const fields = [
|
||||
},
|
||||
},
|
||||
{
|
||||
label: 'Contact Name',
|
||||
key: 'contactName',
|
||||
label: 'Contact',
|
||||
key: 'contactId',
|
||||
type: 'dropdown',
|
||||
required: true,
|
||||
description: '',
|
||||
@@ -96,8 +96,8 @@ export const fields = [
|
||||
},
|
||||
},
|
||||
{
|
||||
label: 'Organization Name',
|
||||
key: 'organizationName',
|
||||
label: 'Organization',
|
||||
key: 'organizationId',
|
||||
type: 'dropdown',
|
||||
required: false,
|
||||
description: '',
|
||||
@@ -115,7 +115,7 @@ export const fields = [
|
||||
},
|
||||
{
|
||||
label: 'Group',
|
||||
key: 'group',
|
||||
key: 'groupId',
|
||||
type: 'dropdown',
|
||||
required: false,
|
||||
description: '',
|
||||
@@ -140,8 +140,8 @@ export const fields = [
|
||||
variables: true,
|
||||
},
|
||||
{
|
||||
label: 'Product Name',
|
||||
key: 'productName',
|
||||
label: 'Product',
|
||||
key: 'productId',
|
||||
type: 'dropdown',
|
||||
required: false,
|
||||
description: '',
|
||||
@@ -262,8 +262,8 @@ export const fields = [
|
||||
variables: true,
|
||||
},
|
||||
{
|
||||
label: 'Service Contracts',
|
||||
key: 'serviceContracts',
|
||||
label: 'Service Contract',
|
||||
key: 'serviceContractId',
|
||||
type: 'dropdown',
|
||||
required: false,
|
||||
description: '',
|
||||
@@ -281,7 +281,7 @@ export const fields = [
|
||||
},
|
||||
{
|
||||
label: 'Asset',
|
||||
key: 'asset',
|
||||
key: 'assetId',
|
||||
type: 'dropdown',
|
||||
required: false,
|
||||
description: '',
|
||||
@@ -298,8 +298,8 @@ export const fields = [
|
||||
},
|
||||
},
|
||||
{
|
||||
label: 'SLA Name',
|
||||
key: 'slaName',
|
||||
label: 'SLA',
|
||||
key: 'slaId',
|
||||
type: 'dropdown',
|
||||
required: false,
|
||||
description: '',
|
||||
|
@@ -10,24 +10,24 @@ export default defineAction({
|
||||
async run($) {
|
||||
const {
|
||||
summary,
|
||||
recordCurrency,
|
||||
recordCurrencyId,
|
||||
caseTitle,
|
||||
status,
|
||||
priority,
|
||||
contactName,
|
||||
organizationName,
|
||||
group,
|
||||
contactId,
|
||||
organizationId,
|
||||
groupId,
|
||||
assignedTo,
|
||||
productName,
|
||||
productId,
|
||||
channel,
|
||||
resolution,
|
||||
category,
|
||||
subCategory,
|
||||
resolutionType,
|
||||
deferredDate,
|
||||
serviceContracts,
|
||||
asset,
|
||||
slaName,
|
||||
serviceContractId,
|
||||
assetId,
|
||||
slaId,
|
||||
isBillable,
|
||||
service,
|
||||
rate,
|
||||
@@ -38,24 +38,24 @@ export default defineAction({
|
||||
|
||||
const elementData = {
|
||||
description: summary,
|
||||
record_currency_id: recordCurrency,
|
||||
record_currency_id: recordCurrencyId,
|
||||
title: caseTitle,
|
||||
casestatus: status,
|
||||
casepriority: priority,
|
||||
contact_id: contactName,
|
||||
parent_id: organizationName,
|
||||
group_id: group,
|
||||
contact_id: contactId,
|
||||
parent_id: organizationId,
|
||||
group_id: groupId,
|
||||
assigned_user_id: assignedTo,
|
||||
product_id: productName,
|
||||
product_id: productId,
|
||||
casechannel: channel,
|
||||
resolution: resolution,
|
||||
impact_type: category,
|
||||
impact_area: subCategory,
|
||||
resolution_type: resolutionType,
|
||||
deferred_date: deferredDate,
|
||||
servicecontract_id: serviceContracts,
|
||||
asset_id: asset,
|
||||
slaid: slaName,
|
||||
servicecontract_id: serviceContractId,
|
||||
asset_id: assetId,
|
||||
slaid: slaId,
|
||||
is_billable: isBillable,
|
||||
billing_service: service,
|
||||
rate: rate,
|
||||
|
@@ -79,8 +79,8 @@ export const fields = [
|
||||
variables: true,
|
||||
},
|
||||
{
|
||||
label: 'Organization Name',
|
||||
key: 'organizationName',
|
||||
label: 'Organization',
|
||||
key: 'organizationId',
|
||||
type: 'dropdown',
|
||||
required: false,
|
||||
description: '',
|
||||
@@ -215,8 +215,8 @@ export const fields = [
|
||||
variables: true,
|
||||
},
|
||||
{
|
||||
label: 'SLA Name',
|
||||
key: 'slaName',
|
||||
label: 'SLA',
|
||||
key: 'slaId',
|
||||
type: 'dropdown',
|
||||
required: false,
|
||||
description: '',
|
||||
@@ -300,7 +300,7 @@ export const fields = [
|
||||
},
|
||||
{
|
||||
label: 'Record Currency',
|
||||
key: 'recordCurrency',
|
||||
key: 'recordCurrencyId',
|
||||
type: 'dropdown',
|
||||
required: false,
|
||||
description: '',
|
||||
@@ -402,7 +402,7 @@ export const fields = [
|
||||
},
|
||||
{
|
||||
label: 'Source Campaign',
|
||||
key: 'sourceCampaign',
|
||||
key: 'sourceCampaignId',
|
||||
type: 'dropdown',
|
||||
required: false,
|
||||
description: '',
|
||||
|
@@ -18,7 +18,7 @@ export default defineAction({
|
||||
homePhone,
|
||||
dateOfBirth,
|
||||
fax,
|
||||
organizationName,
|
||||
organizationId,
|
||||
title,
|
||||
department,
|
||||
reportsTo,
|
||||
@@ -28,16 +28,16 @@ export default defineAction({
|
||||
doNotCall,
|
||||
notifyOwner,
|
||||
twitterUsername,
|
||||
slaName,
|
||||
slaId,
|
||||
lifecycleStage,
|
||||
status,
|
||||
happinessRating,
|
||||
recordCurrency,
|
||||
recordCurrencyId,
|
||||
referredBy,
|
||||
emailOptin,
|
||||
smsOptin,
|
||||
language,
|
||||
sourceCampaign,
|
||||
sourceCampaignId,
|
||||
portalUser,
|
||||
supportStartDate,
|
||||
supportEndDate,
|
||||
@@ -71,7 +71,7 @@ export default defineAction({
|
||||
homephone: homePhone,
|
||||
birthday: dateOfBirth,
|
||||
fax: fax,
|
||||
account_id: organizationName,
|
||||
account_id: organizationId,
|
||||
title: title,
|
||||
department: department,
|
||||
contact_id: reportsTo,
|
||||
@@ -82,16 +82,16 @@ export default defineAction({
|
||||
notify_owner: notifyOwner,
|
||||
emailoptout: emailOptin,
|
||||
primary_twitter: twitterUsername,
|
||||
slaid: slaName,
|
||||
slaid: slaId,
|
||||
contacttype: lifecycleStage,
|
||||
contactstatus: status,
|
||||
happiness_rating: happinessRating,
|
||||
record_currency_id: recordCurrency,
|
||||
record_currency_id: recordCurrencyId,
|
||||
referred_by: referredBy,
|
||||
emailoptin: emailOptin,
|
||||
smsoptin: smsOptin,
|
||||
language: language,
|
||||
source_campaign: sourceCampaign,
|
||||
source_campaign: sourceCampaignId,
|
||||
portal: portalUser,
|
||||
support_start_date: supportStartDate,
|
||||
support_end_date: supportEndDate,
|
||||
|
@@ -200,7 +200,7 @@ export const fields = [
|
||||
},
|
||||
{
|
||||
label: 'Record Currency',
|
||||
key: 'recordCurrency',
|
||||
key: 'recordCurrencyId',
|
||||
type: 'dropdown',
|
||||
required: false,
|
||||
description: '',
|
||||
@@ -284,7 +284,7 @@ export const fields = [
|
||||
},
|
||||
{
|
||||
label: 'Source Campaign',
|
||||
key: 'sourceCampaign',
|
||||
key: 'sourceCampaignId',
|
||||
type: 'dropdown',
|
||||
required: false,
|
||||
description: '',
|
||||
|
@@ -26,11 +26,11 @@ export default defineAction({
|
||||
fax,
|
||||
numberOfEmployees,
|
||||
twitterUsername,
|
||||
recordCurrency,
|
||||
recordCurrencyId,
|
||||
emailOptin,
|
||||
smsOptin,
|
||||
language,
|
||||
sourceCampaign,
|
||||
sourceCampaignId,
|
||||
country,
|
||||
street,
|
||||
poBox,
|
||||
@@ -59,11 +59,11 @@ export default defineAction({
|
||||
fax: fax,
|
||||
noofemployees: numberOfEmployees,
|
||||
primary_twitter: twitterUsername,
|
||||
record_currency_id: recordCurrency,
|
||||
record_currency_id: recordCurrencyId,
|
||||
emailoptin: emailOptin,
|
||||
smsoptin: smsOptin,
|
||||
language: language,
|
||||
source_campaign: sourceCampaign,
|
||||
source_campaign: sourceCampaignId,
|
||||
country: country,
|
||||
lane: street,
|
||||
pobox: poBox,
|
||||
|
@@ -16,8 +16,8 @@ export const fields = [
|
||||
variables: true,
|
||||
},
|
||||
{
|
||||
label: 'Organization Name',
|
||||
key: 'organizationName',
|
||||
label: 'Organization',
|
||||
key: 'organizationId',
|
||||
type: 'dropdown',
|
||||
required: false,
|
||||
description: '',
|
||||
@@ -34,8 +34,8 @@ export const fields = [
|
||||
},
|
||||
},
|
||||
{
|
||||
label: 'Contact Name',
|
||||
key: 'contactName',
|
||||
label: 'Contact',
|
||||
key: 'contactId',
|
||||
type: 'dropdown',
|
||||
required: false,
|
||||
description: '',
|
||||
@@ -161,7 +161,7 @@ export const fields = [
|
||||
},
|
||||
{
|
||||
label: 'Campaign Source',
|
||||
key: 'campaignSource',
|
||||
key: 'campaignSourceId',
|
||||
type: 'dropdown',
|
||||
required: false,
|
||||
description: '',
|
||||
@@ -217,7 +217,7 @@ export const fields = [
|
||||
},
|
||||
{
|
||||
label: 'Record Currency',
|
||||
key: 'recordCurrency',
|
||||
key: 'recordCurrencyId',
|
||||
type: 'dropdown',
|
||||
required: false,
|
||||
description: '',
|
||||
|
@@ -11,8 +11,8 @@ export default defineAction({
|
||||
const {
|
||||
dealName,
|
||||
amount,
|
||||
organizationName,
|
||||
contactName,
|
||||
organizationId,
|
||||
contactId,
|
||||
expectedCloseDate,
|
||||
pipeline,
|
||||
salesStage,
|
||||
@@ -21,19 +21,19 @@ export default defineAction({
|
||||
nextStep,
|
||||
type,
|
||||
probability,
|
||||
campaignSource,
|
||||
campaignSourceId,
|
||||
weightedRevenue,
|
||||
adjustedAmount,
|
||||
lostReason,
|
||||
recordCurrency,
|
||||
recordCurrencyId,
|
||||
description,
|
||||
} = $.step.parameters;
|
||||
|
||||
const elementData = {
|
||||
potentialname: dealName,
|
||||
amount,
|
||||
related_to: organizationName,
|
||||
contact_id: contactName,
|
||||
related_to: organizationId,
|
||||
contact_id: contactId,
|
||||
closingdate: expectedCloseDate,
|
||||
pipeline,
|
||||
sales_stage: salesStage,
|
||||
@@ -42,11 +42,11 @@ export default defineAction({
|
||||
nextstep: nextStep,
|
||||
opportunity_type: type,
|
||||
probability: probability,
|
||||
campaignid: campaignSource,
|
||||
campaignid: campaignSourceId,
|
||||
forecast_amount: weightedRevenue,
|
||||
adjusted_amount: adjustedAmount,
|
||||
lost_reason: lostReason,
|
||||
record_currency_id: recordCurrency,
|
||||
record_currency_id: recordCurrencyId,
|
||||
description,
|
||||
};
|
||||
|
||||
|
@@ -54,8 +54,8 @@ export const fields = [
|
||||
},
|
||||
},
|
||||
{
|
||||
label: 'Contact Name',
|
||||
key: 'contactName',
|
||||
label: 'Contact',
|
||||
key: 'contactId',
|
||||
type: 'dropdown',
|
||||
required: false,
|
||||
description: '',
|
||||
@@ -106,7 +106,7 @@ export const fields = [
|
||||
},
|
||||
{
|
||||
label: 'Record Currency',
|
||||
key: 'recordCurrency',
|
||||
key: 'recordCurrencyId',
|
||||
type: 'dropdown',
|
||||
required: false,
|
||||
description: '',
|
||||
@@ -247,8 +247,8 @@ export const fields = [
|
||||
},
|
||||
},
|
||||
{
|
||||
label: 'Project Name',
|
||||
key: 'projectName',
|
||||
label: 'Project',
|
||||
key: 'projectId',
|
||||
type: 'dropdown',
|
||||
required: false,
|
||||
description: '',
|
||||
@@ -265,8 +265,8 @@ export const fields = [
|
||||
},
|
||||
},
|
||||
{
|
||||
label: 'Organization Name',
|
||||
key: 'organizationName',
|
||||
label: 'Organization',
|
||||
key: 'organizationId',
|
||||
type: 'dropdown',
|
||||
required: false,
|
||||
description: '',
|
||||
@@ -337,8 +337,8 @@ export const fields = [
|
||||
variables: true,
|
||||
},
|
||||
{
|
||||
label: 'SLA Name',
|
||||
key: 'slaName',
|
||||
label: 'SLA',
|
||||
key: 'slaId',
|
||||
type: 'dropdown',
|
||||
required: false,
|
||||
description: '',
|
||||
|
@@ -14,11 +14,11 @@ export default defineAction({
|
||||
startDateAndTime,
|
||||
dueDate,
|
||||
stage,
|
||||
contactName,
|
||||
contactId,
|
||||
priority,
|
||||
sendNotification,
|
||||
location,
|
||||
recordCurrency,
|
||||
recordCurrencyId,
|
||||
milestone,
|
||||
previousTask,
|
||||
parentTask,
|
||||
@@ -26,14 +26,14 @@ export default defineAction({
|
||||
skippedReason,
|
||||
estimate,
|
||||
relatedTask,
|
||||
projectName,
|
||||
organizationName,
|
||||
projectId,
|
||||
organizationId,
|
||||
sendEmailReminderBefore,
|
||||
description,
|
||||
isBillable,
|
||||
service,
|
||||
rate,
|
||||
slaName,
|
||||
slaId,
|
||||
} = $.step.parameters;
|
||||
|
||||
const elementData = {
|
||||
@@ -42,11 +42,11 @@ export default defineAction({
|
||||
date_start: startDateAndTime,
|
||||
due_date: dueDate,
|
||||
taskstatus: stage,
|
||||
contact_id: contactName,
|
||||
contact_id: contactId,
|
||||
taskpriority: priority,
|
||||
sendnotification: sendNotification,
|
||||
location: location,
|
||||
record_currency_id: recordCurrency,
|
||||
record_currency_id: recordCurrencyId,
|
||||
milestone: milestone,
|
||||
dependent_on: previousTask,
|
||||
parent_task: parentTask,
|
||||
@@ -54,14 +54,14 @@ export default defineAction({
|
||||
skipped_reason: skippedReason,
|
||||
estimate: estimate,
|
||||
related_task: relatedTask,
|
||||
related_project: projectName,
|
||||
account_id: organizationName,
|
||||
related_project: projectId,
|
||||
account_id: organizationId,
|
||||
reminder_time: sendEmailReminderBefore,
|
||||
description: description,
|
||||
is_billable: isBillable,
|
||||
billing_service: service,
|
||||
rate: rate,
|
||||
slaid: slaName,
|
||||
slaid: slaId,
|
||||
};
|
||||
|
||||
const body = {
|
||||
|
Reference in New Issue
Block a user