LeadtoCashCore - 범위 지정

  • 릴리스 버전: Washingtondc
  • 업데이트 날짜 2024년 02월 01일
  • 읽기27분
  • Lead to Cash 핵심 수명주기에서 워크플로우를 생성합니다.

    LeadtoCashCore API는 Lead to Cash 워크플로우를 생성할 수 있는 4개의 API 세트로 구성됩니다. 인스턴스에서 LeadtoCashCore API를 사용하려면 Lead to Cash Core(com.snd.l2c.core) 플러그인을 활성화해야 합니다. 이러한 API는 sn_l2c_core 네임스페이스에 속합니다.

    Lead to Cash 워크플로우를 완료하려면 한 API에서 다음 API로 반환 매개변수를 전달해야 합니다. 일반적으로 다음 순서로 API를 호출합니다.

    1. Createinstance
    2. Delta
    3. 효과
    4. 커밋인스턴스

    PrimitiveUtil 확장점은 확장점 서비스를 가져오고 사용 가능한 매개 변수를 사용하여 각 API를 호출하는 메서드를 제공합니다.

    Lead to Cash Core 제품에 대한 자세한 내용은 을 참조하십시오.

    LeadToCashCore - getPrimitivesEPService(문자열 테이블)

    PrimitivUtil 확장점을 호출합니다.

    표 1. 매개변수
    이름 유형 설명
    테이블 문자열 테이블 이름입니다.
    표 2. 반환
    유형 설명
    없음

    다음 예제에서는 PrimitiveUtil() 확장점을 호출하고 L2C 플로우의 sourceToTargetConfigID, sn_l2c_core_entity_mapping 테이블의 매핑 구성 ID를 기반으로 구현을 선택합니다.

    //Utility to invoke createInstance API 
    var util = new sn_l2c_core.PrimitiveUtil();  
     
    //Invoke extension point, picks an implementation based on sourceToTargetConfigID of a L2C flow, the Mapping Config ID in “sn_l2c_core_entity_mapping” table. 
    var service = util.getPrimitivesEPService('sn_l2c_cust_flows_sp_to_order’)

    LeadtoCashCore - createInstance(targetJSON 객체, additionalParams 객체)

    헤더, 라인, 하위 라인, 특성 및 해당 속성과 같은 다양한 상세 정보를 포함하는 JSON 객체로 지정된 잠재 고객의 데이터를 현금 엔터티로 반환합니다.

    표 3. 매개변수
    이름 유형 설명
    headerID 문자열 필수 요청에서 lineID를 사용하지 않는 경우 headerID를 사용합니다. 엔터티의 헤더 sys_id입니다. 예를 들어 주문 헤더 sys_id, 견적 헤더 sys_id 등이 있습니다.

    headerID 또는 lineID는 필수입니다.

    라인ID 문자열 필수 요청에서 headerID를 사용하지 않는 경우 lineID를 사용합니다. 엔터티의 라인 항목 sys_id입니다. 예를 들어 주문 헤더 sys_id, 견적 라인 sys_id, 판매된 제품 sys_id 등이 있습니다.
    이스타깃 부울 옵션입니다. 대상 엔터티의 데이터를 가져올지 여부를 결정하는 플래그입니다.
    유효한 값은 다음과 같습니다.
    • true: 대상 개체의 데이터를 가져옵니다.
    • false: 대상 개체의 데이터를 가져오지 않습니다.

    기본값: false

    additionalParams 객체 옵션입니다. 사용할 추가 매개 변수를 지정합니다.
    { 
    “skipLines”:”boolean” 
    } 
    additionalParams.skipLines 부울

    옵션입니다. 엔터티의 라인 항목을 가져올지 여부를 나타내는 플래그입니다.

    유효한 값은 다음과 같습니다.
    • true: 엔터티의 라인 항목을 가져옵니다.
    • false: 엔터티의 라인 항목을 가져오지 않습니다.

    기본값: false

    표 4. 반환
    유형 설명
    JSON 객체 엔터티 기록의 상세 정보를 포함하는 JSON입니다.
    { 
      "table": "string", 
      "sys_id": { 
        "value": "string" 
      }, 
      "attributes": { 
        "contact": { 
          "value": "string" 
        }, 
        "account": { 
          "value": "string" 
        } 
      }, 
      "lineItems": [ 
        { 
          "table": "string", 
          "sys_id": { 
            "value": "string" 
          }, 
          "attributes": { 
            "name": { 
              "value": "string" 
            }, 
            "account": { 
              "value": "string" 
            } 
          }, 
          "lineItems": [ 
            { 
              "table": "string", 
              "sys_id": { 
                "value": "string" 
              }, 
              "attributes": {}, 
              "lineItems": [], 
              "characteristics": [] 
            } 
          ], 
          "characteristics": [ 
            { 
              "table": "string", 
              "sys_id": { 
                "value": "string" 
              }, 
              "attributes": { 
                "sys_id": { 
                  "value": "string" 
                }, 
                "characteristic_value": { 
                  "value": "" 
                }, 
                "characteristic": { 
                  "value": "string" 
                }, 
                "characteristic_option": { 
                  "value": "string" 
                }, 
                "sold_product": { 
                  "value": "string" 
                } 
              } 
            } 
          ] 
        } 
      ] 
    } 

    데이터 유형: 객체

    테이블 현금으로 이어지는 엔터티의 헤더 기록 테이블 이름입니다.

    데이터 유형: 문자열

    sys_id 헤더 기록의 Sys_id입니다.
    "sys_id": { 
                "value": "string" 
              }

    데이터 유형: 객체

    sys_id.가치 헤더 기록의 sys_id 값입니다.

    데이터 유형: 문자열

    속성 헤더 기록의 속성입니다.
    "attributes": { 
            "name": { 
              "value": "string" 
            }

    데이터 유형: 객체

    attributes.<field_name> 헤더 기록의 속성입니다. 예를 들어, 계정 또는 연락처 등이 있습니다. 엔터티의 다양한 필드를 포함할 수 있습니다.
    
          "attributes": { 
            "name": { 
              "value": "string" 
            }

    데이터 유형: 객체

    속성.<field_name>.값 엔터티의 헤더 기록에 속하는 속성의 값입니다.

    데이터 유형: 문자열

    라인 항목 엔터티의 라인 항목입니다. 예를 들어 주문 라인 항목, 견적 라인 항목 등이 있습니다.
    "lineItems": [ 
        { 
          "table": "string", 
          "sys_id": { 
            "value": "string" 
          }, 
          "attributes": { 
            "name": { 
              "value": "string" 
            }, 
            "account": { 
              "value": "string" 
            } 
          }

    데이터 유형: 배열

    LineItems.table 현금으로 이어지는 엔터티의 라인 항목 테이블 이름입니다.

    데이터 유형: 문자열

    lineItems.sys_id 라인 항목 기록의 Sys_id입니다.
    "sys_id": { 
                "value": "string" 
              }, 

    데이터 유형: 객체

    lineItems.sys_id.값 라인 항목 기록의 sys_id 값입니다.

    데이터 유형: 문자열

    LineItems.attributes 라인 항목 기록의 속성입니다.
    "attributes": { 
            "name": { 
              "value": "string" 
            }
    }

    데이터 유형: 객체

    LineItems.attributes.<field_name> 라인 항목 기록의 속성입니다. 예를 들어, 계정 또는 연락처 등이 있습니다. 엔터티에 따라 다양한 필드를 포함할 수 있습니다.
    "name": { 
              "value": "string" 
            }

    데이터 유형: 객체

    LineItems.attributes.<field_name>.value 엔터티의 헤더 기록에 속하는 속성의 값입니다.

    데이터 유형: 문자열

    LineItems.LineItems 상위 라인 항목의 하위 라인 항목입니다.
    "lineItems": [ 
        { 
          "table": "sn_install_base_sold_product", 
          "sys_id": { 
            "value": "4e03cda2ec873110f87727ef5883a2cf" 
          }, 
          "attributes": { 
            "name": { 
              "value": "Quadplay Home Tech Hub Bundle" 
            }, 
            "account": { 
              "value": "9e2fd2ee11b43110f877366201dea674" 
            } 
          }
    ]

    데이터 유형: 객체

    LineItems.characteristics 라인 항목의 특성입니다.
    "characteristics": [ 
            { 
              "table": "string", 
              "sys_id": { 
                "value": "string" 
              }, 
              "attributes": { 
                "sys_id": { 
                  "value": "string" 
                }, 
                "characteristic_value": { 
                  "value": "" 
                }, 
                "characteristic": { 
                  "value": "string" 
                }, 
                "characteristic_option": { 
                  "value": "string" 
                }, 
                "sold_product": { 
                  "value": "string" 
                } 
              } 
            } 
          ] 
        } 
      ] 

    데이터 유형: 배열

    characteristics.table 현금으로 이어지는 엔터티의 특성 기록의 테이블 이름입니다.

    데이터 유형: 문자열

    characteristics.sys_id 특성 기록의 Sys_id입니다.
    "sys_id": { 
                "value": "string" 
              }

    데이터 유형: 객체

    characteristics.sys_id.값 특성 기록의 sys_id 값입니다.

    데이터 유형: 문자열

    characteristics.attributes 특성 기록의 속성입니다.
    "attributes": { 
                "sys_id": { 
                  "value": "string" 
                }

    데이터 유형: 객체

    characteristics.attributes.<field_name> 특성 기록의 속성입니다. 예를 들면 이름 또는 특성 값 등입니다. 엔터티에 따라 다양한 특성을 포함할 수 있습니다.
    { 
                  "value": "string" 
                }

    데이터 유형: 객체

    characteristics.attributes.<field_name>.value 엔터티의 특성 기록에 속하는 속성의 값입니다.

    데이터 유형: 문자열

    아래 예시 스크립트는 createInstance API를 호출하여 판매된 제품의 데이터(전체 계층 구조 및 특성)를 로드합니다.

    //Utility to invoke createInstance API 
    var util = new sn_l2c_core.PrimitiveUtil();  
     
    //Invoke extension point, picks an implementation based on sourceToTargetConfigID of a L2C flow, the Mapping Config ID  in “sn_l2c_core_entity_mapping” table. 
    var service = util.getPrimitivesEPService('sn_l2c_cust_flows_sp_to_order’); 
     
    //Invoke createInstance API with required params 
    var SPInstance = service.createInstance(null, '4e03cda2ec873110f87727ef5883a2cf'); 
     
    //Print the returned JSON 
    gs.info("SPInstance: "+JSON.stringify(SPInstance));  
     
    //The returned JSON can be used for subsequent APIs of the flow such as Delta, Effect and Commit Instance

    출력:

    { 
      "lineItems": [ 
        { 
          "table": "sn_install_base_sold_product", 
          "sys_id": { 
            "value": "4e03cda2ec873110f87727ef5883a2cf" 
          }, 
          "attributes": { 
            "name": { 
              "value": "Quadplay Home Tech Hub Bundle" 
            }, 
            "account": { 
              "value": "9e2fd2ee11b43110f877366201dea674" 
            } 
          }, 
          "lineItems": [ 
            { 
              "table": "sn_install_base_sold_product", 
              "sys_id": { 
                "value": "9e0301e2ec873110f87727ef5883a23a" 
              }, 
              "attributes": { 
                "name": { 
                  "value": "Internet and OTT Bundle" 
                }, 
                "account": { 
                  "value": "9e2fd2ee11b43110f877366201dea674" 
                } 
              }, 
              "lineItems": [ 
              ], 
              "characteristics": [] 
            } 
          ], 
          "characteristics": [ 
            { 
              "table": "sn_prd_pm_product_characteristics", 
              "sys_id": { 
                "value": "8d669b6665ebf110f877d71ec56bf75c" 
              }, 
              "attributes": { 
                "sys_id": { 
                  "value": "8d669b6665ebf110f877d71ec56bf75c" 
                }, 
                "characteristic_value": { 
                  "value": "" 
                }, 
                "characteristic": { 
                  "value": "4f31999fd0a63110f8770dbf976be178" 
                }, 
                "characteristic_option": { 
                  "value": "4f31999fd0a63110f8770dbf976be179" 
                }, 
                "sold_product": { 
                  "value": "4e03cda2ec873110f87727ef5883a2cf" 
                } 
              } 
            } 
          ] 
        } 
      ] 
    } 

    LeadtoCashCore - delta(sourceJSON 객체, dirtyJSON 객체, additionalParams 객체)

    현금으로 이어지는 엔터티의 두 JSON, sourceJSON과 dirtyJSON을 비교하고 sourceJSON과 dirtyJSON 모두의 상세 정보가 포함된 JSON을 반환합니다.

    표 5. 매개변수
    이름 유형 설명
    소스JSON 객체 현금 엔터티에 대한 리드의 소스 JSON입니다.
    더티JSONS 객체 현금 엔터티에 대한 리드의 수정된 소스 JSON입니다.
    additionalParams 객체
    표 6. 반환
    유형 설명
    JSON 객체 엔터티 기록의 상세 정보를 포함하는 JSON입니다.
    { 
      "table": "string", 
      "sys_id": { 
        "value": "string" 
      }, 
      "attributes": { 
        "contact": { 
          "value": "string" 
        }, 
        "account": { 
          "value": "string" 
        } 
      }, 
      "lineItems": [ 
        { 
          "table": "string", 
          "sys_id": { 
            "value": "string" 
          }, 
          "attributes": { 
            "name": { 
              "value": "string" 
            }, 
            "account": { 
              "value": "string" 
            } 
          }, 
          "lineItems": [ 
            { 
              "table": "string", 
              "sys_id": { 
                "value": "string" 
              }, 
              "attributes": {}, 
              "lineItems": [], 
              "characteristics": [] 
            } 
          ], 
          "characteristics": [ 
            { 
              "table": "string", 
              "sys_id": { 
                "value": "string" 
              }, 
              "attributes": { 
                "sys_id": { 
                  "value": "string" 
                }, 
                "characteristic_value": { 
                  "value": "" 
                }, 
                "characteristic": { 
                  "value": "string" 
                }, 
                "characteristic_option": { 
                  "value": "string" 
                }, 
                "sold_product": { 
                  "value": "string" 
                } 
              } 
            } 
          ] 
        } 
      ] 
    } 

    데이터 유형: 객체

    테이블 현금으로 이어지는 엔터티의 헤더 기록 테이블 이름입니다.

    데이터 유형: 문자열

    sys_id 헤더 기록의 Sys_id입니다.
    "sys_id": { 
                "value": "string" 
              }

    데이터 유형: 객체

    sys_id.가치 헤더 기록의 sys_id 값입니다.

    데이터 유형: 문자열

    속성 헤더 기록의 속성입니다.
    "attributes": { 
            "name": { 
              "value": "string" 
            }

    데이터 유형: 객체

    attributes.<field_name> 헤더 기록의 속성입니다. 예를 들어, 계정 또는 연락처 등이 있습니다. 엔터티의 다양한 필드를 포함할 수 있습니다.
    
          "attributes": { 
            "name": { 
              "value": "string" 
            }

    데이터 유형: 객체

    속성.<field_name>.값 엔터티의 헤더 기록에 속하는 속성의 값입니다.

    데이터 유형: 문자열

    라인 항목 엔터티의 라인 항목입니다. 예를 들어 주문 라인 항목, 견적 라인 항목 등이 있습니다.
    "lineItems": [ 
        { 
          "table": "string", 
          "sys_id": { 
            "value": "string" 
          }, 
          "attributes": { 
            "name": { 
              "value": "string" 
            }, 
            "account": { 
              "value": "string" 
            } 
          }

    데이터 유형: 배열

    LineItems.table 현금으로 이어지는 엔터티의 라인 항목 테이블 이름입니다.

    데이터 유형: 문자열

    lineItems.sys_id 라인 항목 기록의 Sys_id입니다.
    "sys_id": { 
                "value": "string" 
              }, 

    데이터 유형: 객체

    lineItems.sys_id.값 라인 항목 기록의 sys_id 값입니다.

    데이터 유형: 문자열

    LineItems.attributes 라인 항목 기록의 속성입니다.
    "attributes": { 
            "name": { 
              "value": "string" 
            }
    }

    데이터 유형: 객체

    LineItems.attributes.<field_name> 라인 항목 기록의 속성입니다. 예를 들어, 계정 또는 연락처 등이 있습니다. 엔터티에 따라 다양한 필드를 포함할 수 있습니다.
    "name": { 
              "value": "string" 
            }

    데이터 유형: 객체

    LineItems.attributes.<field_name>.value 엔터티의 헤더 기록에 속하는 속성의 값입니다.

    데이터 유형: 문자열

    LineItems.LineItems 상위 라인 항목의 하위 라인 항목입니다.
    "lineItems": [ 
        { 
          "table": "sn_install_base_sold_product", 
          "sys_id": { 
            "value": "4e03cda2ec873110f87727ef5883a2cf" 
          }, 
          "attributes": { 
            "name": { 
              "value": "Quadplay Home Tech Hub Bundle" 
            }, 
            "account": { 
              "value": "9e2fd2ee11b43110f877366201dea674" 
            } 
          }
    ]

    데이터 유형: 객체

    LineItems.characteristics 라인 항목의 특성입니다.
    "characteristics": [ 
            { 
              "table": "string", 
              "sys_id": { 
                "value": "string" 
              }, 
              "attributes": { 
                "sys_id": { 
                  "value": "string" 
                }, 
                "characteristic_value": { 
                  "value": "" 
                }, 
                "characteristic": { 
                  "value": "string" 
                }, 
                "characteristic_option": { 
                  "value": "string" 
                }, 
                "sold_product": { 
                  "value": "string" 
                } 
              } 
            } 
          ] 
        } 
      ] 

    데이터 유형: 배열

    characteristics.table 현금으로 이어지는 엔터티의 특성 기록의 테이블 이름입니다.

    데이터 유형: 문자열

    characteristics.sys_id 특성 기록의 Sys_id입니다.
    "sys_id": { 
                "value": "string" 
              }

    데이터 유형: 객체

    characteristics.sys_id.값 특성 기록의 sys_id 값입니다.

    데이터 유형: 문자열

    characteristics.attributes 특성 기록의 속성입니다.
    "attributes": { 
                "sys_id": { 
                  "value": "string" 
                }

    데이터 유형: 객체

    characteristics.attributes.<field_name> 특성 기록의 속성입니다. 예를 들면 이름 또는 특성 값 등입니다. 엔터티에 따라 다양한 특성을 포함할 수 있습니다.
    { 
                  "value": "string" 
                }

    데이터 유형: 객체

    characteristics.attributes.<field_name>.value 엔터티의 특성 기록에 속하는 속성의 값입니다.

    데이터 유형: 문자열

    //Utility to invoke Delta API 
    var util = new sn_l2c_core.PrimitiveUtil();  
     
    //Invoke extension point, picks an implementation based on sourceToTargetConfigID of a L2C flow, the Mapping Config ID  in “sn_l2c_core_entity_mapping” table. 
    var service = util.getPrimitivesEPService('sp_order_macd'); 
     
    //Invoke delta API with required params 
    // sourceJSON can be the output of createInstance or null 
    //dirtyJSON is the modified sourceJSON 
    var deltaOutput= service.delta(sourceJSON, dirtyJSON);  
     
    //Print the returned JSON 
    gs.info(" deltaOutput: "+JSON.stringify(deltaOutput));  
     
    //The returned JSON can be used for subsequent APIs of the flow such as Effect and Commit Instance

    출력:

    { 
      "lineItems": [ 
        { 
          "table": "sn_install_base_sold_product", 
          "sys_id": { 
            "value": "-1" 
          }, 
          "attributes": { 
            "name": { 
              "value": "Quadplay Home Tech Hub Bundle" 
            }, 
            "account": { 
              "value": "9e2fd2ee11b43110f877366201dea674" 
            } 
          }, 
          "lineItems": [ 
            { 
              "table": "sn_install_base_sold_product", 
              "sys_id": { 
                "value": "-1" 
              }, 
              "attributes": { 
                "name": { 
                  "value": "Internet and OTT Bundle" 
                }, 
                "account": { 
                  "value": "9e2fd2ee11b43110f877366201dea674" 
                } 
              }, 
              "lineItems": [ 
                { 
                  "table": "sn_install_base_sold_product", 
                  "sys_id": { 
                    "value": "-1" 
                  }, 
                  "attributes": { 
                    "name": { 
                      "value": "Solana Sports streaming channel" 
                    }, 
                    "account": { 
                      "value": "9e2fd2ee11b43110f877366201dea674" 
                    } 
                  }, 
                  "lineItems": [], 
                  "characteristics": [], 
                  "_action": "add" 
                } 
              ], 
              "characteristics": [], 
              "_action": "add" 
            } 
          ], 
          "characteristics": [ 
            { 
              "table": "sn_prd_pm_product_characteristics", 
              "sys_id": { 
                "value": "-1" 
              }, 
              "attributes": { 
                "characteristic_value": { 
                  "value": "" 
                }, 
                "characteristic": { 
                  "value": "4f31999fd0a63110f8770dbf976be178" 
                }, 
                "characteristic_option": { 
                  "value": "4f31999fd0a63110f8770dbf976be179" 
                }, 
                "sold_product": { 
                  "value": "4e03cda2ec873110f87727ef5883a2cf" 
                }, 
                "action": { 
                  "value": "add" 
                } 
              }, 
              "_action": "add" 
            } 
          ], 
          "_action": "add" 
        } 
      ] 
    } 

    LeadtoCashCore - effect(sourceJSON 객체, targetJSON 객체, additionalParams 객체)

    지정된 현금에 대한 리드 엔터티의 sourceJSON을 다른 현금 엔터티에 대한 다른 잠재 고객의 targetJSON에 변환하고 적용합니다. 반환된 JSON은 현금 엔터티에 대한 리드 데이터베이스에 커밋될 수 있습니다.

    표 7. 매개변수
    이름 유형 설명
    소스JSON 객체 소스 엔터티의 상세 정보가 포함된 JSON.
    targetJSON 객체 대상 엔터티의 상세 정보가 포함된 JSON.
    additionalParams 객체
    표 8. 반환
    유형 설명
    JSON 객체 현금 엔터티에 대한 리드의 각 개체, 헤더/라인/하위 라인/특성에 'glide_action'을 포함하는 JSON입니다.

    //Utility to invoke effect API 
    var util = new sn_l2c_core.PrimitiveUtil();  
     
    //Invoke extension point, picks an implementation based on sourceToTargetConfigID of a L2C flow, the Mapping Config ID  in “sn_l2c_core_entity_mapping” table. 
    var service = util.getPrimitivesEPService('sp_order_macd'); 
     
    //Invoke effect API with required params 
    var effectOutput = service.effect(deltaOutput, null); 
     
    //Print the returned JSON 
    gs.info("effectOutput: " + JSON.stringify(effectOutput)); 
     
    //The returned JSON can be used for subsequent APIs of the flow ‘Commit Instance’. 

    출력:

    { 
      "sys_id": "-1", 
      "table": "sn_ind_tmt_orm_order", 
      "_glide_action": "INSERT", 
      "_source_object": {}, 
      "lineItems": [ 
        { 
          "sys_id": "-1", 
          "table": "sn_ind_tmt_orm_order_line_item", 
          "attributes": { 
            "account": { 
              "value": "9e2fd2ee11b43110f877366201dea674" 
            }, 
            "short_description": { 
              "value": "Quadplay Home Tech Hub Bundle" 
            } 
          }, 
          "_glide_action": "INSERT", 
          "_source_object": { 
            "sys_id": "-1", 
            "table": "sn_install_base_sold_product" 
          }, 
          "lineItems": [ 
            { 
              "sys_id": "-1", 
              "table": "sn_ind_tmt_orm_order_line_item", 
              "attributes": { 
                "account": { 
                  "value": "9e2fd2ee11b43110f877366201dea674" 
                }, 
                "short_description": { 
                  "value": "Internet and OTT Bundle" 
                } 
              }, 
              "_glide_action": "INSERT", 
              "_source_object": { 
                "sys_id": "-1", 
                "table": "sn_install_base_sold_product" 
              }, 
              "lineItems": [ 
                { 
                  "sys_id": "-1", 
                  "table": "sn_ind_tmt_orm_order_line_item", 
                  "attributes": { 
                    "account": { 
                      "value": "9e2fd2ee11b43110f877366201dea674" 
                    }, 
                    "short_description": { 
                      "value": "Solana Sports streaming channel" 
                    } 
                  }, 
                  "_glide_action": "INSERT", 
                  "_source_object": { 
                    "sys_id": "-1", 
                    "table": "sn_install_base_sold_product" 
                  }, 
                  "lineItems": [], 
                  "characteristics": [] 
                } 
              ], 
              "characteristics": [] 
            } 
          ], 
          "characteristics": [ 
            { 
              "sys_id": "-1", 
              "table": "sn_ind_tmt_orm_order_characteristic_value", 
              "attributes": { 
                "characteristic_option": { 
                  "value": "4f31999fd0a63110f8770dbf976be179" 
                }, 
                "characteristic": { 
                  "value": "4f31999fd0a63110f8770dbf976be178" 
                }, 
                "characteristic_option_value": { 
                  "value": "" 
                } 
              }, 
              "_glide_action": "INSERT", 
              "_source_object": { 
                "sys_id": "-1", 
                "table": "sn_prd_pm_product_characteristics" 
              } 
            } 
          ] 
        } 
      ] 
    } 

    LeadtoCashCore - commitInstance(targetJSON 객체, additionalParams 객체)

    현금 엔터티에 대한 지정된 잠재 고객의 JSON을 데이터베이스에 커밋하고 상태 메시지와 업데이트된 정보가 포함된 JSON을 반환합니다.

    표 9. 매개변수
    이름 유형 설명
    targetJSON 객체 대상 엔터티의 "glide_action"가 있는 JSON입니다. 효과 API의 출력은 여기에 전달될 수 있습니다.
    additionalParams 객체
    표 10. 반환
    유형 설명
    JSON 객체 대상 엔터티 기록에 대한 상세 정보를 포함하는 JSON입니다.
    { 
      "status": "string", 
      "error": "string", 
      "headerID": "string", 
      "rootLineIDs": [ 
        "string" 
      ] 
    }

    데이터 유형: 객체

    상태 commitInstance API의 값이 "성공/실패"인 상태 메시지입니다.

    데이터 유형: 문자열

    오류 commitInstance API 실패에 대한 오류 메시지입니다.

    데이터 유형: 문자열

    headerID commitInstance API로 생성되거나 업데이트된 대상 엔터티 기록의 헤더 ID입니다.

    데이터 유형: 문자열

    rootLineIDs commitInstance API를 사용하여 삽입, 업데이트 또는 삭제된 대상 엔터티 기록의 루트 라인 ID입니다.

    데이터 유형: 문자열 배열

    //Utility to invoke commitInstance API 
    var util = new sn_l2c_core.PrimitiveUtil();  
     
    //Invoke extension point, picks an implementation based on sourceToTargetConfigID of a L2C flow, the Mapping Config ID  in “sn_l2c_core_entity_mapping” table. 
    var service = util.getPrimitivesEPService('sp_order_macd'); 
     
    //Invoke commitInstance API with the required params 
    var commitOutput = service.commitInstance(effectOutput); 
     
    //Print the returned JSON 
    gs.info("commitOutput: "+JSON.stringify(commitOutput));  
    //The returned JSON can be used for subsequent operations.

    출력:

    { 
      "status": "success", 
      "error": "", 
      "headerID": "cc9b3db665e73510f877d71ec56bf7ed", 
      "rootLineIDs": [ 
        "0c9b3db665e73510f877d71ec56bf7f1" 
      ] 
    }