Skip to main content
Answered

Can you omit passing responses to salesforce?

  • 25 June 2021
  • 7 replies
  • 76 views

Hi 

 

We have a unique use-case. We are using Typeform to give our sales team a way to profile a lead when they engage with it. To do this, we’ve created a button in salesforce that opens the typeform url and passes 5 hidden fields:

  • username
  • first
  • last
  • company
  • email

These are used to say “hi” to the user (username) and to confirm that they are trying to fill out a lead questionnaire for the appropriate lead (first, last, company and email). These are also used to sync the subsequent answers back to salesforce.

My question is this. When I map my typeform answers back to salesforce, I want to OMIT the “username” question. I can’t seem to be able to do that, however, and when I don’t map it, I get an “Exception: List index out of bounds: 5” error.

My assumption is that the “5” is because I am only mapping some of the fields? or is there something else going on?

This error only showed up after I added the “username” hidden field that is not mapped going back to salesforce

 

Thanks

 

Walter

Hi @wpaliska Thanks for stopping by the community! There was previously an issue causing the error message you’re seeing, but the developers have fixed the issue. In order to get this working on your end, you’ll want to install the new package using the link below.

https://login.salesforce.com/packaging/installPackage.apexp?p0=04t5a000000LrWv

Let me know if you have troubles after installing the package!


Hi Liz

 

Thanks for this - it helped (a bit) - I no longer get the “exception” error - but now I’m getting an error saying “Target Field does not exist:”

Here is the JSON returned (I have anonymized the info)

{
"token" : "eju4ejsvfcjdsd0beju4ej0ndp2jm8r5",
"submitted_at" : "2021-06-25T16:27:52Z",
"landing_id" : "eju4ejsvfcjdsd0beju4ej0ndp2jm8r5",
"landed_at" : "2021-06-25T16:27:47Z",
"hidden" : {
"username" : "Walter",
"last" : "Castille",
"first" : "Kirby",
"email" : "kirby.castille@gmail.com",
"company" : "omUnknown]]"
},
"answers" : a {
"type" : "choice",
"stringField" : "Banking",
"numberField" : null,
"multiSelectField" : null,
"field" : {
"validFieldTypes" : null,
"validations" : null,
"type" : "multiple_choice",
"title" : null,
"targetField" : null,
"ref" : "Industry",
"properties" : null,
"isKey" : null,
"id" : "8TSwHVl8aLKi"
},
"dateField" : null,
"booleanField" : null
}, {
"type" : "choice",
"stringField" : "C-Level",
"numberField" : null,
"multiSelectField" : null,
"field" : {
"validFieldTypes" : null,
"validations" : null,
"type" : "multiple_choice",
"title" : null,
"targetField" : null,
"ref" : "67ad8239-0b75-4a33-a8c4-528654967ce0",
"properties" : null,
"isKey" : null,
"id" : "J8PRYPoYaM4E"
},
"dateField" : null,
"booleanField" : null
}, {
"type" : "hidden",
"stringField" : "gFUnknown]]",
"numberField" : null,
"multiSelectField" : null,
"field" : {
"validFieldTypes" : null,
"validations" : null,
"type" : "hidden",
"title" : null,
"targetField" : null,
"ref" : null,
"properties" : null,
"isKey" : null,
"id" : "hidden|company"
},
"dateField" : null,
"booleanField" : null
}, {
"type" : "hidden",
"stringField" : "first.last@gmail.com",
"numberField" : null,
"multiSelectField" : null,
"field" : {
"validFieldTypes" : null,
"validations" : null,
"type" : "hidden",
"title" : null,
"targetField" : null,
"ref" : null,
"properties" : null,
"isKey" : null,
"id" : "hidden|email"
},
"dateField" : null,
"booleanField" : null
}, {
"type" : "hidden",
"stringField" : "First",
"numberField" : null,
"multiSelectField" : null,
"field" : {
"validFieldTypes" : null,
"validations" : null,
"type" : "hidden",
"title" : null,
"targetField" : null,
"ref" : null,
"properties" : null,
"isKey" : null,
"id" : "hidden|first"
},
"dateField" : null,
"booleanField" : null
}, {
"type" : "hidden",
"stringField" : "Last",
"numberField" : null,
"multiSelectField" : null,
"field" : {
"validFieldTypes" : null,
"validations" : null,
"type" : "hidden",
"title" : null,
"targetField" : null,
"ref" : null,
"properties" : null,
"isKey" : null,
"id" : "hidden|last"
},
"dateField" : null,
"booleanField" : null
}, {
"type" : "hidden",
"stringField" : "Walter",
"numberField" : null,
"multiSelectField" : null,
"field" : {
"validFieldTypes" : null,
"validations" : null,
"type" : "hidden",
"title" : null,
"targetField" : null,
"ref" : null,
"properties" : null,
"isKey" : null,
"id" : "hidden|username"
},
"dateField" : null,
"booleanField" : null
} ]
}


Hi @wpaliska It sounds like some of the fields you previously had on the form might have been removed or edited. Can you check to be sure that all the fields you have mapped in Salesforce are the same as the ones you have in the form? 


I’ve double checked the form - here is the mapping - as you can see the only thing I am trying to do is avoid mapping the last field - since that’s used just to say “hello” and I don’t need to send a response back. 

Below the form is the latest error response (similar to what I had above)

 

 

{
"token" : "6h7pfsadoajjlna6h7pfoqdq9le4fae7",
"submitted_at" : "2021-06-30T22:51:39Z",
"landing_id" : "6h7pfsadoajjlna6h7pfoqdq9le4fae7",
"landed_at" : "2021-06-30T22:51:32Z",
"hidden" : {
"user_first" : "Walter",
"last" : "TestLast",
"first" : "TestFirst",
"email" : "gonzalo.mannucci+confpage@dotdata.com",
"company" : "TestCompany"
},
"answers" : {
"type" : "choice",
"stringField" : "Insurance",
"numberField" : null,
"multiSelectField" : null,
"field" : {
"validFieldTypes" : null,
"validations" : null,
"type" : "multiple_choice",
"title" : null,
"targetField" : null,
"ref" : "Industry",
"properties" : null,
"isKey" : null,
"id" : "8TSwHVl8aLKi"
},
"dateField" : null,
"booleanField" : null
}, {
"type" : "choice",
"stringField" : "C-Level",
"numberField" : null,
"multiSelectField" : null,
"field" : {
"validFieldTypes" : null,
"validations" : null,
"type" : "multiple_choice",
"title" : null,
"targetField" : null,
"ref" : "Management-level",
"properties" : null,
"isKey" : null,
"id" : "J8PRYPoYaM4E"
},
"dateField" : null,
"booleanField" : null
}, {
"type" : "hidden",
"stringField" : "TestCompany",
"numberField" : null,
"multiSelectField" : null,
"field" : {
"validFieldTypes" : null,
"validations" : null,
"type" : "hidden",
"title" : null,
"targetField" : null,
"ref" : null,
"properties" : null,
"isKey" : null,
"id" : "hidden|company"
},
"dateField" : null,
"booleanField" : null
}, {
"type" : "hidden",
"stringField" : "gonzalo.mannucci+confpage@dotdata.com",
"numberField" : null,
"multiSelectField" : null,
"field" : {
"validFieldTypes" : null,
"validations" : null,
"type" : "hidden",
"title" : null,
"targetField" : null,
"ref" : null,
"properties" : null,
"isKey" : null,
"id" : "hidden|email"
},
"dateField" : null,
"booleanField" : null
}, {
"type" : "hidden",
"stringField" : "TestFirst",
"numberField" : null,
"multiSelectField" : null,
"field" : {
"validFieldTypes" : null,
"validations" : null,
"type" : "hidden",
"title" : null,
"targetField" : null,
"ref" : null,
"properties" : null,
"isKey" : null,
"id" : "hidden|first"
},
"dateField" : null,
"booleanField" : null
}, {
"type" : "hidden",
"stringField" : "TestLast",
"numberField" : null,
"multiSelectField" : null,
"field" : {
"validFieldTypes" : null,
"validations" : null,
"type" : "hidden",
"title" : null,
"targetField" : null,
"ref" : null,
"properties" : null,
"isKey" : null,
"id" : "hidden|last"
},
"dateField" : null,
"booleanField" : null
}, {
"type" : "hidden",
"stringField" : "Walter",
"numberField" : null,
"multiSelectField" : null,
"field" : {
"validFieldTypes" : null,
"validations" : null,
"type" : "hidden",
"title" : null,
"targetField" : null,
"ref" : null,
"properties" : null,
"isKey" : null,
"id" : "hidden|user_first"
},
"dateField" : null,
"booleanField" : null
} ]
}


Quick update - looks like it might be a bug - I was on a chat with your support team and your devs are investigating


Short answer to this question seems “no” - today you have to map every Typeform field to a salesforce field


Ah, thank you for sharing @wpaliska ! This is good to know. I appreciate it!


Reply