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