def replied_body(payload: Dict[(str, Any)], actor: str, action: str) -> str:
    actor_url = 'http://api.groovehq.com/v1/{}/'.format((actor + 's'))
    actor = payload['links']['author']['href'].split(actor_url)[1]
    number = payload['links']['ticket']['href'].split('http://api.groovehq.com/v1/tickets/')[1]
    body = AGENT_REPLIED_TEMPLATE.format(actor=actor, action=action, number=number, app_ticket_url=payload['app_ticket_url'], plain_text_body=payload['plain_text_body'])
    return body
def replied_body(payload: Dict[(str, Any)], actor: str, action: str) -> str:
    actor_url = 'http://api.groovehq.com/v1/{}/'.format((actor + 's'))
    actor = payload['links']['author']['href'].split(actor_url)[1]
    number = payload['links']['ticket']['href'].split('http://api.groovehq.com/v1/tickets/')[1]
    body = AGENT_REPLIED_TEMPLATE.format(actor=actor, action=action, number=number, app_ticket_url=payload['app_ticket_url'], plain_text_body=payload['plain_text_body'])
    return body