Connect API

Last published on: November 10th, 2022

We've made some updates to our Connect API Endpoints. Please review the following information before going further!

 

Using "connect.openmethods.com" in PopFlow❓

Yes

 

No

 

I Don't Know

 
 

 

You are accessing a legacy URL.

Please follow the advice/steps below.

 

 

1. Please update and remove any reference of: 

connect.openmethods.com

and replace with the following URL:

connect.openmethodscloud.com

 

2. These updates should be made to any/all PopFlow's which reference the legacy URL.

 

3. ⚠️ Requirement: Re-Generate a new API Token:

Login To Experience Cloud
Expand Navigation Menu and Click "System Settings" 
  • Select "API Key" from Menu
  • Click "Re-generate"
  • Copy New Key
  • Update any references of the old key with newly re-generated key.
 

 

🎉 Congrats!

 

You are using the latest URL and API Endpoint. Please continue!

 

 

Warning: Please Verify URL

Please investigate your current PopFlows for the following:

 

 

Look for and remove any reference of the following URL

Note: The URL could be used in multiple areas of your PopFlows. If you need further assistance and help, please contact support.

connect.openmethods.com

and replace with the following URL:

connect.openmethodscloud.com

 

If you are using the URL "connect.openmethods.com" please go back and answer "Yes" to this question.

 
 

 

 

 

The OM Connect API is used for notifying connected clients with real-time events. The API messages POST and GET payloads to the Messaging Server to invoke PopFlow Events.

 

URL


 

CRM connection

If you want to send an OM Connect event to an agent that is NOT logged into the CTI platform and you have the CRM ID, then use the following URL

https://connect.openmethodscloud.com/api/sendmessage/CRM
 

CTI connection

If you want to send an OM Connect event to a logged in CTI agent, then use the following URL

https://connect.openmethodscloud.com/api/sendmessage/CTI

 

If you want to send an OM Connect event to a logged-in CTI agent and you are invoking this by opening a browser window. and the browser has to be closed automatically.

https://connect.openmethodscloud.com/api/sendmessage/bc/CTI

 

  • Both Get and Post methods are supported.
  • For successful results, the browser will be closed in 100 milliseconds.

 

Response message:

<body> Result:OK <br>This Browser will close in a second... </body>
<script type='text/javascript'>
setTimeout(function(){window.open('','_parent',''); window.close(); }, 100);
</script>

 

For failure results, the error message will be displayed in the browser for 2 seconds and the browser will be closed.

 

Response message:

<body> Error Message : <b></b> : IDX12729: Unable to decode the header '[PII is hidden]' as Base64Url encoded string.
jwtEncodedString: '[PII is hidden]'. <br>This Browser will close in 2 seconds... </body>
<script type='text/javascript'>
setTimeout(function(){window.open('','_parent',''); window.close(); }, 2000);
</script>
 

 

Authentication


You will need a few pieces of information in order to authenticate:

  • JWT Key
  • CRM ID
  • Event Name

 

JWT Key

To get the key, log in to your app manager. 

https://your-company-name.openmethodscloud.com

On the dashboard, look for the API Key section.

 

CRM ID

In Service Cloud or Fusion, the CRM ID is the domain:

 

Event Name

In order to trigger the published PopFlow, we must get the event it belongs to. 

  1. Login to Popflow and navigate to the Instance
  2. Find the event of the published PopFlow and copy the name exactly (case and length sensitive).

 

Parameters


 

CRM

Parameter Description Data Type Required?
agentId CRM's login user name. This is case sensitive. String Y
jwt JWT API key that gives access to the service. String Y
crmId CRM instance name String Y
event Event where the published PopFlow to be executed exists. This is case sensitive and must match the event name exactly. String Y
Optional parameters Any additional properties that will be viewed as interaction data. String N

 

 

CTI

Parameter Description Data Type Required?
agentId CTI login user name. This is case sensitive. String Y
jwt JWT API key that gives access to the service. String Y
event This is the event where the published Popflow to be executed exists. This is case-sensitive and must match the event name exactly. String Y
Optional Any additional properties that will be viewed as interaction data. String Y

 

 

 

Sample request


GET

Set up the base URL:

https://connect.openmethodscloud.com/api/sendmessage/CRM?

 

Add each required query parameter

agentid={insert_agentId}&jwt={insert_api_key}&crmId={insert_crmid}&event={name_of_event}

 

Add any additional data need for PopFlow workflow.

&prop1={insert_prop1}&prop2={insert_prop2}

 

All together will look like this:

https://connect.openmethodscloud.com/api/sendmessage/CRM?agentId={insert_agentId}&jwt={insert_api_key}&crmId={insert_crmid}&event={name_of_event}&prop1={insert_prop1}&prop2={insert_prop2}
 

POST

Set up the base URL:

https://connect.openmethodscloud.com/api/sendmessage/CRM?

 

  • Then set up the body, making sure that the Content-Type is set to application/json.
  • Finally, add the required body fields and the additional data need for Popflow workflow.

 

{
    "agentid": "insert_agentId",
    "jwt": "insert_api_key",
    "crmid": "insert_crmid",
    "event": "insert_event_name",
    "insert_prop_1": "insert_prop_1_value",
    "insert_prop_2": "insert_prop_2_value",
    "insert_prop_3": "insert_prop_3_value",
}
 

 

Errors


Error Code Description Resolution
401 Unauthorized Response Verify you have the correct API Key.

 

Event not triggered?

  1. Ensure the event name is typed correctly, both case and length (spaces included).
  2. Double-check that the intended Popflow to be triggered is published to the event that is being called.
  3. Finally, if in Service Cloud CRM, ensure that the published profile is matching to CRM user's profile.