Order Now API

Brian Lancaster
Tera Sage

I'm trying to test the catalog API Order Now using SOAP UI. According to the link I provided it should return to me the request number. However it is returning the sys_id of a shopping cart. What am I missing? Below is the json body I am sending. All fields in this request are single line text.

{
  sysparm_quantity: 1,
  variables: {
    first_name: 'John',
    middle_name: '',
    last_name: 'smith',
    employee_id: 'test',
    employee_type: 'test',
    employee_manager: 'test',
    department: 'test',
    start_date: 'test',
    end_date: 'test',
    managment_level: 'test',
    work_location: 'test',
    work_hours: 'test'
  }
}
1 ACCEPTED SOLUTION

Hi,

I believe two-step may cause some issues. You could try on PDI, for example, disabling it to see if that helps.

You can also review the code for it at:

1. Please change the current application scope to "Service Catalog REST API" (the same scope where the OOB order_now scripted API is present)
2. Type "Scripted REST APIs" in the filter navigator and select the "Scripted REST APIs" under the "System Web Services"
3. Open the record with the name "Service Catalog API"
4. Under the "Resources" section (at the bottom), Open the record with the name "Buy Item" in a separate tab for reference.
 
Do you see any edits or anything within that would cause this behavior?

Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

View solution in original post

13 REPLIES 13

Do you have two-step checkout enabled or anything like that which could intercept the order and not allow it to complete?

 


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

We do have two-step does this not work with two-step?

Hi,

I believe two-step may cause some issues. You could try on PDI, for example, disabling it to see if that helps.

You can also review the code for it at:

1. Please change the current application scope to "Service Catalog REST API" (the same scope where the OOB order_now scripted API is present)
2. Type "Scripted REST APIs" in the filter navigator and select the "Scripted REST APIs" under the "System Web Services"
3. Open the record with the name "Service Catalog API"
4. Under the "Resources" section (at the bottom), Open the record with the name "Buy Item" in a separate tab for reference.
 
Do you see any edits or anything within that would cause this behavior?

Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

This record does not appear to have ever been modified from the out of the box version. I will try testing in a PDI.

Brian Lancaster
Tera Sage

Looks like it is the two-step checkout. If I have that turned off in my PDI it works as expected. As soon as I turn it on I get the same results where it add it to the cart. I wonder if there is a way around this.