Configure Inbound Call Transfers When Using SIP

To illustrate how to configure inbound call transfers that happen via SIP, this topic describes how to accomplish these tasks with Genesys.

Create the Voice Call Record Using the voiceCalls Telephony Integration API

To create the voice call record, use the voiceCalls Telephony Integration API.

For more information about the API, see voiceCalls Telephony Integration API. Set these request parameters as needed.

Request Parameter Description
to The contact center inbound number that the customer dials.
from The customer’s phone number. For Genesys, you can use the data variable Call.Ani.
callcenterApiName The API name of the contact center created in Salesforce and associated with the voice call record.
scrtBaseUrl

The SCRT2 URL for the org.

Format:

<org_domain>.my.salesforce-scrt.com/telephony/v1

Example: mycompany.my.salesforce-scrt.com/telephony/v1

orgId

The 15-digit ID of the Salesforce org.

Format: <Salesforce_org_ID>

Example: 00XXXXX00000QMC

callAttributes

Other attributes to include in the voice call record, where each key-value pair corresponds to a standard or custom field and its values.

Format: {'<field_name>':'<field_value>'}

Example of a Department custom field: {'Department__c':'Support'}

vendorCallKey A unique key that identifies the voice call record within the telephony system. For example, this value is the contact ID in Amazon Connect. To get the call key for Genesys, use the Genesys interaction ID data variable Call.ConversationId.

UUI Header or X-SF X-Headers for a SIP Trunk

When Salesforce receives a SIP invite, it receives the UUI header that contains parameter settings. Set the UUI header with your Salesforce org ID, domain, partner voice call ID, JWT token, and any other required inbound flow parameters. Alternatively, if you have custom SIP headers enabled, include X-headers in the SIP invite to send Salesforce org ID, domain, partner voice call ID, JWT token, and any other required inbound flow parameters. If you send the org ID through the X-SF-Org-Id X-Header, use X-headers for the rest of this information instead of the UUI header.

Specify these parameters in the UUI header or in X-headers. A SIP header can have a maximum of 1,024 characters.

UUI Parameter Description Max Length Alternative X-Header
orgId

Format: <Salesforce org ID>

String. Required if a token isn’t provided. Custom header. The 15-character ID of the Salesforce org.

If you provide a token, orgid is optional. We can derive the orgId from the token.

Example: 00DZ70000000XXX

15 characters X-SF-Org-Id
scrt2Domain

Format: <my_domain>.salesforce-scrt.com

String. Required. Custom header. The unique Salesforce domain in the format. Exclude https://. This value can be different for sandbox and production instances.

Example: mycompanyname.my.salesforce-scrt.com

128 bytes X-SF-Scrt2-Domain
token

String. Required. The encrypted key used for authentication. The runtime authentication requires a JSON Web Token (JWT). The token length can change as we adopt other encryption algorithms. A SIP header can have a maximum of 1,024 characters.

If your telephony provider reuses tokens across multiple calls, to prevent authentication from failing too soon, set the JWT token expiration to the maximum, 24 hours. If the public key or JWT expires before the request is sent, the SIP transfer fails.

When constructing the JSON claims set for the JWT, you can use these parameters:

  • iat—The issued-at time (iat) is the time since the Unix epoch when the JWT token was issued, expressed as the number of seconds since 1970-01-01T0:0:0Z.

  • iss—The issuer is the 15-digit Salesforce org ID where you registered the certificate.

  • sub—The subject must contain the Salesforce Call Center API Name. If you’re a non-Salesforce Voice with Telephony Providers customer, including an Open CTI customer, exclude this sub parameter.

  • exp—The expiration time of the assertion, expressed as the number of seconds since 1970-01-01T0:0:0Z, measured in UTC. The expiration time must be set within 24 hours of issuance.

Sample JSON claim set for a Salesforce Voice with Telephony Providers customer:

{
"iat": 1756767613,
"exp": 1756854000,
"iss": "00DHs00000XXXXX",
"sub": "scv4cc1"
}

Sample JSON claim set for a non-Salesforce Voice with Telephony Providers customer:

{
"iat": 1756767613,
"exp": 1756854000,
"iss": "00DHs00000XXXXX"
}
No max limit X-SF-Token
callId

Format: <voice_call_record_id>

String. Optional. This field is for Salesforce Voice with Telephony Providers customers only. Custom header. The 18-character Salesforce VoiceCall record ID that links the agent-customer conversation with the rep-customer conversation, providing full call history visibility.

18 characters X-SF-Call-Id
transactionId

