Webserice test getting error 400 | XM Community
Skip to main content

Webserice test getting error 400

  • June 15, 2023
  • 10 replies
  • 594 views

Forum|alt.badge.img+2

I’m trying to set web service task after case is resolved on the Service Now,the Web service should write data to the data set i created, i tried to test it with specific case number and i got the following error:

{"meta":{"requestId":"30a018ec-d600-46ba-a154-571ff572ec4b","httpStatus":"400 - Bad Request","error":{"errorCode":"CE_400","errorMessage":"Record number 1 does not have a field for primaryKey: null"}}}

 

 

10 replies

Appzk
QPN Level 5 ●●●●●
Forum|alt.badge.img+34
  • QPN Level 5 ●●●●●
  • 276 replies
  • June 16, 2023

Change the data type to JSON or string.


Ricmarug
Level 5 ●●●●●
Forum|alt.badge.img+16
  • Level 5 ●●●●●
  • 61 replies
  • June 16, 2023

Hello @shirano.

It seems like something from the API structure more than the format you’re using. Based on the error “Record number 1 does not have a field for primaryKey: null”, I would check the names that the API uses for the parameters to run. Maybe you need another field or other field name for the CaseNumber for it to identify the primary key. You could try checking the API documentation.


Appzk
QPN Level 5 ●●●●●
Forum|alt.badge.img+34
  • QPN Level 5 ●●●●●
  • 276 replies
  • June 16, 2023

What is this API you are using for?


Forum|alt.badge.img+2
  • Author
  • Level 2 ●●
  • 6 replies
  • June 18, 2023

What is this API you are using for?

 

this is the API docomantion:

https://docs.servicenow.com/bundle/rome-application-development/page/integrate/inbound-rest/concept/case-api.html

 

i don’t see any thing regarding to key


Appzk
QPN Level 5 ●●●●●
Forum|alt.badge.img+34
  • QPN Level 5 ●●●●●
  • 276 replies
  • June 19, 2023

Your API seems to be an service now API. So while configuring Qualtrics API token will not help you. Authorization of your Service Now API needs to be setup.

 

All so if this helps: ServiceNow Task (qualtrics.com)


Forum|alt.badge.img+2
  • Author
  • Level 2 ●●
  • 6 replies
  • June 20, 2023

Your API seems to be an service now API. So while configuring Qualtrics API token will not help you. Authorization of your Service Now API needs to be setup.

 

All so if this helps: ServiceNow Task (qualtrics.com)

I have a service now task before the web service:

is this event extract data from Service Now?


Appzk
QPN Level 5 ●●●●●
Forum|alt.badge.img+34
  • QPN Level 5 ●●●●●
  • 276 replies
  • June 21, 2023

this servicenow api is to update or insert within service now.

from you description , I understood you needed to update some data i service now so using the existing task in qualtrics can help you do so.

 

Let me know if I am missing something.


Forum|alt.badge.img+2
  • Author
  • Level 2 ●●
  • 6 replies
  • June 21, 2023

this servicenow api is to update or insert within service now.

from you description , I understood you needed to update some data i service now so using the existing task in qualtrics can help you do so.

 

Let me know if I am missing something.

 

When a case in service now closed i would like to save the case details in Qualtrics in the data set i created for it.I set the service now event with the relevant conditions and then created the web service which still get the error i mention above.

Where should i find the primary key?did i config the webservice right? 

 


Appzk
QPN Level 5 ●●●●●
Forum|alt.badge.img+34
  • QPN Level 5 ●●●●●
  • 276 replies
  • June 21, 2023

By setting up this event ServiceNow Event (qualtrics.com), whenever a ticket is closed in servicenow ; this workflow will be executed and after that if you wish to add these details in survey then use create response api within webservice and store all info in Qualtrics.


Forum|alt.badge.img+2
  • Author
  • Level 2 ●●
  • 6 replies
  • August 7, 2023

By setting up this event ServiceNow Event (qualtrics.com), whenever a ticket is closed in servicenow ; this workflow will be executed and after that if you wish to add these details in survey then use create response api within webservice and store all info in Qualtrics.

 

 

That’s what i’ve done - i want to store specific fields form Service Now case to a data set:

 

I get this error: