---
sourceDocument: Xanadu API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# OrderGuide - Scoped

# OrderGuide - Scoped {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 2 minutes to read

The OrderGuide API enables you to initialize and view order guide
details.

To use this class in a scoped application, use the `sn_sc` namespace
identifier. The Service Catalog Scoped API plugin (com.glideapp.servicecatalog.scoped.api)
that is enabled by default is required to access the OrderGuide API.

## OrderGuide - OrderGuide(String sys_id) {#ariaid-title2}

Creates an instance of the OrderGuide class with the specified sys_id.
{#OG-OrderGuide_S__table_bbt_ccc_5bb__entry__3}

| Name | Type | Description |
|-|-|-|
| sys_id | String | sys_id of the OrderGuide. |
[Table 1. Parameters]

{#OG-OrderGuide_S__table_bbt_ccc_5bb}  
Example:

    var cart=new sn_sc.OrderGuide("6690750f4f7b4200086eeed18110c761");

## OrderGuide - getID() {#ariaid-title3}

Returns the sys_id of the order guide.
{#OG-getID__table_o2r_tyz_sbb__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 2. Parameters]

{#OG-getID__table_o2r_tyz_sbb} {#OG-getID__table_p2r_tyz_sbb__entry__2}

| Type | Description |
|-|-|
| String | sys_id of the order guide. |
[Table 3. Returns]

{#OG-getID__table_p2r_tyz_sbb}  
Example:

    var cart=new sn_sc.OrderGuide("6690750f4f7b4200086eeed18110c761");	
    	console.log(cart.getID());

Output:

    6690750f4f7b4200086eeed18110c761

## OrderGuide - init(Map request) {#ariaid-title4}

Initialises the order guide with the specified catalog items and the variables, and
returns the order guide.
{#OG-init_M__table_ym2_4zz_sbb__entry__3}

| Name | Type | Description |
|-|-|-|
| request | Map | A JSON object with the Catalog item and variable details. |
[Table 4. Parameters]

{#OG-init_M__table_ym2_4zz_sbb} {#OG-init_M__table_zm2_4zz_sbb__entry__2}

| Type | Description |
|-|-|
| Map | A JSON object with the initialised order guide details. |
[Table 5. Returns]

{#OG-init_M__table_zm2_4zz_sbb}  
Example:

    var guide = new sn_sc.OrderGuide('6690750f4f7b4200086eeed18110c761');
     
    var map = {};
    map.variables = {};
    //map.sysparm_id = '6690750f4f7b4200086eeed18110c761';
    map.variables['IOce433d0f4f7b4200086eeed18110c74d'] = '221f3db5c6112284009f4becd3039cc9'; //Here ce433d0f4f7b4200086eeed18110c74d is the sys_id of the variable and 221f3db5c6112284009f4becd3039cc9 is its value
    var includedItems = guide.init(map)

Output:

    {
    "cascade_variable_map":{
    },
    "items":[
    {
    "order":"-1",
    "quantity":"1",
    "show_quantity":false,
    "sys_id":"a4022d7b87c20300e3010cf888cb0bb2"
    },
    {
    "order":"300",
    "quantity":"1",
    "show_quantity":false,
    "sys_id":"186d917a6fab7980575967ddbb3ee4f2"
    },
    {
    "order":"600",
    "quantity":"1",
    "show_quantity":false,
    "sys_id":"8b3ae7fedc1be1004ece5c08239e522b"
    }
    ],
    "variable_assignments":{
    }
    }

## OrderGuide - isIncludeItems() {#ariaid-title5}

Specifies if the Show Include Toggle (include_items) check box
is selected for the specified order guide.
Note:  
The Show Include Toggle field does not appear on the Order guide form by default. {#OG-isIncludeItems__table_ewn_tsd_sbb__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 6. Parameters]

{#OG-isIncludeItems__table_ewn_tsd_sbb} {#OG-isIncludeItems__table_fwn_tsd_sbb__entry__2}

| Type | Description |
|-|-|
| Boolean | Returns true if the Show Include Toggle check box is selected for the specified order guide. Else, returns false. |
[Table 7. Returns]

{#OG-isIncludeItems__table_fwn_tsd_sbb}  

    var orderGuide=new sn_sc.OrderGuide("6690750f4f7b4200086eeed18110c761");	
    	console.log(orderGuide.isIncludeItems());

Output:

    true

## OrderGuide - isTwoStep() {#ariaid-title6}

Specifies if the two-step checkout is enabled.
{#OG-isTwoStep__table_zjf_3yz_sbb__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 8. Parameters]

{#OG-isTwoStep__table_zjf_3yz_sbb} {#OG-isTwoStep__table_akf_3yz_sbb__entry__2}

| Type | Description |
|-|-|
| Boolean | Returns true if the two-step checkout is enabled. Else returns false. |
[Table 9. Returns]

{#OG-isTwoStep__table_akf_3yz_sbb}  
Example:

    var orderGuide=new sn_sc.OrderGuide("6690750f4f7b4200086eeed18110c761");	
    	console.log(orderGuide.isTwoStep());

Output:

    false

## OrderGuide - isUseCustomCart() {#ariaid-title7}

Specifies if a separate cart (different from that for catalog items) usage is enabled
for a two-step order guide.
{#OG-isUseCustomCart__table_xtd_vsd_sbb__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 10. Parameters]

{#OG-isUseCustomCart__table_xtd_vsd_sbb} {#OG-isUseCustomCart__table_ytd_vsd_sbb__entry__2}

| Type | Description |
|-|-|
| Boolean | Returns true if a separate cart usage is enabled for a two-step order guide. Else, returns false. |
[Table 11. Returns]

{#OG-isUseCustomCart__table_ytd_vsd_sbb}  
Example:

    var orderGuide=new sn_sc.OrderGuide("6690750f4f7b4200086eeed18110c761");	
    	console.log (orderGuide.isUseCustomCart());

Output:

    false

## OrderGuide - navigateFromMap(Map itemDetails) {#ariaid-title8}

Navigates to the catalog items of an order guide.
{#OG-navigateFromMap_M__table_xtm_czz_sbb__entry__3}

| Name | Type | Description |
|-|-|-|
| itemDetails | Map | A JSON object with details of catalog items in the order guide. |
[Table 12. Parameters]

{#OG-navigateFromMap_M__table_xtm_czz_sbb} {#OG-navigateFromMap_M__table_ytm_czz_sbb__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 13. Returns]

{#OG-navigateFromMap_M__table_ytm_czz_sbb}  
Example:

    var orderGuide=new sn_sc.OrderGuide.navigateFromMap(itemdetails);