Format: <unique_id>

String. Optional. Custom header. A unique ID of any length used to provide more context, like customer information, to the Omni-Channel flow. The flow uses this information to route the call or update related records in Salesforce. This parameter is typically used when integrating Agentforce Voice without being a Salesforce Voice with Telephony Providers customer.

Example: order-2026-0122-5489

No max length X-SF-Transaction-Id

Sample UUI header:

{
"orgId": "00XX70000000XXX",
"scrt2Domain": "mycompanyname.my.salesforce-scrt.com",
"token" : "adbcdefgsdfsdJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiIwMERTQjAwMD[THIS IS A SAMPLE TOKEN]5h AwZFBWR2ciLCJzdWIiOiJhc2FzaXBvcmczc2RiMyIsImV4cCI6MTc2OTcxOTcyOSwiaWF0IjoxNzY5NzE2MTI5LCJqdGkiOiI5OGE1YjcyZS1mOTFhLTQzMmItYjUwYy05Nzg[THIS IS A SAMPLE TOKEN]3847ufpawiu4f3hapwu93gbpawiu3hrao283938w4t34t m_HWOZDjb82UObqk_nR_6IhvDB7JA5v3Ov2icmZsR3NgT_uaweiur3h498rh2334984htg34o[THIS IS A SAMPLE TOKEN]3948 4VoFjDsie6N9lAlc0fZgdnT_j89mMl4rFaSNY9m",
"callId": "50130000009xYZ1AAM",
"transactionId": "order-2026-0122-5489"
}

Sample X-headers:

{
"X-SF-Org-Id": "00XX70000000XXX",
"X-SF-Scrt2-Domain": "mycompanyname.my.salesforce-scrt.com",
"X-SF-Token": "adbcdefgsdfsdJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiIwMERTQjAwMD[THIS IS A SAMPLE TOKEN]5h AwZFBWR2ciLCJzdWIiOiJhc2FzaXBvcmczc2RiMyIsImV4cCI6MTc2OTcxOTcyOSwiaWF0IjoxNzY5NzE2MTI5LCJqdGkiOiI5OGE1YjcyZS1mOTFhLTQzMmItYjUwYy05Nzg[THIS IS A SAMPLE TOKEN]3847ufpawiu4f3hapwu93gbpawiu3hrao283938w4t34t m_HWOZDjb82UObqk_nR_6IhvDB7JA5v3Ov2icmZsR3NgT_uaweiur3h498rh2334984htg34o[THIS IS A SAMPLE TOKEN]3948 4VoFjDsie6N9lAlc0fZgdnT_j89mMl4rFaSNY9m",
"X-SF-Call-Id": "50130000009xYZ1AAM",
"X-SF-Transaction-Id": "order-2026-0122-5489"
}

When Salesforce receives a SIP invite, it receives the UUI header or X-headers that contain these parameter settings. When the SIP transfer executes, the callId and transactionId variables pass to Salesforce. Use these variables in the Omni-Channel inbound flow to update data related to the voice call. To use this UUI header or X-header information in an Omni-Channel flow, use the transactionId and partnerVoiceCallId flow variables for the transaction and call IDs, respectively.

Create a case and set fields based on input parameters

Sample Genesys Inbound Flow

To illustrate how to configure the telephony system, review the steps used to create this inbound flow. In this example, we create VoiceCall records, set the UUI header, and configure inbound call transfers and escalations in Genesys. While we don’t include steps to set X-headers in this example, the process is similar to setting the UUI header.

  1. Procure an inbound phone number from Genesys that will trigger the Genesys inbound flow. When the customer calls your organization by using this number, the inbound flow routes the call to the Agentforce agent.
  2. Install the Function Data Action in your Genesys Cloud and ensure all required permissions are added.
    1. In Genesys, go to IT and Integrations | Integrations, and click Install for Function Data Actions.
      Genesys integrations
    2. To add an action that creates a voice call, in the Data Actions section, click Add Action.
    3. In the Action Name field, enter the name of the action and click Add.
      The Function Data Actions integration is selected.
    4. Define the contract as shown here.

      Input contract:

      {
        "type": "object",
        "properties": {
          "to": {
            "type": "string"      
          },
          "from": {
              "type": "string"
          },
          "callCenterApiName": {
              "type": "string"
          },
          "scrtBaseUrl": {
              "type": "string"
          },
          "orgId": {
              "type": "string"
          },
          "privateKey": {
              "type": "string"
          },
          "callAttributes": {
              "type": "string"
          },
          "vendorCallKey": {
              "type": "string"
          }
        }
            }

      Output contract:

      {
        "type": "object",
        "properties": {
          "voiceCallId": {
             "type": "string"
          }
        }
      }
      The contracts
    5. To create voice calls, use this Lambda inside your function definition.
    6. To test the function, in the Test Menu Action, replace the new line with \n in your private key.
      The test settings
    7. If the test is successful, publish your Function Data Action.
  3. In Genesys Cloud Architect, create an inbound flow.
    An inbound flow handles incoming calls to your organization’s Genesys instance. It also routes the calls to their correct destination, such as a rep, a queue, or even an Agentforce agent.
  4. To turn on call transcription, add a Transcription action.
  5. To turn on call recording, add an Enable Participant Recording action.
  6. To greet the customer, add a Play Audio action.
  7. To create the voice call record that will be transferred to the Agentforce agent, add a Call Data Action with these properties. This call outputs the voice call ID as partnerVoiceCallId.
    1. In the Name property, enter Call Data Action.
    2. In the Category property, select Function Data Actions.
    3. Set the request parameters as needed. For a list and description of the parameters, see the "Create the Voice Call Record Using the VoiceCalls Telephony Integration API" section in Configure Telephony Vendor Settings When Using SIP.
      Genesys inbound call flow
  8. To create a voice call with the Function Data Action that you previously installed, configure the Call Data Action to output the voice call ID to a parameter with name voiceCallId. Create the VoiceCall record and set the VoiceCall ID for the record before you route the call.
    Genesys call data action
  9. To determine what happens based on whether the creation of the voice call succeeds, fails, or times out, add a Decision action.
  10. To set the UUI header parameters, add the Set UUI Data action. For a list and description of the parameters, see the "Create the Voice Call Record Using the voiceCalls Telephony Integration API" section in Configure Telephony Vendor Settings When Using SIP.
    Genesys UUI header
  11. Enter the name of the action.
  12. In the Outgoing UUI Data, select For Transfers and enter the UUI parameters in a JSON object consisting of key-value pairs. For example, enter:
    {
    "orgId": "00XX70000000XXX",
    "scrt2Domain": "mycompanyname.my.salesforce-scrt.com",
    “token” : ”adbcdefgsdfsdJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiIwMERTQjAwMD[THIS IS A SAMPLE TOKEN]5h AwZFBWR2ciLCJzdWIiOiJhc2FzaXBvcmczc2RiMyIsImV4cCI6MTc2OTcxOTcyOSwiaWF0IjoxNzY5NzE2MTI5LCJqdGkiOiI5OGE1YjcyZS1mOTFhLTQzMmItYjUwYy05Nzg[THIS IS A SAMPLE TOKEN]3847ufpawiu4f3hapwu93gbpawiu3hrao283938w4t34t m_HWOZDjb82UObqk_nR_6IhvDB7JA5v3Ov2icmZsR3NgT_uaweiur3h498rh2334984htg34o[THIS IS A SAMPLE TOKEN]3948 4VoFjDsie6N9lAlc0fZgdnT_j89mMl4rFaSNY9m”,
    "callId": "50130000009xYZ1AAM",
    "transactionId": "order-2026-0122-5489”
    }

    Select the User-to-User option. If you have multiple environments, such as development and test environments, add a UUI Data action for each environment.

  13. To route inbound calls to the agent, add a Transfer to Number action. For the number, specify the SIP address that you specified when creating the messaging channel for Agentforce Voice. Although the address isn’t an actual phone number, the value must be in the E.164 phone number format.
    When we send a SIP invite with the Transfer to Number action, we send the UUI header that contains the UUI parameter settings. This action triggers the channel’s Omni-Channel flow, which routes the call to the Agentforce agent defined in the flow.
    Transfer to Number action settings
  14. To notify the customer that you’re routing them to an Agentforce agent, add a Play Audio action or use the Transfer to Number properties. For the Transfer to Number properties, enter pre-transfer and failed transfer audio.
  15. To route the call to the escalation flow when the Agentforce agent disconnects, add a Set Post-Flow action. Set the Target field to Caller.
    Set Post Flow action settings
  16. Add a Disconnect action at the end of the flow.
    Disconnect action settings
  17. Save, validate, and then publish the flow.

Add call routing in Genesys Admin to route calls using this flow. To learn how to configure the telephony system to handle call escalations from the agent to a rep, see Configure Telephony Vendor Settings for Call Routing and Escalation.

For information about Genesys flows and Function data actions, see: